How to adequately power my board?

Hello, I am making a COVID19 project. I am currently working on wiring up my components, but I am a Mechanical Engineer. So advice on how to not fry my microcontroller would be much appreciated.

I am essentially just wiring up a solenoid and a flow meter to the Arduino. The solenoid requires 12v; 0.42A and the flow meter 3-10v; 0.02A. I want to power this all with a 12v AC to DC wall mounted power supply. I attached the schematic of the solenoid below, and I am using a Mosfet transistor in particular to minimize heat generation since the transistor will be doing the heavy lifting.

Does anyone have any advice on how to include the flowmeter into this design?
Also, what alternative is there to powering the Arduino with a 12V source? I will do some math below to say why I believe there needs to be another method, let me know if I am wrong:

The voltage across the regulator is 12v - 5v = 7v.
You draw what you need from the wall mount amperage-wise, so I believe I will be using 0.46A with the above setup. Including the 0.0042A draw from the board itself, a 0.4642A total draw.
So the regulator should be outputting 0.4642 * 7 = 3.25W of regulator heat. This is high and I would not be surprised if it fries my regulator.

do not inject 12V directly thru the arduino's power jack as it's not efficient approach,

the best option is to step 12V down to 5V with a buck converter, get rid of that linear regulator

and the output(5V) goes straight to the 5V and Gnd of your Uno

the buck is going to power the flow sensor as well,

your sensor needs i2c interface to the Uno

and lastly, that diode needs to be as close as possible to the solenoid terminals,

ie: solder the diode across the terminals of the solenoid for effective results

Thanks for the advice, duly noted.

My question for you now is mostly a lack of understanding of EE principles I guess. If I use a buck converter to scale down the 12v supply, then feed the produced 5v into my Arduino. How do I power the 12v solenoid from the 5v now available in the Arduino?

I intended to use this to power my Arduino.

The 5V Arduino will need a transistor to sink current thru the solenoid coil (one side of coil to 12V, the other to transistor to Gnd) to energize the coil. NPN transistor, or N-channel MOSFET. Which you select depends on the amount of current the solenoid needs to energize.

So the 12v can be fed directly to the solenoid, and then also simultaneously fed to the buck converter which will power the Arduino which controls the solenoid's transistor, and the flow sensor? I will include a diagram of my understanding so far:

Diagram.pdf (143 KB)


Please avoid PDF files where possible and use text or proper pictures

Could you also take a few moments to Learn How To Use The Forum.

Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.

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