Electronic – 24V power supply for MCU+USB

24vmicrocontrollerusb

I'm designing a home automation controller in college. The system is on 24V (relays and sensors). I'm using TI Cortex M3 MCU and i want to control it over USB. This picture of the system is currently draft.

the system

I have some questions that I could not find any answers. The board needs 5V(3.3V LDO on there), so a 24V to 5V conversion needed.

  1. Is there any problem that the whole system is on 24V ground?
  2. If 1. problem. Do I need a isolated DC/DC converter?

The outputs externally wired and the inputs opto-isolated.

Best Answer

You will have much less potential for problems if you use an isolated converter and keep the power stuff (relays) on the 24V side with opto-isolators. The downside is that it will be a bit more complex.

Relays do not really provide 100% isolation from the mains item being switched- noise feeds back through the relay coil which can cause the microcontroller to misbehave. For example, switching a motor load to close some drapes might cause a spike that causes the microcontroller to go amuck until the WDT or something like an address space violation resets it.

If you're using a multilayer commercially made board for the microcontroller and just building the power stuff you may come out okay if you're careful about how you do the interfaces.

However, since you are already putting opto-isolators on the inputs, I say use the isolated converter and opto-isolate the relay drivers. That should allow you to concentrate on developing the project rather than potentially troubleshooting at the last minute.