Author Topic: $50 Robot - Programming problems  (Read 1433 times)

0 Members and 1 Guest are viewing this topic.

Offline jaabotTopic starter

  • Full Member
  • ***
  • Posts: 52
  • Helpful? 0
$50 Robot - Programming problems
« on: May 10, 2009, 08:41:20 AM »

I am not sure where the best place for this post was, so forgive me if this is not the correct place. We have completed the circuit board and initial tests with the multimeter seems to indicate that things are connected properly. I have moved on to the step of programming with the first task being to upload the HEX file provided by admin to modify the servos. I tried it on my laptop first using the recommended software (what I read, I guess I have the cheap method, I did not buy the $35 programmer, but now since I already built the board with two five pin headers, it is too late). I am using PonyProg to upload the code. On my laptop, as everyone indicated with a USB converter cable it was SLOW. It did complete and say it was successful eventually. However, nothing happened. The servo did not budge. I moved to a desktop PC with a serial port and tried again. Same result. Progress bars in PonyProg indicated success, but nothing.

I am using the battery pack and 9v combination.

The second time I went right to PonyProg to open the provided HEX. It did not seem I needed to go into AVR Studio at all? Is this correct? 

Do I have to have both servos connected? I have been connecting only one on pin PD0.

Am I supposed to zero out the servo before or after I open it up? I have one open and one not. I tried each one. Nothing either time. ****update**** The one I had open, I did not take out the correct gears before powering up. Following the steps more carefully as I indicate below, yielded much better results.

Is the voltage regulator polarized? While I do get a 9v reading on the battery side and a 5v reading on the other side, I think I revered the input and out put wires on opposite sides of the voltage regulator. (I do have ground in the middle). Seems to be OK from multimeter readings, but just want to be sure this isn't my problem. ****update**** Based on my current results, I suspect that I may be OK here, but I am still curious if having reversed these two wires is a problem.

I know I have questions here that span all the forums. My apologies. Any assistance is appreciated.


I have made some progress. I have scoured many posts here and one poster mentioned something about using different pins to connect the servos. I thought this couldn't hurt so I tried it. I connected one servo to pin PD1 instead of PD0. Also, I found this  post on modifying the servos with an excellent set of photos. After plugging in the servo on the new port, and walking through the steps in the above post, I was successful in modifying my first servo! Si it appears that I did upload the code correctly, I think what I was doing wrong was that I had not yet opened the servo and removed the gears indicated in the post above. When I followed his steps carefully, everything went perfectly.

I am saving the second one to do with my son. Guess I will use trial and error to find the best port to plug the second one in. Question: since we used five pin headers here, is it theoretically possible to connect up to five servos to this board?

I am going to try pin PD0 again, thinking that maybe the first time my failure had more to do with not following the steps carefully and not having the servo open rather than a problem with pin PD0. We'll see how that goes. If it turns out that pin PD0 does not work, should I check my soldering or just use pin PD2?

Thank you very much.
« Last Edit: May 10, 2009, 10:31:38 PM by jaabot »

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,121
  • Helpful? 108
Re: $50 Robot - Programming problems
« Reply #1 on: May 24, 2009, 07:25:34 PM »
Now you've got the servo modified correctly then try putting it back onto pin PD0.

I'm sure it will be ok. If not then you may have a soldering problem to this particular pin. Since you know the servo works on PD1 then 'why wouldnt it work - coz PD0 is bad'.

Good to see you fixed your own problem - that's learning  :D

Webbot Home:
WebbotLib online docs:
If your in the neighbourhood:

Offline jaabotTopic starter

  • Full Member
  • ***
  • Posts: 52
  • Helpful? 0
Re: $50 Robot - Programming problems
« Reply #2 on: May 24, 2009, 08:02:34 PM »
Yes, we got both servos working and they do indeed work on PD0! Now just trying to get the sensors working properly. Thanks.


Get Your Ad Here