Diode Help

Thread Starter

thevoodoochild

Joined Jan 14, 2011
21
Hi all who read this! I have built a nice little robot, it uses a pic 18f4550, I love this 8 bit chip. Its powered by two 3.5v lipo batterys. The microcontroller is powered by one battery & the motors are driven the second battery to seperate supplies. I am using an adc port to read the battery for the micro using internal vref & reading the battery on another adc port using external vref. This is for a battery monitor I can control in sw.
I have used capacitors across the adc to smooth out current drop by the motors. I need to use a diode before the capacitor to stop the motors from discharging my capacitor. My question: I have used a signal diode & this worked fine but dropped current & voltage so I tried a 1n4001 rectifying diode & noticed although it blocked power at one end as diode's do, when I put it infront the capacitor it let the motors discharge the capacitor? As if when letting voltage through it acted like a normal piece of wire?
I put a simple drawing sorry about the C for the capicitor & the dots.

+------------|>---- + -------
<to motor circuit....C..........to adc>
- ------------------- - --------
 
Last edited:

ErnieM

Joined Apr 24, 2011
8,377
My dear child: I love the 4550 too. It is aging quite well and always a good choice. I've used it several times.

When you say you are using an A2D converter so the PIC can monitor it's own supply voltage I get concerned: you can only do this if you route the CVref externally to Vref+. If you did so then great and congratulations.

I *think* I get what you are saying about the cap for reading the motor voltage. The motor is affecting the battery voltage when it draws (large) currents and you're looking to smooth this voltage out so the A2D can get a better look at it.

The big difference between a signal diode and a 1N4001 in this circuit is the signal diode will have much less reverse leakage current. That leakage is probably what is draining your cap.

I wouldn't use a diode there as it adds in a hard to predict voltage drop. I would instead use a resistor, so the R and C form a simple low pass filter. Then you'll see the average DC value. As the battery discharges relatively slowly you can give the RC a very low cutoff frequency.

A max resistor of 2.5K is required to keep the PIC A2D happy.

Aside: There are free programs out there to draw schematics. Ask around for good choices, but Eagle has a freeware package. I like the schematic editor in ExpressPCB as I can throw something down quickest in that.
 

Thread Starter

thevoodoochild

Joined Jan 14, 2011
21
Thank you Ernie, that makes sense to use a resistor. A qualified friend of mine said the 1N4001 works as a normal diode but I could clearly witness it does leak alot. I supose its more for rectifying. I am using switching regulators on both the micro & motor circuits. I took the vref off the output of the regulator @5v for the micro & all worked fine. What i'm thinking is using internal vref for all A2D channels but setting just one A2D port/channel for motor battery & external vref off the motor regulator. The regulators stay at their constant voltage.
 

Adjuster

Joined Dec 26, 2010
2,148
Unless you are working at extremely high temperature, the DC leakage current from a 1N4001 should still be too small (a few tens of microamps) to have much effect.

What may be more relevant is the very much larger self-capacitance and glacially slow reverse recovery of such an old rectifier device. IN4001 also has a pretty low breakdown voltage - only 50V. http://www.fairchildsemi.com/ds/1N/1N4001.pdf
 

Thread Starter

thevoodoochild

Joined Jan 14, 2011
21
Thank you for this valuble information. I am going to try a resistor instead of a diode & I am sure I can vref internal for the micro ADC's & set 1 ADC to read motor battery & set it external in software.
 

Thread Starter

thevoodoochild

Joined Jan 14, 2011
21
Hi Earnie, I'm using a 220 uf cap polorized & your right about I want to stop the current drop as the motors draw large. as it registers a low battery when its not low. @ 3.5 volts is 220 uf a good size for this & i'm not sure how to work this out in past its been trial & error.
 
Top