lesthegrngo Posted May 26, 2019 Posted May 26, 2019 On a separate thread I requested help with basic physical setup of DIY gauges for DCS, and happily I am now at the stage where I have 'working' gauges that interact with DCS BIOS. The units run stepper motors (X27-168 steppers) with A4899 driver boards, however now I have the basics set up, I have to now get them to mirror the virtual cockpit gauges, i.e. have the pointer at zero when the RPM is zero, and at 50% when it should be 50%. Right now it seems that I have far too much motion. I think the sketch drives the gauge to self zero, and have have changed the 'maxsteps' config number to 1500 from 3900, but the motion still is virtually 100% of the available movement of the stepper even though the actual required travel is 60%. I also see quite a bit of jitter in the movement of the stepper motor, it is far from smooth. I have a capacitor across the stepper power terminals as recommended, but research leads me to believe this is more for spike protection rather than noise. Is there a way to set the motion correctly and eradicate the unwanted movement and jitter? Cheers Les
Hansolo Posted May 26, 2019 Posted May 26, 2019 How have you connected MS1, MS2 and MS3? They are used for microstepping. If nothing is connected then the internal pull-dwon resistors will set the driver for full step, e.g. 200 step for one revolution or 1.8º per step. Try and set microstepping for higher resolution and see if that helps. Then you need to apply this to your code. Granted I haven't spend too much time on steppers :music_whistling: Cheers Hans 132nd Virtual Wing homepage & 132nd Virtual Wing YouTube channel My DCS-BIOS sketches & Cockpit Album
lesthegrngo Posted May 27, 2019 Author Posted May 27, 2019 Thanks Hans - a quick look shows me that I have to connect them to power, maybe the 5V supply? Will have to look into it Cheers
Hansolo Posted May 27, 2019 Posted May 27, 2019 Ther eis a good turtorial here; https://www.pololu.com/product/1182 Cheers Hans 132nd Virtual Wing homepage & 132nd Virtual Wing YouTube channel My DCS-BIOS sketches & Cockpit Album
Recommended Posts