Author Topic: MCU GPIO Pin Voltages Question  (Read 3299 times)

0 Members and 1 Guest are viewing this topic.

Offline krichTopic starter

  • Robot Overlord
  • ****
  • Posts: 165
  • Helpful? 0
MCU GPIO Pin Voltages Question
« on: November 09, 2007, 02:40:55 PM »
I'm trying to track down the cause of some rather epileptic servo behavior in my $50 robot.  I'm using the two battery scenario with a 4xAA pack and a 9V battery.

I've checked voltage between Vcc and ground for my ATmega8 and it checks out at 4.99V.  Cool.

I've checked voltage between Vcc and ground for the servos and it checks out at 6.12V.  The tutorial says I should be at ~4.8V, assuming 1.2V rechargeables.  I'm using regular Duracell 1.5v AA batteries.  Is this a problem?  Should I lower the voltage by pulling a battery or stop being dumb and just go buy some rechargeables?

I'd like to check the voltages on the GPIO pins on the ATmega8 (specifically the PortD pins), but I'm not sure what they should be at any given time.  I've written a program to set them to output and then toggle the IO pins high, then low, then high, then low, ad infinitum.  The voltages are all over the place for most of the pins.  Some are steady at 2.7V, others 3.4V, some change somewhat randomly (although I think I see a general high/low trend as if my program might actually be working).  I'm guessing this large amount of irregularity is what is causing my servo jerkiness.

What voltage SHOULD I see when the pin is high for a long period of time?

I need an oscilloscope to see what's really going on, but I don't have one.  I'll be resoldering the whole thing because the one thing I am confident in is my lack of soldering skills.  Even though I tested my joints to be sure they weren't connected to their neighbors, I'm sure I've got major cold joints and other such foolishness going on.

Offline bulkhead

  • Full Member
  • ***
  • Posts: 102
  • Helpful? 0
Re: MCU GPIO Pin Voltages Question
« Reply #1 on: November 09, 2007, 03:44:50 PM »
Usually rechargeable batteries' voltage is higher than their rating when there is no load.  Try measuring it when the battery is connected to a motor or something.  I'm not sure exactly what circuit is being used, but most servos are designed to work from 4.8 to 6.0V.

I don't really understand what toggling the pins does.  If the pins are toggled fast enough they will have a certain average voltage between low (0V) and high (?.? V).

I use my spare propeller microcontroller as a 30 channel 80MHz LSA for debugging with this application: http://mydancebot.com/products/viewport/ and it works pretty well.


Get Your Ad Here