I have an STM32F0 based circuit to control two AC loads (a compressor unit and an MD40 pump). A 12V supply feeds the circuit. On the PCB there is an LM2576T to step the voltage down to 5V. This is further regulated to 3.3V (for powering the STM32) using an LM3940.

My modules seems to be working fine. But once in a while (for two days it was working fine), when the loads are operating on the relays, the LM3940 heats up to 80 degree Celsius and my circuit temporarily turns off (as indicated by the 7 segments dimming and turning off eventually). The design of the circuits looks okay to me and the 12V power supply has been tested with other circuits and can provide a current of up to 5A. This was not a one time issue. This problem was recurring. At one point, the main circuit stopped working because the LDO got burned.

I've attached the power supply circuit diagrams. Also attached is the circuit for the relay boards which control the loads. There is a Darlington pair of BC847s on the board for driving the relay. The relay circuit is not optocoupled. The relays are powered by the main 12V supply.

Power Supply C18 - 10uF Tantalam Relay Board I've been unable to figure this out so far, so any help is appreciated. Full circuit

Other components on my circuit:

  • 4 seven segments
  • An MAX485 on UART for MODBUS communication
  • Some tactile switches
  • Some NTC thermistors read by the STM ADC
  • 2
    \$\begingroup\$ LDOs get hot. There's no getting around it. If yours gets too hot, add a heatsink, or switch to a switching regulator. \$\endgroup\$
    – Hearth
    Dec 10, 2019 at 4:42
  • \$\begingroup\$ @Hearth Almost all the time during the operation the LDO is okay. Then during relay operation it heats up too much and gets burned all of a sudden. That can't be normal. Besides I have a larger module driving 10 relays and a bunch of other components and the the same LDO is absolutely fine on that circuit. \$\endgroup\$
    – sixter
    Dec 10, 2019 at 4:45
  • 3
    \$\begingroup\$ What power rail is "VCC" - the one powering the relay coils? 12V? It doesn't match with any of the labels in your power supply schematic (+12V, +5V, +3V3). \$\endgroup\$
    – jms
    Dec 10, 2019 at 4:51
  • \$\begingroup\$ @jms I think Vcc is a dedicated supply, It has its own connector. \$\endgroup\$
    – DKNguyen
    Dec 10, 2019 at 4:54
  • \$\begingroup\$ How much current does the LM3940 normally supply? What voltage does it put out when overheating? What package is it, and What heat-sinking does it have? (trying to figure out how much current it might be drawing in the fault condition). Does the 5V supply power anything apart from the LM3940? \$\endgroup\$ Dec 10, 2019 at 4:55

1 Answer 1


There are no series resistors for the 7 segment display LEDs, so the LEDs draw too much current.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.