Multiple power supply and USB protection

Hello,

I am on a custom arduino project. But I am loss on power supply

I have several power sources:

  • 24 V input for relays,
  • 12 V from 24V for relays,
  • 5 V from 12V
  • USB: 5V
  • ICSP programmer: 5V (I do not use a bootloader so I will often connect the card with the ICSP connector)

The operation should be as follows:

I supply the card with 24V -> go through the regulator to have 12V and supply one of the pins of the relays

12V I go through the regulator to provide 5V, and at the same time I supply the other pin of the relays

5V coming from the usb or the regulator (12V) so I select via the system with the comparator and the mosfet.

I can also have 5V coming from the programmer (ICSP connector) which I select with the diode

Is the assembly correct?

Another question: I want to protect the USB, if I consume more than 800mA I cut the power supply, I thought about the MIC2013, is that right for that?

Thank you !

I've just a couple of observations from a quick glance at it:

The ICSP header has an unconventional pinout and reset should have an external pullup
Use Schottky diodes instead of the 1n4148 (lower voltage drop) for power supply contention prevention.
Q1 will conduct, irrespective of the voltage on its gate, through the body diode.

6v6gt:
I've just a couple of observations from a quick glance at it:

The ICSP header has an unconventional pinout and reset should have an external pullup
Use Schottky diodes instead of the 1n4148 (lower voltage drop) for power supply contention prevention.
Q1 will conduct, irrespective of the voltage on its gate, through the body diode.

I know for the unconventional, it is wanted !
I added a 10K resistor between VCC (5V) and PC6 (Reset pin)
I can use MBR0520LT1G instead of 1N4148 ?

I don't find solution for Q1...

Hi,
Have you built and tried your circuit?

Why do you ICSP when you have a FT232 with USB connected to the 328?
Why no bootloader?

Tom... :slight_smile:

TomGeorge:
Hi,
Have you built and tried your circuit?

Why do you ICSP when you have a FT232 with USB connected to the 328?
Why no bootloader?

Tom... :slight_smile:

Yes and no... Yes because I have already made a PCB with the rooting of the components (RS232, CAN, ...) and everything works fine. But I have not yet realized the powersupply part ... So no I have not tested the power supply .

Because to program the card for the first time, it must be done with a programmer and therefore by ICSP.

And secondly, I have already made the card, and despite having put a bootloader, 9 times out of 10 I cannot put a program via USB and the FT232RL chip

kealmlj:
And secondly, I have already made the card, and despite having put a bootloader, 9 times out of 10 I cannot put a program via USB and the FT232RL chip

So you have made some really big mistake then.

Offhand, I don't know what it is , but that is what you are describing. :astonished:

Looks like you copied the Arduino UNO circuit for supply switching, problem is, with MOSFET ON, VUSB will be passed, if the 5V from the regulator is higher than VUSB, current will flow backward into the VUSB source, with MOSFET OFF, VUSB will be passed through the body diode dropping 0.6V.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.