Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: Andrummist on March 24, 2011, 07:43:28 PM

Title: $50 robot help
Post by: Andrummist on March 24, 2011, 07:43:28 PM
I have completed my board using an ATMEGA168 and was able to successfully program it. The problem is that I used the hex file to center the servos (to modify them) and the servos do not turn at all. I have the top off of the servo so the gears should be spinning freely. I have checked and double checked my circuit board using my multimeter and everything seems to check out. I am using the separate 4 AAA battery supply for the servos, yet the voltage is fine. I programmed the board with a while loop to light the LED and that seemed to work.  I'm not sure where to go from here so any suggestions would be stellar.
Title: Re: $50 robot help
Post by: voyager2 on March 24, 2011, 08:53:55 PM
Are the Gnds (negative wires) connected together on your battery's?
In order to have two battery's you MUST connect the Gnds together!
Title: Re: $50 robot help
Post by: Andrummist on March 25, 2011, 08:53:48 AM
Yes they are.

Are the Gnds (negative wires) connected together on your battery's?
In order to have two battery's you MUST connect the Gnds together!
Title: Re: $50 robot help
Post by: Soeren on March 25, 2011, 08:38:07 PM
Hi,

The easiest way to locate if the fault is in the servo or in the controller, is to probe the servo signal with an oscilloscope.

If you have no way of getting access to a 'scope, a rough indicator can be made with an LED, a resistor and some connection wire.
Title: Re: $50 robot help
Post by: Andrummist on March 27, 2011, 09:56:16 PM
Thank you for the suggestion. I've found that the Photovore_v1 is correctly driving the servos, though hold_servo.hex does not. So I think my microcontroller is working correctly. Is it possible that the hold_servo code does not work correctly on atmega168? Seems like it should.

... a rough indicator can be made with an LED, a resistor and some connection wire.