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.
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?
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: