Jump to content

lesthegrngo

Members
  • Posts

    1245
  • Joined

  • Last visited

Everything posted by lesthegrngo

  1. I tried these from multiple sources, but could not get them working at all, which is a shame as from what I read they are set up better for the X27 steppers Les
  2. Hi Jacks, I together with a couple of others were messing around with different drivers, and posted the results on here. Have a look at my previous posts, you should be able to find them pretty easily and also the information you are looking for Les
  3. Nice work! Cheers Les
  4. I have to report more disappointment, I'm sorry to say. While the movement of the pointer using BoboBears diagnostic tool is smoother, once in game the quality of the movement is virtually indistinguishable from the gauges using driver boards. I need to look at it in more depth, maybe the rate that the gauge data is being sent means that the refresh rate is too low to support smooth movement. Whatever, it's not the Panacea I was hoping for Les
  5. It would be good to understand why using RSMapper would help with this, as it may help explain why it's happening at all. If you are OK with it, would you be able to share how you set it up (if nothing else, it would be good to have a better understanding of RSMapper) and then we can take a look at what is going on Cheers Les
  6. Just a question, what do you require of the shift registers? To explain, I run the MFCD's for my A10 setup as one switch going to one input of a Leo Bodnar BBI64 board, so I ended up with about 30 outputs plus the common ground. The bodnar board is directly recognised by Windows and DCS and you simply allocate the button within the control setup Cheers Les
  7. No shift registers on mine, let me get back from work, I'll take it apart and photograph it all Cheers Les
  8. I made a custom PCB using a design on a combination of Solidworks and Qcad, then engraved it on my CNC engraver. I use those SMD switches, soldered onto the PCB, and use top hat shaped buttons that poke through the fascia (in my case made from MDF machined on my engraver, but your 3D printed one would do) to activate them. It's nice and thin (about 6mm) and so I can use a 10.1" LCD screen behind it. I can take pictures if you like But there are plenty of ways to do it, that's just what works for me Cheers Les
  9. Yep, my code to blame, but thankfully there are some guys out there who are really savvy with this this works #define DCSBIOS_DEFAULT_SERIAL #include "DcsBios.h" #include "SwitecX25.h" // 315 degrees of range = 315x3 steps = 945 steps int newValue; unsigned int maxSteps = 945; // declare motor1 with 945 steps on pins 8-11 SwitecX25 motor1(maxSteps, 8, 9, 10, 11); void setup(void) { DcsBios::setup(); motor1.zero(); // this is a slow, blocking operation motor1.setPosition(940); } void onLEngTempChange(unsigned int newValue) { unsigned int position = map(newValue, 0, 65535, 0, 945); motor1.setPosition(position); } DcsBios::IntegerBuffer lEngTempBuffer(0x10b4, 0xffff, 0, onLEngTempChange); void loop(void) { motor1.update(); DcsBios::loop(); } Even a very quick trial with the new code shows a very very different quality in terms of the smoothness and quietness of the stepper movement to the inputs. This is definitely the right direction to take, even though it does come with some complications in more physical ways. I think I have to look at the acceleration and max speed values in the libraries, as they probably will allow even more improvement - when I did my experiments with microstepping I noticed that too fast a max speed would end up in very staccato pointer movement unless making large changes. Lowering the speed will probably help if I can work out how to do so This looks pretty hopeful guys Cheers Les
  10. Gave those two a go, to no avail. Still suspect my dodgy code is to blame Cheers Les
  11. I see what you are getting at, but having the ability to run a gauge direct off a nano is still something I would like to be able to do This is where I have got to with a simple sketch, but using BoboBear's diagnostic program I can't make it respond to the DCS BIOS inputs #define DCSBIOS_IRQ_SERIAL #include "DcsBios.h" #include "SwitecX25.h" // 315 degrees of range = 315x3 steps = 945 steps unsigned int maxSteps = 945; // declare motor with 945 steps on pins 8-11 SwitecX25 motor1(maxSteps, 8, 9, 10, 11); //motor1.zero(); // this is a slow, blocking operation void setup(void) { //Serial.begin(9600); DcsBios::setup(); motor1.zero(); // this is a slow, blocking operation } void onLEngTempChange(unsigned int newValue) { return map(newValue, 0, 65535, 0, maxSteps); motor1.setPosition(newValue); } DcsBios::IntegerBuffer lEngTempBuffer(0x10b4, 0xffff, 0, onLEngTempChange); void loop(void) { motor1.update(); DcsBios::loop(); } The gauge will zero, and then not do any more If I add the line "motor1.setPosition(940);" it will zero then move to near the end of the clockwise travel as you would expect, so the setPosition argument works #define DCSBIOS_IRQ_SERIAL #include "DcsBios.h" #include "SwitecX25.h" // 315 degrees of range = 315x3 steps = 945 steps unsigned int maxSteps = 945; // declare motor with 945 steps on pins 8-11 SwitecX25 motor1(maxSteps, 8, 9, 10, 11); //motor1.zero(); // this is a slow, blocking operation void setup(void) { //Serial.begin(9600); DcsBios::setup(); motor1.zero(); // this is a slow, blocking operation motor1.setPosition(940); } void onLEngTempChange(unsigned int newValue) { return map(newValue, 0, 65535, 0, maxSteps); motor1.setPosition(newValue); } DcsBios::IntegerBuffer lEngTempBuffer(0x10b4, 0xffff, 0, onLEngTempChange); void loop(void) { motor1.update(); DcsBios::loop(); } I'm pretty certain that the syntax has something to do with it Cheers Les
  12. All, I am seeing a steady rate of posts on this thread asking questions, but looking back it seems the last time there was any input to answer was back in March. I am hoping that nothing has happened to McMicha, it seems he has been the guru. I totally understand that there may not be time or ability to answer our myriad of questions, I just hope that McMicha is OK and that he gives us quick confirmation that he's still about! Cheers Les
  13. Thanks for this, but maybe it's just me - I saw no option during that process to rename, just you choose the bin file with numbers 1 to 6, and that allocates the suffix 1 to 6 plus the six character alphanumerical serial number. I have 8 boards so presumably can't rename 2 of them without repeating the suffix and still have to rely on the serial number Cheers Les
  14. Hi all again. After my experiments with stepper drivers and microstepping to try and improve the quality of the movement of stepper motors, I have been searching around to see if there is a better solution available. To summarise, the movement I have with EasyDriver and A4988 stepper motor drivers is not smooth, and is accompanied by quite a loud chattering noise. Research on other forums has allowed me to find out that you can run an X27-168 stepper motor direct from the nano by connecting four digital pins. The benefits of this are 1) there is no requirement for a 12v power supply to the stepper driver, reducing some complexity, as the stepper motor uses very low current 2) the correct stepper pulsing is obtained, which means finer movement control 3) it is very quiet 4) you do not need a separate stepper motor driver board. The downside of course is that you need four nano pins for each stepper, however if you were only using one nano per stepper motor anyway, it won't really make much difference. If you are running multiple stepper motors per Arduino (as I do) then you will of course reduce the maximum number of stepper motors each one can drive. Of course that's the theory. I have a simple sketch and library that runs the stepper motor all the way to the anticlockwise stop, then clockwise to a predetermined position. It really is smooth and quiet in operation during testing, but the real proof is if we can get it to run a gauge using DSC BIOS. My thoughts were to get the following sketch that Craig very generously let us all have on his site, and modify it to take the new code and library to drive the stepper directly. This is where I am asking for help. I am OK doing simple sketches, but the ability to take this and modify Craig's sketch is beyond my skills. So is anyone out there who is sufficiently versed in writing Arduino sketches able to take the sketch below and modify it? I am happy to give the libraries and basic sketch (can't be posted here as code as they are too big) #define DCSBIOS_IRQ_SERIAL #include <AccelStepper.h> #include "DcsBios.h" struct StepperConfig { unsigned int maxSteps; unsigned int acceleration; unsigned int maxSpeed; }; class Vid29Stepper : public DcsBios::Int16Buffer { private: AccelStepper& stepper; StepperConfig& stepperConfig; unsigned int (*map_function)(unsigned int); unsigned char initState; public: Vid29Stepper(unsigned int address, AccelStepper& stepper, StepperConfig& stepperConfig, unsigned int (*map_function)(unsigned int)) : Int16Buffer(address), stepper(stepper), stepperConfig(stepperConfig), map_function(map_function), initState(0) { } virtual void loop() { if (initState == 0) { // not initialized yet stepper.setMaxSpeed(stepperConfig.maxSpeed); stepper.setAcceleration(stepperConfig.acceleration); stepper.moveTo(-((long)stepperConfig.maxSteps)); initState = 1; } if (initState == 1) { // zeroing stepper.run(); if (stepper.currentPosition() <= -((long)stepperConfig.maxSteps)) { stepper.setCurrentPosition(0); initState = 2; stepper.moveTo(stepperConfig.maxSteps/2); } } if (initState == 2) { // running normally if (hasUpdatedData()) { unsigned int newPosition = map_function(getData()); newPosition = constrain(newPosition, 0, stepperConfig.maxSteps); stepper.moveTo(newPosition); } stepper.run(); } } }; /* modify below this line */ /* define stepper parameters multiple Vid29Stepper instances can share the same StepperConfig object */ struct StepperConfig stepperConfig = { 500, // maxSteps 1000, // maxSpeed 1000 // acceleration }; // note cs im testing with 11 going to step (middle on easy drier) and 10 doing to direction (right on easy driver) // cs so in the code going on the basis that the first named number is step and the second is direction // define AccelStepper instance AccelStepper stepper(AccelStepper::DRIVER, 10, 11); // define Vid29Stepper class that uses the AccelStepper instance defined in the line above // +-- arbitrary name // | +-- Address of stepper data (from control reference) // | | +-- name of AccelStepper instance // v v v v-- StepperConfig struct instance Vid29Stepper lHydPressBuffer(0x10c2, stepper, stepperConfig, [](unsigned int newValue) -> unsigned int { /* this function needs to map newValue to the correct number of steps */ return map(newValue, 65535, 0, 0, stepperConfig.maxSteps); }); void setup() { DcsBios::setup(); } void loop() { DcsBios::loop(); } Cheers Les
  15. All, I redownloaded the Ikarus files, that now seems to have fixed the issue of it going back to the default profile. The other two problems remain, of which the biggie is that the RWR frame is still appearing despite me completely deleting the RWR related files. I made another instance of the RWR to test, and left the 'frame' selection empty, and yet it still comes up with the frame with the IP-1310/ALR stencilling on it. Is that written into some other part of the program? I just can't shift it, and it is right in the centre of the main screen at the bottom Cheers
  16. Guys, I've installed and run Ikarus. I like it, and once I've cleaned up the minor issues, it will really look great on my dash! But.... First and foremost is that when I try to save the profile to for example the desktop, it doesn't. It says it does, but no file is created. I managed to get a profile saved in the same folder as the Ikarus.exe file but that's the only place I could. I could then copy it onto the desktop, but could not save a renamed file using Ikarus. Secondly, When I open Ikarus then start DCS, it will show the default A10C cockpit even though the saved profile was loaded. Once in game, I can ALT-tab and reload the saved profile, but after every flight, Ikarus re-loads the default profile that comes with it in the master folder. I can open the saved profile, but at the end of the flight it is gone again. Thirdly, as I use my own dash, I only need the ADI, HSI, RWR and ASI. The ADI and RWR come with frames that intrude onto the HUD view, so I created blank versions of the frames that either were transparent or had the top cropped so that they wouldn't show. No matter how many times I try, even though they are selected in the setup, the original frame appears. I have even deleted the frames that appear in the 'frames' folder but Ikarus somehow manages to continue to display those. I don't know where it is getting the file from, as it has been deleted How can I get the modified frame to appear? Cheers Les
  17. You're very welcome. I was hoping that I could find the same displays out there but with white text on a black background, but have drawn a blank so far. They would look so much better in the CMSC Cheers Les
  18. Guys, if you are interested, there is an RS485 breakout board being touted on the input /output forums https://forums.eagle.ru/showthread.php?t=279182 Les
  19. No idea matey, but I can put a link into an existing thread to this Cheers Les
  20. That also happened to me when I went from 3 bodnar to four - all the bindings were reallocated in the control settings to different boards Cheers Les
  21. Guys, I've installed and run Ikarus for the first time today, and not unexpectedly with some minor glitches. I like it, and once I've cleaned up the minor issues, it will really look great on my dash! But.... First and foremost is that when I try to save the profile to for example the desktop, it doesn't. It says it does, but no file is created. I managed to get a profile saved in the same folder as the Ikarus.exe file but that's the only place I could. I could then copy it onto the desktop, but could not save a renamed file using Ikarus. Secondly, after every flight, Ikarus loads the default profile that comes with it in the master folder. I can open the saved profile, but at the end of the flight it is gone again. Thirdly, as I use my own dash, I only need the ADI, HSI, RWR and ASI. The ADI and RWR come with frames that intrude onto the HUD view, so I created blank versions of the frames that either were transparent or had the top cropped so that they wouldn't show. No matter how many times I try, even though they are selected in the setup, the original frame appears. How can I get the modified frame to appear? Cheers Les
  22. Is it possible the run.exe was a legacy of an older installation that eventually was removed by an update? Cheers Les
  23. The RWR is resolved, I had a message directing me to this discussion which worked perfectly https://forums.eagle.ru/showthread.php?t=242228 The taskbar thing seems to come and go as I use it not sure why. As for the starting windowed, it's a nuisance but if I remember to click on the taskbar IMMEDIATELY after slicking on the DCS world icon, it will start correctly Now on to Ikarus! Cheers Les
  24. Hi All I previously had Monitor.lua set up for four screens (main, LMFCD, RMFCD plus ADI / Artificial horizon. I used helios for the last screen, the rest was straight .lua I've since added a fifth screen for the RWR and ASI, and will be switching to Ikarus due to Helios bizarrely not having the ASI in a form I can incorporate A minor niggle with the previous setup that has continued with teh addition of the fifth screen is that when I go into DSC world on startup, it runs on the main monitor only in a sort of faux windowed mode. By clicking on the taskbar on the bottom it will go to full screen definition and display correctly, but you have to play 'Where's Wally' with the mouse pointer on the five screens every time. Is there a way to get DCS to open directly to correct mode straight up? I can live with it as is, but it's a bit of a nuisance. I'm also seeing the taskbar being displayed in game on all the four monitors at the bottom, is there a way to get the taskbar hidden in-game? Lastly, I'm having a bit of trouble with the RWR display. I understand enough that the two MFCD's are being displayed perfectly in their respective windows, so the fact that the RWR is not appearing is puzzling me. The screens are displaying a black background and I know Helios is best with it set as transparent, but I was under the impression that Monitorsetup.lua did not require this Here's the .lua file _ = function(p) return p; end; name = _('Camera+LMFCD+RMFCD_RWR'); Description = 'Left MFCD on the left monitor,Right MFCD on the right and camera on the center' Viewports = { Center = { x = 0; y = 0; width = 2560; height = 1080; viewDx = 0; viewDy = 0; aspect = 2.37037037; } } LEFT_MFCD = { x = 290; y = screen.height -1080; width = 610; height = 610; } RIGHT_MFCD = { x = screen.width -900; y = screen.height -1080; width = 610; height = 630; } ED_A10C_RWR = { x = 1024; y = screen.height -1080; width = 610; height = 610; } UIMainView = Viewports.Center GU_MAIN_VIEWPORT = Viewports.Center Any help given is gratefully received! Thanks Les
  25. Have a look in the 'eagle dynamic/dcs world/bin folder' for DCS.exe, that now seems to be in its place Cheers Les
×
×
  • Create New...