PDA

View Full Version : finger grounding



milindshastri
08-21-2006, 03:55 PM
Hi,
I am having a wierd experience. I have made a PIC16f877 for controlling a servo motor. The battery pack I am using is a 5*1.5V NiMH with an L7805 for a 5V output. When I hold both the terminals of the battery in my fingers and switch on the circuit, it works. But if I dont hold the terminals in my bare hands it gives arbit outputs. I have put a 22uF capacitor in parallel to the terminals. Does this have somthign to do with the 4.00MHz crystal I am using? Please suggest what the porblem could be and how to solve it. Thanks.

vikas
08-21-2006, 06:10 PM
Check for loose connections !

milindshastri
08-21-2006, 11:08 PM
ha...yah man...done that like a hundred times!
I dont think its because of the connections. I suspect it is because some amount of current flow is happening through my body...so its acting like a capacitor/resistor/both/something.....I dont know. Those are the best guesses I can come up with as a mechanical engineer. What say?

allbits
08-22-2006, 02:08 AM
if it works only when you hold it with your hands, lets not call "it works"
:wink:

There is something wrong, as Vikas said, most probable due to loose connections or soldering. Now try to get a strong connection by using a battery holder and soldering... check the GND connection.

docel
08-22-2006, 06:08 AM
1. 7805 needs 8V and above to regulate. The nimh is 1.2V.
2. Your 7805 is oscillating. Put a 1uFd TANTALUM cap + .01uFd from o/p pin to gnd AT THE 7805 ITSELF :!:
3. 10uFd + .1 ufd from the pic VSS to VDD pins. Better to connect on the pins directly at the bottom.

:!: .....why do you need a 7805 with 5 cells? You can put a series diode so that the pic sees 5.4V without it. :)

Supario
08-22-2006, 11:43 AM
I had a wierd problem when working with a PIC18F on a breadboard once. Something to do with the grounding. The PIC used to be always reset when disconnected from the computer. If I touched any earth wire or connected the earth bus to the metal plate under the breadboard or anything similar it would start running. Is this a known problem ?

docel
08-22-2006, 12:01 PM
This is a universal problem of wrong or absent bypassing. The signals can travel along the power lines superimposed on the DC into the ip/op pins. These spurious triggers multiply in a breadboard arrangement. The outputs will simply "Latch-Up " into a 'stable' state. (Or the outputs change state faster than the required signal@the spurious signal rate....)

The port lines are stupid and cannot differentiate your signals and unwanted self generated clocking signals :) CMOS in specific.
You can easily tame them by proper bypassing of the supply pins....AT THE PINS :!:
10ufd + .1ufd in parallel is the magic wand!

gyaanguru
08-22-2006, 04:35 PM
.....why do you need a 7805 with 5 cells? You can put a series diode so that the pic sees 5.4V without it


This is a universal problem of wrong or absent bypassing. The signals can travel along the power lines superimposed on the DC into the ip/op pins. These spurious triggers multiply in a breadboard arrangement. The outputs will simply "Latch-Up " into a 'stable' state. (Or the outputs change state faster than the required signal@the spurious signal rate....)

The port lines are stupid and cannot differentiate your signals and unwanted self generated clocking signals CMOS in specific.
You can easily tame them by proper bypassing of the supply pins....AT THE PINS
10ufd + .1ufd in parallel is the magic wand!


cud u explain this in detail???

milindshastri
08-22-2006, 07:33 PM
I think you guys are right . I am using a breadboard and the unsoldered connections definately mess around with the signals causing noise/fluctuations. I aslo think that I was getting arbit input signals to pins which we set as input but were not connecxted. So ive set all unused pins to output pins so that they dont takein any unwanted noise as signals. And the simple program is working quite fine now :D

10ufd + .1ufd in parallel is the magic wand!
'+' means the two capacitors are in series right ?

Vivek
08-23-2006, 10:42 PM
10ufd + .1ufd in parallel is the magic wand!

'+' means the two capacitors are in series right ?


Wrong.
Docel wrote parallel, and its not a typo.

Even if you go by "+" symbol, you need to connect capacitors such that they Add up.

(Please recall, Class nine/ten physics book i guess.)

docel
08-28-2006, 05:01 AM
Thanks Vivek!

1. The different value caps are for low and high frequency spurious signal/ noise/interference/switching transients. Tantalum caps are the best for low frequency and the cheap ceramic caps for the higher frequencies.

2. It is important to watch another parameter: Power supply!!
a) Use GOOD power supply. eg,. actual rating of a 1Apwr supply is abt 200ma ONLY :evil:
b) use a pwr sup 5v > than the 78xx ic. The manf. recommend is 3V>, but you have to be sure.
c) use a constant load resistor in parallel with a 1uFd tantalum cap across the pwr sup O/P. calculate Rload for 1/10th the transformer rating.
d: Use NiCd or NiMh for motors. They are low-R and provide good starting torque current. Note: they are 1.2V :!: :!:
e) Heat Sink: anything that draws >100mA.