New Circuit board problems

Thread Starter

jtmgems1

Joined Jan 30, 2011
7
I am trying to get a circuit board made that will run a small DC motor. I don not know anything about boards or circuits so bear with me, please.
The board control a process that starts with a sensor sensing water presents by shorting two wires. These wires go to the board where there is a PIC #PIC16F1827-L/P from Microchip corp. The PIC is in sleep mold to reserve power but draws some extremely small amount of power, but when the sensing wires sense water the Pic wakes using up to 5 volts of power and at the same time activates a MOSFT to ground the motor and turn on. (I will attach Schematic for viewing.) The motor is 3 to 5 volt but a stall rating of 2100ma so it does not get enough power on 3 AA batteries, when we change to 4AA its too much power for the PIC.
The problems are:
1. Something is draining the batteries of several hours, not by much but enough that the motor will not run unless batteries are new.
2. With out touch any thing the motor has just started up, no sensing wire touched (The motor is mounted on an aluminum rod next to board the board is in plastic housing.)
3. any design changes would help and I am open to other components.

Thanks for help coming in advance.:D
 

Attachments

nerdegutta

Joined Dec 15, 2009
2,684
Hi, and welcome.

So you want the sensor to wake the PIC up, and drive the motor for some time?

And after that, you want it to go back to sleep?

Do you have everything assembled, and the problem is that the batteries dies?

Could it be a software issue?

Could you use a transistor instead of the MOSFET?

Could you do this with a 555 timer IC?

Do you have high res pictures?
 

beenthere

Joined Apr 20, 2004
15,819
That IRF520 is drawn backwards. The source should go to ground, with the motor in the drain circuit. With the IRF520 in backwards, there will be continuous conduction through the FET's intrinsic diode. That is probably what is draining the battery.

At best, the FET is just barely going to conduct. The output from the PIC is barely enough to get it going. The best bet would be to use a logic level FET that will turn on with only 5 volts on the gate. An IRF520 takes 10 volts to fully conduct.

You don't seem to use a voltage regulator, so the PIC is probably at the limit of the Vcc it can withstand.
 

Thread Starter

jtmgems1

Joined Jan 30, 2011
7
Yes drive the motor for 2 seconds and turn off and go to sleep.
I have everything assembled and I test the system it works, leave it for a day and there is not enough power to run motor without replacing batteries.
High res pictures of the system?
and I will have to ask about the 555 timer IC and yes maybe on the resistor.

The schematic shows the positive wire from the battery going straight to motor and the negative trough the MOSFT should it be the other way, the positive through and the negative direct to motor?
 

kubeek

Joined Sep 20, 2005
5,795
I think that you could use a transistor circuit to start the motor, which will definitely take less power than a sleeping uC. A 555 in monostable mode and a few fets will do the trick and use no power until the the water reaches the wires.
 

Thread Starter

jtmgems1

Joined Jan 30, 2011
7
I have a guy who knows more than me about circuits and I am going to have him look too so if the delay happens please bear with me. I have the idea for the circuit he puts it together.

I thank you and I will give these suggestion to him and I think this will help. I am grateful for the help, for sure!
 
I was looking into the questions. The power MOSFET was connected so that the drain was tied to the motor, the gate is tied to the output of the pic, and the source is grounded. The transistor acts as a switch to ground which controls the current flow through the motor. My experience is limited with 555 timers. I have tested the circuit using the RB5 input as a change on interrupt input. The motor runs for 3 seconds and then stops. The issue that I can not seem to get past is providing enough drive current to surpass the 2.1Amps required by the motor used in the application. I would be open to suggestions on how to rectify this issue.
 

Thread Starter

jtmgems1

Joined Jan 30, 2011
7
Hi guys aaronvanduerm is the one helping me on this circuit, thanks for the help again, oh we also get battery drain over day or several hours that we can't acount for because power draw from th pic is 20uA
 

SgtWookie

Joined Jul 17, 2007
22,230
The IRF520 has a body diode; if the MOSFET were installed backwards as shown, the body diode would conduct current continuously.

A 7805 regulator presents a constant ~5mA current draw on the input, even if the output current is zero. Therefore, a 7805 regulator is not a good choice for a battery powered application, nor would most other linear regulators.

Basically, when you have a battery powered circuit, you want the standby current, if any, to be extremely small. Otherwise, you will spend a lot of money on batteries.
 

SgtWookie

Joined Jul 17, 2007
22,230
Just another thought; since your load will be heavy for a short period of time, you may wish to add a fairly large capacitor (say, 1,000 to 5,000 uF) in parallel with your batteries. Batteries have an internal resistance which increases as the batteries become discharged. Having a large cap in parallel to handle the large transient of the motor starting up will help to minimize power losses in the batteries themselves.
 

thatoneguy

Joined Feb 19, 2009
6,359
Have you measured the voltage going to the PIC? It should keep running down to 3V input, some down to 2.5v even. The MOSFET gate level is a different story though.

Try using 4 AA batteries with a 0.6v dropping diode to power the PIC, and using the full 6V for switching the motor. Ensure the PIC supply doesn't go over 5.5v, use 2 diodes if needed.

Using a 7805 or other 5V regulator for the PIC wouldn't work if the voltage is sagging with the motor on, the dropout is too high. A Low Dropout 3.3v regulator may work, but again, the gate voltage on the MOSFET is an issue, it may be the issue now. The IRF520 needs a 10V Gate-Source voltage to be "fully on". With 5V Vgs, the IRF520 is in the triode region/higher resistance operating area, not like a switch.

When the motor is running, what is the measured current with no load and full load?

What is the measured Vgs and Vds (Gate Source Voltage, and voltage drop across the MOSFET) when the motor is running?

Assuming the MOSFET is placed the correct way around (source to ground for N-Channel), and Vgs is 5V or 0V, the MOSFET won't be turning on fully, unless you switch to a "Logic Level" gate mosfet, such as the IRFLZ44
 
Hey All,
I am planning on implementing a 555 timer circuit to drive the motor in monostable mode. Does anyone have any ideas as to separate the timer from the voltage supply in the sensor circuitry? I am thinking about using a darlington pair in series with the circuit where the collector is tied to Vdd and the first probe, the base is tied to the second probe and grounded through a resistor, and the emitter is tied to the input of the 555 timer circuit. Has anyone tried this type of sensor interface with success? I appreciate any feedback I can get on this. The idea is that once the probes touch the water, the circuit will turn on and the 555 timer will start it's cycle.
 
Last edited:
Top