2

Author Topic: $50 Robot Circuit  (Read 1327 times)

0 Members and 1 Guest are viewing this topic.

Offline jp1390Topic starter

  • Jr. Member
  • **
  • Posts: 19
  • Helpful? 0
$50 Robot Circuit
« on: September 06, 2010, 08:18:26 PM »
Hello, just trying to get some help with my robot. I finished soldering everything and would just like to know if my readings on voltages are correct.

Here is what my circuit looks like, sorry for the quality:

Top


Bottom


The red and black wires on the right side are for the 4xAA battery holder. The 9V battery connects to the bottom right hand small red wire and middle ground wire beside that.

I'm getting now 5V at the servo bus and 4.94V at the sensor bus. Does that sound right? I'm following what the .pdf schematic provided. When connected to the programmer (AVRISPmk2), microcontroller (ATMEGA168), and servo (HS-311) and running the .hex centering file provided in the servo tutorial, nothing happens. Interestingly enough, if I short the transistor leads (middle with either of the outer leads), the servo kind of rotates for a millisecond.

Any ideas or help with the readings that I'm getting? I did connectivity checks on my circuit and everything is setup properly, just I may have messed up the regulator's leads (soldered in backwards or ruined the leads).

Thank you,
JP

Any suggestions?

Offline Metal Slug 2

  • Supreme Robot
  • *****
  • Posts: 333
  • Helpful? 11
Re: $50 Robot Circuit
« Reply #1 on: September 06, 2010, 09:12:33 PM »
Here is a picture from when I built my $50 robot board:



Maybe u can use that and compare to your own to try to see what the problem is.
« Last Edit: September 06, 2010, 09:13:59 PM by Metal Slug 2 »

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: $50 Robot Circuit
« Reply #2 on: September 06, 2010, 09:21:07 PM »
Hi,

I'm getting now 5V at the servo bus and 4.94V at the sensor bus. Does that sound right?
Yes.


[...] running the .hex centering file provided in the servo tutorial, nothing happens.
If you have access to a 'scope (or know someone that has), measure the signal lead of the servo - it should carry pulses of 1.5ms each 20ms approximately.


Interestingly enough, if I short the transistor leads (middle with either of the outer leads), the servo kind of rotates for a millisecond.
If you by "transistor" mean the voltage regulator, stop doing that immediately!
Why do you think shorting components will help anything?  It's the safe route to destroying them!

Your servo will almost allways jitter a bit when powered and when you short circuit your voltage regulator (you naughty kid, slap yourself  ;)), you make a power down and power up (at least until you kill the regulator), hence a little jitter.
The reason it doesn't do anything besides it could be that it is centered properly and the 1.5ms pulses should keep it that way.
Try loading another program that actually moves the servo.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline jp1390Topic starter

  • Jr. Member
  • **
  • Posts: 19
  • Helpful? 0
Re: $50 Robot Circuit
« Reply #3 on: September 06, 2010, 09:28:24 PM »
Here is a picture from when I built my $50 robot board:



Maybe u can use that and compare to your own to try to see what the problem is.


Wow, nice soldering work! Looks the same to me, just not sure about my regulator positioning. Did I solder it in backwards? I mean to say, looking at the top view, are the leads in the correct position?

Thanks for the reply!

Offline jp1390Topic starter

  • Jr. Member
  • **
  • Posts: 19
  • Helpful? 0
Re: $50 Robot Circuit
« Reply #4 on: September 06, 2010, 09:32:03 PM »
Hi,

I'm getting now 5V at the servo bus and 4.94V at the sensor bus. Does that sound right?
Yes.


[...] running the .hex centering file provided in the servo tutorial, nothing happens.
If you have access to a 'scope (or know someone that has), measure the signal lead of the servo - it should carry pulses of 1.5ms each 20ms approximately.


Interestingly enough, if I short the transistor leads (middle with either of the outer leads), the servo kind of rotates for a millisecond.
If you by "transistor" mean the voltage regulator, stop doing that immediately!
Why do you think shorting components will help anything?  It's the safe route to destroying them!

Your servo will almost allways jitter a bit when powered and when you short circuit your voltage regulator (you naughty kid, slap yourself  ;)), you make a power down and power up (at least until you kill the regulator), hence a little jitter.
The reason it doesn't do anything besides it could be that it is centered properly and the 1.5ms pulses should keep it that way.
Try loading another program that actually moves the servo.


Ah, I meant regulator, that slipped out. I was just talking voltage readings and accidentally shorted the leads and it moved, so I wasn't sure if the .hex program was running and something was disconnected. I rotated the servo all the way to one 90 degree rotation to make sure it would have to center to something, but it didn't budge. Is there another .hex file I could try this out for? Also, looking at the top view, did I solder the regulator leads in the opposite way?

Thanks again for the reply, I appreciate it!
JP

Offline Metal Slug 2

  • Supreme Robot
  • *****
  • Posts: 333
  • Helpful? 11
Re: $50 Robot Circuit
« Reply #5 on: September 06, 2010, 09:47:20 PM »
Thanks :)... I only wished I used a thinner wire when I made the board, 22 AWG is much to large.

The voltage regulator seems to be connected the proper way (at least ground and output are).  But is the voltage regulators Input (the pin with the short red wire) connected to anything? From the picture it looks like the pin goes to the red wire and then is just soldered to a random spot...
« Last Edit: September 06, 2010, 09:48:53 PM by Metal Slug 2 »

Offline jp1390Topic starter

  • Jr. Member
  • **
  • Posts: 19
  • Helpful? 0
Re: $50 Robot Circuit
« Reply #6 on: September 06, 2010, 10:14:02 PM »
Thanks :)... I only wished I used a thinner wire when I made the board, 22 AWG is much to large.

The voltage regulator seems to be connected the proper way (at least ground and output are).  But is the voltage regulators Input (the pin with the short red wire) connected to anything? From the picture it looks like the pin goes to the red wire and then is just soldered to a random spot...


Yeah 22 AWG is so hard to use! Plus, how do you keep the soldering iron from getting dull and rounded. It made the closer connections tougher :(.

Btw here is a paint drawing I made to clear-up the connections I made, since the picture I took is bad quality:


Offline jp1390Topic starter

  • Jr. Member
  • **
  • Posts: 19
  • Helpful? 0
Re: $50 Robot Circuit
« Reply #7 on: September 06, 2010, 10:38:22 PM »
Think I should just de-solder everything and start over? I just need to know if the pdf schematic is a legitimate circuit for this robot though for the 9V battery and 4xAA battery holder combo with an ATMEGA168 MCU and AVRISPmk2 programmer...

Offline Metal Slug 2

  • Supreme Robot
  • *****
  • Posts: 333
  • Helpful? 11
Re: $50 Robot Circuit
« Reply #8 on: September 06, 2010, 10:44:17 PM »
The roundedness you get at the end of a soldering iron is usually due to keeping the soldering iron on for long periods of time (in excess of 2 hours), or forgetting to clean the soldering iron tip.

Your wiring is good for the 5V regulator, so i really dont know what could be the problem  :-\
Maybe, under worst case scenario, your chip is kaput...fried.

Offline Metal Slug 2

  • Supreme Robot
  • *****
  • Posts: 333
  • Helpful? 11
Re: $50 Robot Circuit
« Reply #9 on: September 06, 2010, 10:46:49 PM »
Ah, you mentioned the Atmega168...did you compensate for the upgraded chip in your code?  That might be your problem

Heres a link: http://www.societyofrobots.com/step_by_step_atmega168_swapout.shtml

Offline jp1390Topic starter

  • Jr. Member
  • **
  • Posts: 19
  • Helpful? 0
Re: $50 Robot Circuit
« Reply #10 on: September 06, 2010, 10:52:54 PM »
The roundedness you get at the end of a soldering iron is usually due to keeping the soldering iron on for long periods of time (in excess of 2 hours), or forgetting to clean the soldering iron tip.

Your wiring is good for the 5V regulator, so i really dont know what could be the problem  :-\
Maybe, under worst case scenario, your chip is kaput...fried.


The ATMEGA168 fried maybe? Is there a way to check that out? I didn't even upload a robot programming code to it, I just uploaded this .hex file: http://www.societyofrobots.com/downloads/hold_servo.hex so I could center the servos :S

I didn't change anything in the centering hex file to compensate for the ATMEGA168
« Last Edit: September 06, 2010, 10:54:21 PM by jp1390 »

Offline Metal Slug 2

  • Supreme Robot
  • *****
  • Posts: 333
  • Helpful? 11
Re: $50 Robot Circuit
« Reply #11 on: September 06, 2010, 11:10:08 PM »
Try uploading the atmega168 upgraded code for the $50 robot to your robot with only one servo plugged in.  Tell me if you can successfully program the chip, and if the servo moves.

I don't know if not using an atmega8 would have any effect on the servo centering code, sorry.

Offline jp1390Topic starter

  • Jr. Member
  • **
  • Posts: 19
  • Helpful? 0
Re: $50 Robot Circuit
« Reply #12 on: September 06, 2010, 11:13:30 PM »
Try uploading the atmega168 upgraded code for the $50 robot to your robot with only one servo plugged in.  Tell me if you can successfully program the chip, and if the servo moves.

I don't know if not using an atmega8 would have any effect on the servo centering code, sorry.

Okay, I'm going to try this in the morning and report back as I'm getting sleepy. Thank you for helping me out, I appreciate it. Also, was the $50 robot your first robot project and how experienced in it are you now?

Night,
JP

Offline jp1390Topic starter

  • Jr. Member
  • **
  • Posts: 19
  • Helpful? 0
Re: $50 Robot Circuit
« Reply #13 on: September 07, 2010, 02:51:47 PM »
Okay, sorry for the delay but I'm tackling this problem as we speak.

Couple things I need to mention:

1) In AVR Studio 4.0, under the Main tab I have selected "ATMEGA168" but there are a couple ATMEGA168's (P, PA, etc...), my MCU is the "ATMEGA168V-10PU", which should I be selecting?

2) I noticed that the LED is not blinking or seeming to be on?

EDIT: I think I'm going to de-solder the led and flip it, after reading a couple threads this seemed to be a problem for most and might be why my LED isn't lighting up or delivering power to my MCU... It may even be fried...
« Last Edit: September 07, 2010, 03:34:11 PM by jp1390 »

Offline Metal Slug 2

  • Supreme Robot
  • *****
  • Posts: 333
  • Helpful? 11
Re: $50 Robot Circuit
« Reply #14 on: September 16, 2010, 04:29:31 PM »
Hey jp1390, sorry for the really late reply...

The $50 robot was my first "real" robot in my opinion.  When I built it (January 2009), I had just finished off a computer engineering course at school where I got to build a Robot with a Lego NXT Mindstrorms Kit.  My first Lego Robot was called "Moosebot"... and so technically the $50 robot was my second robot.
As to my experience with robotics, I would say its moderate.  Although for the last little bit I've strayed away from using AVR Studio and plain C to program robots and have been experimenting with a roboduino and the Arduino software.  I think I'm going to buy an axon soon though and get back into using AVR studio.

The A, P or PA in the controllers name don't matter too much.
The A means that the controller is more energy efficient (less current consumption)...but only by a few mA. more Info
The P informs you on additions/changes to the "General Porting Considerations, Register and bit names and Low-frequency Crystal / Timer/Counter Oscillator". more Info
But don't worry, these things aren't anything major to affect the way your robot functions or how the chip will operate.  The only time you may actually need to worry about the differences between the regular, A, P and PA versions of an atmega chips are if you are doing something Highly technical...

In AVR Studio, just select the "ATmega168" option.

About the LED problem you were having, I would go ahead and switch the LED around and see if that works.  I actually had to switch my LED around in order to work when I built my bot.
But before you do that (If you haven't done it already that is), open "photovore_v1.c" in AVR Studio and change the line "LED_off();" to "LED_on();".  If that doesn't work, then try switching the LED around.

Good Luck!


 


Get Your Ad Here