Help with Arduino circuit

Hi All,

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

  1. if toggle switch is off, the entire system is off.
  2. 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
  3. 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

  1. Am I doing anything wrong, dangerous or stupid?
  2. 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)
  3. Any values seem incorrect?
  4. Do I need any other protection?
  5. Any other advice?

Schematic is at Pump System

Since the code works, I have not posted the code but I can if required.

Thanks in advance

Welcome to the forum

For the benefit of others

To post images etc. you need trust level 1, you can get there by:

  • Entering at least 5 topics
  • Reading at least 30 posts
  • Spend a total of 10 minutes reading posts

Users at trust level 1 can...

  • Use all core Discourse functions; all new user restrictions are removed
  • Send PMs
  • Upload images and attachments
1 Like

Hi, @dovoaussie1
Welcome to the forum.

What is the difference?
Isn't in both cases the toggle in the ON position?

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:

Hi Tom,

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.

Hope that makes it clearer.

Welcome to the forum!
I have not checked everything in detail, but I can see a few things that you should check or rework.

  • The BJT's in the schematic are NPN, but you have put them in the high side, between VCC and the load. They should be in the low side, between the load and GND, or PNP ones. https://www.baldengineer.com/low-side-vs-high-side-transistor-switch.html
  • 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.

Thanks for taking the time and your excellent suggestions

  1. I will rework the transistors to low side
  2. The relay is a generic from amazon ... DIGISHUO 2pcs 5V 1 Channel Relay Module Relay Switch with OPTO Isolation High Low Level Trigger (2Pcs 5V 1 Channel Relay) : Amazon.com.au: Automotive
    If this is not a good option, what do you suggest? A different transistor?
  3. The DC converter is also off Amazon - DC 12v 24v to 5v Step Down Converter Regulator 5A 25W Power Adapter Reducer for Car Electronics Truck Vehicle Boat Solar System (Accept DC 8-40V Inputs) : Amazon.com.au: Electronics
    I am not sure if this is isolated, but I have presumed so.
  4. 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

Hi Jim,

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?

@dovoaussie1

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?

Also your relay is 5V not 12V, so there is no need for Q1 or Q2.

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.

  • If your BJTs are common emitter, they need a base resistor.

  • Suggest you draw the schematic in a more conventional way.

Why the double tap? I'm curious.

Seems simpler all aroubd to just turn it on if it was off and vice versa with single button presses.

a7

Hi,

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)

I think the big buttons leaders of nuclear bomb capable countries use for launching works that way too.

THX

a7

1 Like

Wanted to thank everyone for their input and valuable suggestions.