Hi Vlad.

12hours on this today and I still cant make it work! :-)  I have a cockpit built in a  C152 fuselage and I have converted or built all the main  instruments with steppers or servos.  Other gauges are PWM meters. 

The servos and PWM stuff works fine but the steppers will not work for me.  The ASI VSI and RPM are X27 type with the driver board you suggest and with the additional components you use.  The DG and ADF are 28BYJ 48s again with the boards you suggest and converted as the page advises. 

Firstly, I have the latest plugin and I updated the master, servo and stepper slave boards with the firmware from it. All the gauges actually work following a hard reconnect as the system does not seem to connect unless I force it.  Once online, the gauges seems right till I make a short flight. Within the first few seconds, the gauges are losing sync and no longer show what the on screen gauges show.  Sometimes it can be a long way out or unresponsive.

This applies to all the Stepper gauges but PWM and Servos are fine.  I can pause the sim, hardware reconnect and the gauges reset but after a few seconds they are wrong again.  I have calibrated them all using the tool.  I have checked wiring and connections, updated the firmware twice, checked the grounds for which I am using the fuselage as its about as good a ground wire as I am going to get.  The Servo and stepper boards have their own power supply, all servos etc have a direct power supply again common grounded and stable.

I am lost now as to what I am doing wrong.  I am doing all my testing with my laptop which has a single USB port and the Sim and a joystick are linked via a powered USB3 hub. Before I sorted the power supplies to the slave boards, I experimented with running them from the 5V output on the master but the load caused the sim to crash on reconnect. Today with the power supplies all was well except the steppers do not stay "in step".  I have got all the avionics working too and noted your comment about the transponder message text etc as i was trying to use that till i read you are updating it.   I had some issues with the ADF active and standby and the tuning controls but the new plugin and configurator seems to have resolved that.

I hope you can help with the stepper issue as I am now at a loss as to what to try next. I am using the Just Flight C152 as the flight model but I have the same issue with the default C172 in Xplane. I will likely use the Carenado C512 with the NHadrian mod in the final sim if that is of any help too. 

Thanks for all you do as it makes these projects possible.

I look forward to your advice

Best wishes from South Devon UK.


May 28 in Output - Gauges by

1 Answer


1. "....are X27 type with the driver board you suggest..."
What driver board do you mean? The X27 needs the 6606 type controller.

2.  The slave stepper board needs separate power supply and it must be stabilized, 5v exactly (the wattage doesn't matter for low-current motors).

3.  What is the X-Plane FPS in you configuration?
You can provide some photos of your connections.

May 29 by
HI Vlad.

I am using the AX 1201728SG 4 output driver for the x27 gauges with 3 outputs used (RPM ASI and VSI) and the board is fed from a 5V stabilised Switch Mode PSU. The volt meter shows it at 5V or within a tenth of a volt.   The Continuous rotation gauges (ADF and DG) are driven with the A3967 boards wired for full step mode with the MS1 and 2 terminals grounded and use switches for the zero as your diagrams.  I tried optical but it was not as reliable as the hard switching Zero Sensors.   These are fed from the same 5V PSU as I wired a 5V and a 12V bus through the cockpit that feeds all the loads. All the PSUs use a common ground and are bonded to the metal of the fuselage on the low voltage side only (for obvious safety reasons). Mains wiring is earthed as UK regulations.

The Stepper board with your firmware on it was fed from the master board 5V output but that was causing issues so I fed it and the Servo board from the 12V bus in accordance with the Arduino specs.  7-12V is OK from what they say. I have gone into the Power inlet port so the power on the board was checked and was happily at 5V when I tested it after the regulator.  I did note your comments about power dissipation but as I only have small loads and limited current, and I checked the regulator was not running warm all seemed well.  I could feed it from the 5V PSU but I wondered if any slight voltage drop on that would then reduce the board voltage too as it will be below the regulator output.  I will however try that tonight anyway as the power busbars are close together and I could go into the Vin on the board at 5V rather than into the cannon connector or USB port. The 5V PSU is rated at 10A as is the 12V PSU so there should be ample current available before the voltage fluctuates.

Xplane FPS on my laptop is in the high 30s but I purposely kept the processor and GPU loads low for testing only . When I put the main Sim PC into the system I will be higher than that again running high graphics as its an overclocked I9 pushing a 2080TI GPU Card.

I am going to recheck all the grounds and make sure I have no earth loops and also all the voltages on the main boards, slave boards and the Stepper Driver boards so I can be sure they are all in your tolerances.  I did this before but worth checking again.

One other thing, when I do a reconnect, the DG and ADF do not always do the full CCW rotation and then they go to some random point.  Other times they do the full rotation, activate the Zero switch and then step to the right place but lose it later.  Its mysterious and has got me really puzzled.

Usually if I do a reload it fails to do the full rotation but if I unplug and then force a hardware reconnect it works as it should.

Not sure pictures would help you as its a multiple wire loom that runs from the instrument panel to the processor boards on the front of the fuselage so nothing can really be seen together for connections.  I will send you some pics of the sim for the gallery once I get it working.

I am going to re-check everything tonight in the hope I find the problem and that it is precisely as your diagrams (I think it is but again I will re-check) but in the meantime, if you have any other thoughts, please let me know.

Sorry a long message but I wanted to give you as much information as possible.

Once again many thanks for your help.

Best wishes



As you could see on my videos I have several steppers connected to my test platform, and I never see any synchro lost during the long time. 

While developing the stepper control program (that is taking in account current XP FPS, speed and value  of momentary data change to control right acceleration and smoothness for  several stepper simultaneously), I have tested the stepper with several hundreds of full cycles, and no one step was loosing at the end.

Maybe later I will test  it again (need to connect my setup), but nothing has been changed for the last half of year in the stepper program....


As I recommend - use some power supply connected to the USB socket  and power all the stepper controllers with the same 5 V  that goes from the stepped slave board.

Exactly as in this diagram (see the+V for stepper drivers):

No need to use powerful source, you can use any stable PS with 100 - 500 mA.

By the way,  you can try to leave only the X27 steppers connected (and assigned in the cofg file), to see if there is difference.

How many ouput do you have assigned in your current cfg file?

Ah, and check your Rx/Tx lines  (contacts, soldering...).

Hi Vlad

SOLVED IT!!  I had a fault on the x27 driver board but that did not seem to account for why it affected the other steppers.  I have a separate master board I use for testing and when the X27s and their driver did the same directly connected to this, it was a clear problem. That left the others to sort out.   I then  went through absolutely everything and then I found it. A bad ground to the instrument panel!!!!   It was bolted connection to the metal of the fuselage with a lug soldered to the cable so it should have been perfectly good, BUT......the Ohm Meter showed it at 100Ohms......enough to affect the board voltages etc all of which  you make clear are critical!  I remade the connection tested it was good and reset everything complete with the new X27 driver board and it all synched up correctly and stayed in step.  Everything now seems to work exactly as you describe it should.

Clearly a lesson in checking even the least obvious things as I would not have suspected a bad earth when visually it was perfect metal to metal and bolted.

I have tried  3 "flights" since and everything stays in step and resets when I reload the configuration.  I am very happy today after a lot of head scratching and testing last night.

I never once suspected it was a problem with the programme or configuration, as all the testing I did before worked fine. It had to be a wiring problem but I came to you as you may have seen it before.

Lesson learned on my part.

I now have everything working except the Artificial Horizon as the servo in that failed last night......another lesson, cheap SG90 servos from Ebay may not be the best! New and better ones coming on Monday and I will rebuild the AH and re-install it.

As to inputs etc I have most of the master board inputs and outputs used plus 5 MUX input boards and a MUX output board. Pretty much every switch, knob and gauge in the 152 will work when I am finished. Most of the inputs and outputs are from the avionics stack.

I am about to put 2 PWM fans on the outside linked to the internal air vents and drive them from Airspeed so the air into the cabin increases as air speed increases.  Yes I know......I am taking this a bit too seriously!    :-) :-)

If you want to see the airframe I am using to build this into, please look up Reims Cessna 152 G-BMFZ on the web. There are pictures of her in  flight and after the crash that resulted in it being scrapped and coming to me as a simulator project.

Thanks so much for what you do with this and for the help you give to all of us builders out here.

I will send some pictures once its all working.

Best wishes