Maximum consumation Arduino

Hi guys,

I work for a start-up project, we build a bioreactor control system with an Arduino. The Arduino controls a wide number of hardware equipment and a Raspberry is connected by the Serial port to analyse data and send it to AWS. The system is powered by an electrical cabinet (Our mega is powered with 12 V in the VIN port).

It works well, but sometimes we lose the connection with the Rasp. After 2 weeks of researches and tries, we think that the problem doesn't come from the Rasp. We are out of ideas but we want to secure the question of electricity consummation.

I read that the Arduino mega can provide 20mA by pins and the sum of the command should be under 200mA. Is it right?
What is the risk if we use components where the command needs more than 20mA? The processor death is faster?

In our process, we command :

If we have a problem, I think it's coming from the relay. On the website where I bought it, it's written that each relay needs 15 to 20 mA to commute. It seems big and I don't know if this amp is from the Arduino or my transformer (pin VIN is put in an electronic domino of 5V where all the sensors and cards, included my Arduino, are put together). The totality of my hardware equipment is not ON at the same time.

Otherwise, I have two avenues in order to improve my system (or to avoid problems). The first one is to change the relay, this one contains a coil, I'm currently testing MOSFET relay like this one (But I didn't found the same technology in an 8 relay for the moment). The second is maybe why I have a problem in my system.
If I use a relay to control the electrical valve, do I need a freewheeling diode to block the current charged in the valve?

Thanks for your time,
Have a good day,

Alex

And there is the whole of your problem. :face_with_raised_eyebrow:

The "Vin" terminal - or the "barrel jack" is simply useless for any serious project.

You need a 5 V regulated supply to power the Mega and all your 5 V devices. Connect the 5 V to the "5V" pin except when connected to a PC via USB.

Do not expect a pin to provide more than about 25 mA.

Just simple rules.

Slight confusion here.

A relay module - which you need in order to control the relay from an Arduino pin - includes a transistor as well as a diode to suppress "kickback" from the relay coil itself. If you are using the relay to control a solenoid (with DC - AC is a different matter) then you really should have a diode across the solenoid coil. You certainly need one with the FET module you cite, as best I know (because it is not properly documented) it does not include one.

Thanks for your answer.

Hum ... We use the VIN because We read you can't use the USB port and the 5V is the same time. Well, we use USB for the communication between the rasp and our board, and sometimes to read data without going through the Rasp. I think it's possible to use some Arduino pin instead of USB but I don't know how it works.

Okay, so my relay is not as good as I thought. Do you know any references for well-manufactured relay modules?

Kind regards,

Alex

Also, consider having the RPi reset the Mega when the Mega stops doing its thing.

It's more complicated than that.
Yeah, we can restart the Arduino but our process is an autonomous process where some variables change over time. If we restart, we lose all the changes in our parameters.

Kind regards,

Alex

Ah! Well, there is an interesting point. :face_with_raised_eyebrow:

"Can't" is of course, true, but yet not true. If you feed 12 V to the Mega (or UNO, Leonardo) "Vin" or the equivalent "Barrel jack", then the supply selection circuit isolates the 5 V supply from the USB port. But when the on-board regulator (which has no heatsink to speak of) overheats and shuts down because you draw more than 150 mA or so and it is dropping 7 V (which at 150 mA is 1 Watt dissipation) then you have no 5 V supply.

The concern regarding powering via 5 V to the "5V" pin - which is the correct and reliable way to power it - is that if a PC is connected to the USB port, the 5 V may feed back into the USB interface of the PC and cause that part to malfunction. Note clearly that this is not a problem affecting the Arduino, but possibly to the "PC".

Now that would of course, only be a problem if the 5 V from your Mega power supply exceeds the 5 V in the PC. And I do not know how the USB ports of the Pi are arranged. If their 5 V is simply directly connected to the 5 V main supply of the Pi, there is no problem at all; the only problem is if it includes some exotic current limiting circuit to its USB port as in a PC or laptop.

If you can locate a circuit of the Pi, you could check this out. But if your 5 V supply to the Pi is the same connection as to the "5V" pin of the Mega, this is unlikely to be a problem in any case.

A simple solution is in fact, to connect your main 5 V supply to both the Pi and the Mega, and disconnect the 5 V line in the USB cable from Pi to Mega. Alternatively, if you can be sure that the Pi can deliver sufficient current from its USB port to power the Mega and its attachments (up to 500 mA) then just power it via the USB port and do not connect 12 V to "Vin".

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