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 :
- Use shielded cables connecting the display PCB to the controller board to prevent noise corrupting SPI
- 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
- Add a 0.1uF (104) cap between the 2 grounds of the DC-DC converter to reduce noise on the 5V side
- 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)
- 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)
- Increase decoupling cap for each MAX7219 from 10uF to 470uF
- 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.