Newbie here - would really appreciate some help. This is my first post, so go easy.
I am designing a control module for a circuit that turns on and off a pump. The reason I chose to use an Arduino is so that I can better control when and how the pump turns on. The way it works is I have a toggle switch and a momentary switch
if toggle switch is off, the entire system is off.
if toggle is "armed", then a momentary button can be used to control the pump going on, by pressing twice within a second to turn on and single click to turn off
if toggle is ON the pump is on and momentary switch has no effect
I have built the system on a breadboard and it works as intended. I am looking for advice
Am I doing anything wrong, dangerous or stupid?
You will notice I have SYS ground (which connects to the 12V (actually 14.4V) as well as LGND which is the Arduino ground - can I mix these grounds? I have tried to keep the 12V and 5V circuits separate (The relay board does have an optocoupler)
I should have been more clear. The toggle is a 3 position toggle OFF/ARMED/ON. Physically its actually off in the centre position, but I have used code so that the bottom position is OFF. The ON position is to just switch the pump on. The armed position allows me to use the button to click it on and off.
The BJT 2N3903 has a maximum Emitter −Base Voltage of 6V, and a maximum current of 200mA. I think that it is not a good option here, or you should organize it different with the relay. Which relay is it?
Which DC converter are you using? Is it isolated? so the GND's are isolated?
On the right side you have the net labels LGND and SYSGND, but you should use the same GND symbols than in the other side. And do you need isolated circuits? you are using both the 12V and 5V rails in the Arduino side. And you have the relay anyway to isolate the load.
I will fix the ground symbols. SO I need isolate circuits - I am not sure. I guess I am trying to protect the Arduino circuit at 5V from the higher side of 14.4V (even though it says 12V). Maybe I am overthinking this. I am still unsure whether I can connect the ground SYSGND (14.4v GND) and LGND (5V GND).
Thanks again for taking the time, it is highly appreciated.
VIN requires a voltage between 7V and 12V, so I don't know how your circuit ever worked.
Are you sure you posted the correct schematic?
I see no need for Q1 or Q2
I created the schematic from my breadboard tinkering, so I think everything is as implemented. I have just measured Vin again and its 5V. Also I see now that a couple of articles say that it may work but it will be unstable. My system voltage is 14.4, so it sounds like I have the wrong DC converter? I will try and find one with output 7V or 9V.
Thanks for that pickup.
My reasoning for Q1 and Q2 was to enable the 5V Arduino output to provide the 14.4V power to the relay and to the pump. Did I get that wrong?
Yes, I think that you can simplify it.
For the isolation you already have the relay. So, manage it with a 5V Arduino pin, and keep the 12V on the other side of the relay only, to power the motor. No need of transistors, I think.
You could power the Arduino with 5V, in the 5V pin. But you don't need that big converter, it will only power the Arduino. You could use just a small buck converter module to 5V/1A (better), or an LDO like the LM1117. It would be not completely isolated tought.
Good question. Its actually to control a smoke system in a small aircraft. The momentary button is on the control stick, and I need to turn it on and off from the stick during formation or display flying. Double tap so I dont turn it on accidentally (once system is armed)