Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Detect 12V Pump run with Microcontroller

Status
Not open for further replies.

mgordon

Newbie level 5
Joined
Dec 26, 2010
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,350
Hey All,

I've been tinkering with microcontrollers for a few weeks, my background in programming means I'm comfortable with tha side. Its the electronic side that is challenging me.

I have a small project on the go that uses a microcontroller to monitor the run-time of a 12volt pump. The pump draws about 2A @ 12Volts. Its switched on via a float switch that is simply connected in series with the pump.

I've been racking my brain on how best to interface my microcontroller to the existing pump circuit. I would like the interface to be as simple as possible and am really trying not not disturb the existing pump circuit too much.

I had a good read about relays and optocouplers but these would fry at 2A, and it seems like a difficult approach. I have also had a really good read about current sensors, I like the idea of the MAX4173 as it would simply sit inline and monitor the current draw (which is a good indication that the pump is running).

The problem is that I'd really just like a 1 or a 0, is there a simple way to obtain a logic output from the existng pump circuit without disturbing much?
 

I'm a little confused, it looks like that driver is using a low voltage to drive high voltage?

I need the reverse of that though dont I?
 

Keep a suitable driver between controller and motor which can withstand and deliver 2A to motor.
try L298P suits your requirement

L298P Datasheet pdf - DUAL FULL-BRIDGE DRIVER - SGS Thomson Microelectronics
I think mgordon is trying to just monitor the ON-times of the pump, not trying to control the pump.

mgordon,
Is the 12v DC or AC? If DC, can you connect the common on the microcontroller to the common (-) of the pump supply? If so all you need is a voltage divider (2 resistors) across the pump motor to step the 12VDC down to 5VDC logic level. And, maybe a couple for back biased protection diodes on the input.

Ken
 

Its a DC pump, however the power supply for the microcontroller is seperate.

Am I still allowed to connected the two commons?
 

If the micro is running off of a separate, isolated, 5v DC supply, then a qualified yes. Is the micro attached any other devices?

Ken
 

Is the micro attached any other devices?

Well yes, but more of the same really, just a few pumps, and a voltage divider that breaks down the 12volt for the microcontroller's ADC to monitor. The Micro is attached via Serial to a GPRS modem that is also reporting this data.
 

Well yes, but more of the same really, just a few pumps, and a voltage divider that breaks down the 12volt for the microcontroller's ADC to monitor. The Micro is attached via Serial to a GPRS modem that is also reporting this data.

"Just a few pumps"? Are they all in parallel, with individual switches, off a single 12VDC supply? Will each pump feed an individual input on the microcontroller? Is the GPRS modem on it's own isolated DC supply? Can it's common be connected to the pump's supply common?

Ken
 

Wire an opto-couper's diode across the pump motor with a 1k resistor in series (check polarity). Now when the pump has volts on it the opto diode "light up" and the output transistor switched on. Connect the transistor to your micro controllers input with a 1k resistor to its + supply. and the transistors emitter to its earth.
Frank
 

"Just a few pumps"? Are they all in parallel, with individual switches, off a single 12VDC supply?

Yep, all technically seperate circuits but a common power supply.

The GPRS modem is powered from the same source as the Micro.

Its got me leaning towards a voltage regulator and a common power source, this would solve alot it would seem.

The opto coupler is a terrific idea - however the motors and float switches are not really exposed, all I have to work with in terms of pump circut contact is the supply feed back at the battery (for each pump circuit).

Would an opto coupler still work in this configuration?
 

No, not directly. The next easiest way would be to put a low value resistor in series with the pump circuit, such that you get > .8V drop across it when the pump runs. Use this voltage to switch a transistor which drives current through the opto isolator, again power this transistor from the pump supply. If the pump(s) current take is variable, connect a pair of silicon diodes across this resistor(watch polarity). now with the pump current less then 1mA the transistor will be off, at moderate current (.01 - 2A) the drop will be .8V, with pump currents greater then this the volt drop will be less then 1.6V, because the diodes take the excessive current.
Frank
 

No, not directly. The next easiest way would be to put a low value resistor in series with the pump circuit, such that you get > .8V drop across it when the pump runs. Use this voltage to switch a transistor which drives current through the opto isolator, again power this transistor from the pump supply. If the pump(s) current take is variable, connect a pair of silicon diodes across this resistor(watch polarity). now with the pump current less then 1mA the transistor will be off, at moderate current (.01 - 2A) the drop will be .8V, with pump currents greater then this the volt drop will be less then 1.6V, because the diodes take the excessive current.
Frank

Hey Frank,

I'm having avery hard time visualising why a transistor would be needed and how exactly it connects to the resister in series - can you help?

Also, How would I wire the Diodes?
 

Lets presume some vaules, I pump = 2A, R = 1 ohm, Vpump supply = 12V. When the pump is running the voltage at the "pump" end of the resistor is 12- (2 X 1) = 10V. If you connect a PNP transistor (emitter to PSU end of R and base, via 1K to pump end), its base is now negative of its emitter, so it turns on (short circuit between emitter and collector) this drags current through the opto diode and a 1K resistor back to the positive line. The opto transistor is short circuit and can put a "0" onto the micro. when the pump is off, there is no voltage drop across the 1 ohm resistor, so the PNP's base voltage is the same as its emitter voltage so the transistor is "off" and no current is drawn through the opto. Suppose your pump decides to draw 10 A ( or try to!), with a one ohm resistor, this would severely limit its current, but if you connect a diode( anode to PSU) then another one ( anode to first diode's cathode and cathode to pump). the diode will take the extra current and the voltage drop across them will be limited to 1.6V, i.e. the pump will get 12-1.6 = 10.4V.
Frank
 
  • Like
Reactions: mgordon

    mgordon

    Points: 2
    Helpful Answer Positive Rating
    V

    Points: 2
    Helpful Answer Positive Rating
Thanks so much Frank..... I had no idea that you could redirect a portion of hte voltage like that.

Thats awesome!!
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top