Searching \ for ' [EE] Servo control w/PIC16F84' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/ios.htm?key=servo
Search entire site for: 'Servo control w/PIC16F84'.

No exact or substring matches. trying for part
PICList Thread
'[PICLIST] [EE] Servo control w/PIC16F84'
2001\02\10@191531 by Robert Shady

picon face
Okay, I've gotten the code done, but now
I am seeing something very interesting.

I'm running my code against a scope, and
everything looks beautiful... Then..

If I power the circuit & the servo from
the same +5V power supply, things work
okay for a minute but then the 16F84
"locks" (sorry for the technical term,
but I'm really not sure what happens,
it just quits running my code).

If I power the servo seperately from
the circuit, the servo continuously
rotates (still watching the scope, the
signal is perfect).

If I power the servo seperately, but
connect the grounds of the two power
supplies together, things work okay
for a minute and then the 16F84 "locks".

I've tried the servo signal wire directly
into PORTB/0, through a resistor to PORTB/0,
through a diode to PORTB/0, through a
resistor and a diode to PORTB/0, all with
the same results...

Does anybody have any ideas??  This one is
really stumping me.

I've checked power power supplies, voltages
are correct (+4.9V) and the signal looks
clean.  I have tied MCLR & VDD to +5V, and
VSS to GND.

-- Rob



__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year!  http://personal.mail.yahoo.com/

--
http://www.piclist.com hint: To leave the PICList
spam_OUTpiclist-unsubscribe-requestTakeThisOuTspammitvma.mit.edu


2001\02\10@220115 by Dale Botkin

flavicon
face
Robert,

You'll probably find the servo is causing enough power supply disruption
to the PIC to cause it to fail.  If you don't have plenty of decoupling
caps on the PIC and the servo, you'll need them.  A better approach is to
keep the power supplies separate if you can.  If you're running on battery
power this is especially true, and if you're using a DC power supply that
can't keep up with the servo's current spikes you're bound to have
trouble.

A servo can draw a surprising amount of current.

Dale


On Sat, 10 Feb 2001, Robert Shady wrote:

{Quote hidden}

---
The most exciting phrase to hear in science, the one that heralds new
discoveries, is not "Eureka!" (I found it!) but "That's funny ..."
               -- Isaac Asimov

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamKILLspammitvma.mit.edu


2001\02\11@003507 by Robert Shady

picon face
I understood that to be true (to make
matters worse, I'm driving two giant
1/4 scale servos (343 oz/in of torque)
which draw 800ma each, so I'm sure that
probably has something to do with it..

However, when I drive the servos seperate
from the circuit is when I am seeing the
problem of them rotating on their own.

I have noticed if I use two seperate power
supplies, and tie the grounds together
everything does appear to work fine.

Also, how & what do I couple anything anywhere?
I'm only using a single 30k cap between GND
and +5V on the power regulator.  I've also heard
of people doing wierd things with their clocks
as well, I'm running a 20 Mhz XTAL with 2 33k
caps (1 on each lead) to GND.

Any suggestions for making this circuit more
well rounded?

Thanks!

--- Dale Botkin <.....daleKILLspamspam.....BOTKIN.ORG> wrote:
{Quote hidden}

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year!  http://personal.mail.yahoo.com/

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\02\11@014653 by Dale Botkin

flavicon
face
> I understood that to be true (to make
> matters worse, I'm driving two giant
> 1/4 scale servos (343 oz/in of torque)
> which draw 800ma each, so I'm sure that
> probably has something to do with it..

Yeah, I'd say that would be a safe bet.  My problems *mostly* went away when
using a 2.5A linear power supply, but the PIC would still have problems
occasionally until I just fed the servos separately.

> However, when I drive the servos seperate
> from the circuit is when I am seeing the
> problem of them rotating on their own.
>
> I have noticed if I use two seperate power
> supplies, and tie the grounds together
> everything does appear to work fine.

Yes, you've got to have a common ground.  Since the servo references the
incoming pulse signal to ground, if the servo ground is not the same as the
PIC ground you're bound to have trouble.

> Also, how & what do I couple anything anywhere?
> I'm only using a single 30k cap between GND
> and +5V on the power regulator.  I've also heard
> of people doing wierd things with their clocks
> as well, I'm running a 20 Mhz XTAL with 2 33k
> caps (1 on each lead) to GND.
>
> Any suggestions for making this circuit more
> well rounded?

I'd suggest a decoupling cap on the order of .1uF to 1uF located close to
the PIC (like connected directly to the PIC power and ground pins), and a
larger one (maybe 10uF or larger) across the servo ground and +V.  I don't
think you could get too large a cap across the servo.  The idea is for the
cap to smooth out spikes in the power supply caused by the servo's current
spikes.

As for the xtal, a couple of smallish caps between the xtal pins and ground
are recommended for reliable starting of the oscillator; check the PIC
datasheet for all the gory details.  I seldom use them and have never had a
problem with an oscillator starting, but I may just lead a charmed life.
The only weird thing I've heard of people doing is using faster xtals than
the PIC is rated for.  I've tried it just for the heck of it, my -04 part
ran fine at 10MHz, but I figure why bother then the -10 part is so cheap.

Dale

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\02\11@032535 by David VanHorn

flavicon
face
>
>I have noticed if I use two seperate power
>supplies, and tie the grounds together
>everything does appear to work fine.

Umm... You always have the grounds tied, right?


>Also, how & what do I couple anything anywhere?
>I'm only using a single 30k cap between GND
>and +5V on the power regulator.

If that means 30pF, that's a problem  100,000pF is more typical.


--
Dave's Engineering Page: http://www.dvanhorn.org
Where's dave? http://www.findu.com/cgi-bin/find.cgi?kc6ete-9

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\02\11@111848 by Thomas McGahee

flavicon
face
For the ultimate in isolation, use totally separate power
supplies (no common ground), and optoisolators to couple
the PWM signals.

Fr. Tom McGahee

{Original Message removed}

2001\02\12@170926 by Peter L. Peres

picon face
>Does anybody have any ideas??  This one is
>really stumping me.
>
>I've checked power power supplies, voltages
>are correct (+4.9V) and the signal looks
>clean.  I have tied MCLR & VDD to +5V, and
>VSS to GND.
>
>-- Rob

To make absolutely sure that the code is perfect temporarily connect the
servo through an optocoupler and use separate supplies. The most likely
reason for failure is spikes travelling in the ground line. Try to run the
two devices from separate supplies (note: totally separate supplies, like
two battery packs, not a benchtop supply with two sections), and connect
increasing resistors between both the grounds and the signal line to the
servo. You should be able to increase to about 2K each without problems.
The servo should not do this anyway, so maybe just try another servo.

hope this helps,

Peter

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


More... (looser matching)
- Last day of these posts
- In 2001 , 2002 only
- Today
- New search...