Electronic – Engine cranking corrupts SPI driven 7segment display

brownoutdc/dc converterlead-acidpower supplyspi

I am driving six 7-segment displays with SPI using MAX7219 and ATmega128. This is for displaying various engine parameters like rpm, oil pressure etc. for large marine diesel engines (>100 kW). The system runs on 24V DC from lead acid batteries (automotive type) stepped down to 5V with the help of Mornsun DC-DC converter (URB2405 – Isolated DC-DC converter).

The system runs fine when the engine is firing smoothly (approx. >900 rpm) and was recently tested on a test bed for 2.5 hours without issues. However, the display malfunctions completely and is very unreliable when the engine is cranking.

After debugging this for many days and fixing lot of stupid mistakes (forgot to add flyback diodes for a few on-board relays 🙁 !!) I still have very poor display reliability while cranking. When the display malfunctions, either garbage is displayed on the 7 segments, or all segments light up or it goes blank.

I have added a 1000uF/63V capacitor and a MOV before the DC-DC converter to reduce supply fluctuations while cranking. However it is still very unreliable. I feel that the controller is working ok during cranking and it is only the display which malfunctions.

I am looking for some suggestions for power supply stability during cranking or large transients. I have tested a few things and am about to test if the following improves the situation :

  1. Use shielded cables connecting the display PCB to the controller board to prevent noise corrupting SPI
  2. Isolate high current carrying cables (starter motor relay coil, stop solenoid relay coil etc.) from signal wires with shielding and route them differently inside the enclosure
  3. Add a 0.1uF (104) cap between the 2 grounds of the DC-DC converter to reduce noise on the 5V side
  4. Power the whole thing from an off the shelf automotive power supply which provides all the standard protections. Any suggestions ? (Input 24V, Output 5V, 600 mA max 3W)
  5. Reduce cable length to improve SPI reliability (Although currently the total length: track + wire is less than 1 ft so not so hopeful this would make any difference)
  6. Increase decoupling cap for each MAX7219 from 10uF to 470uF
  7. Use very large capacitor for maintaining voltage while cranking

I still feel I am missing the crucial reason why the display malfunctions. Voltage dip should not really be a problem as the DC-DC converter is rated to provide smooth 5V for a wide input range of 9-36V. Even if the battery is discharged, I doubt if the voltage will drop from 24V to less than 9V, so it is a mystery why the display goes blank or displays garbage.

Best Answer

  • Put a 100ohm@100Mhz Ferrite Bead between the Power Supply output and the input of the voltage for the digital circuit.

  • In the SPI line, put a 100ohm@100Mhz Ferrite Bead between the Atmega and the MAX, it can help with some noise getting coupled on your PCB.

  • 100nF (X5R or X7R) capacitors everywhere on your PCB, for a project like this you can't go without them or your circuit can act "strange".

Is this possible to you post a print of your PCB? Maybe it needs some tweaking, it can be coupling the noise into it.

Every single electronics made for a car or everything that have a lot of noise involved needs beads and good noise protection, just an isolated power supply isn't going to work.

How to see the noise? Simple. Get a #18 copper wire, around a soda can make a loop with 3~4 turns, get it into the oscilloscope, if you moves it around the motor of the car with care you can see how much EMI it makes.