Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: Orrin on October 30, 2008, 04:32:46 PM

Title: 50$ Robot Microcontroller
Post by: Orrin on October 30, 2008, 04:32:46 PM
Hello again!

I have been having issues with my microcontroller(s). I have an Atmega8 and an Atmega168, and the more expensive 6-pin programmer. They both connect successfully to the programmer, and I can change the ISP frequencies with no problem. For some reason, though, when I press program the board disconnects and AVR Studio tells me that the circuit board has lost power. I tried all of the help topics from AVR Studio, but with no luck. I also tested all my pins, batteries, and rechecked the .pdf schematic over and over again.

Before this I connected and uploaded my programs with no problem, but my photosensors were not connecting and I had the wrong servos. Apparently, if you ask servocity.com to modify them for continuous rotation you lose rotation in one direction and get a potentiometer instead, which doesn't help much. I think I can solve this by switching the variables 22 and 44 in the Photovore program to a lower and higher value (like 1 and 44?).

Code: [Select]
Turn Right:
Servo Left = 1
Servo Right = 44

Turn Left:
Servo Left = 44
Servo Right = 1

Go Straight:
Servo Left = 44
Servo Right = 44

What I am asking is what do you think the problem is with my board? Also, do you think the changes I made to the code will work (if I ever get it on the robot)?  ???

Thanks for your help!
Orrin  ;D
Title: Re: 50$ Robot Microcontroller
Post by: pomprocker on October 30, 2008, 05:30:35 PM
The 1's will not work.

You have to do the math using the formula provided at the bottom of that file
Title: Re: 50$ Robot Microcontroller
Post by: Orrin on October 31, 2008, 08:58:43 AM
Thank you pomprocker! I'll make sure to try that later.

Can anybody help me with the power issue though?
Title: Re: 50$ Robot Microcontroller
Post by: airman00 on October 31, 2008, 11:55:46 AM
Charge your battery and try it wiht another ATmega.

What battery are you using anyways?
Title: Re: 50$ Robot Microcontroller
Post by: Orrin on November 02, 2008, 02:25:09 PM
I am using a 9-Volt and a battery holder with rechargeable batteries. I tried recharging and nothing worked...

I think I want to restart on a breadboard. I'm tired of not being sure of my connections and reheating my soldering iron every 10 seconds.

Will all the through-hole components fit on a breadboard with standard wires? I have never used a breadboard before, can you sandwich a bunch of wires into one hole effectively?
Title: Re: 50$ Robot Microcontroller
Post by: Conscripted on November 02, 2008, 03:40:07 PM
Will all the through-hole components fit on a breadboard with standard wires? I have never used a breadboard before, can you sandwich a bunch of wires into one hole effectively?

On a bread board you are only going to be able to get one wire/component into each hole. The breadboard is arranged so that there are 5 holes that are all electrically connected so that when you plug into one hole you have 4 other holes that can connect to that wire/component. There is usually a strip down the sides for power and ground.

Conscripted
Title: Re: 50$ Robot Microcontroller
Post by: Webbot on November 02, 2008, 08:35:59 PM
Checkout my tutorial at http://www.societyofrobots.com/member_tutorials/node/190 (http://www.societyofrobots.com/member_tutorials/node/190)
One of the sections explains how to build + test one step-at-a-time  rather than build-all-and-curse
May be useful - even with a breadboard
Title: Re: 50$ Robot Microcontroller
Post by: Orrin on November 03, 2008, 07:20:05 PM
On a bread board you are only going to be able to get one wire/component into each hole. The breadboard is arranged so that there are 5 holes that are all electrically connected so that when you plug into one hole you have 4 other holes that can connect to that wire/component. There is usually a strip down the sides for power and ground.

Thanks, that is useful information. I'll have to reconsider which breadboard to buy (I might need a bigger one.)



Checkout my tutorial at http://www.societyofrobots.com/member_tutorials/node/190 (http://www.societyofrobots.com/member_tutorials/node/190)
One of the sections explains how to build + test one step-at-a-time  rather than build-all-and-curse
May be useful - even with a breadboard

Thanks for the tips. That is a very useful tutorial!