Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: reefat on September 14, 2008, 09:36:26 PM

Title: ATmega AVR Development Board (Experimental Prototype)
Post by: reefat on September 14, 2008, 09:36:26 PM
Today I have just completed building the brain of my Robot, the MCU Board using ATmega8 (http://www.atmel.com/dyn/products/product_card.asp?part_id=2004) AVR Microcontroller. This MCU Board can be powered by 6V Adapter or 5 1.2V NiMH Rechargable Batteries. ATmega8 AVR runs on 5V, and thet’s the reason I used National Semiconductor’s Low Dropout Voltage Regulator LM2940T (http://www.national.com/mpf/LM/LM2940.html).

(http://robotalk.codecake.com/wp-content/uploads/2008/09/atmega8-mcu-board.jpg)

For programming the AVR, I am using AVRISP mkII In-System Programmer (http://www.atmel.com/dyn/products/tools_card.asp?family_id=607&family_name=AVR%AE+8%2DBit+RISC+&tool_id=3808) and AVR Studio (http://www.atmel.com/dyn/products/tools_card.asp?tool_id=2725) Development IDE. The MCU Board has two I/O Ports - 8-Bit PORTD and 6-Bit PORTB, and 6-channel ADC. For PORTD and PORTB headers, the Vcc can be selected as either 5V or 6V, using the two yellow jumpers (red-marked). The board also provides 5V output headers to power up external device(s).

Supported AVRs: ATmega8, ATmega48, ATmega88, ATmega168.

Tags: ATmega8 (http://robotalk.codecake.com/tag/atmega8/), AVR (http://robotalk.codecake.com/tag/avr/), AVRISP (http://robotalk.codecake.com/tag/avrisp/), Development Board (http://robotalk.codecake.com/tag/development-board/), MCU (http://robotalk.codecake.com/tag/mcu/), Robot Brain (http://robotalk.codecake.com/tag/robot-brain/), Robot Controller (http://robotalk.codecake.com/tag/robot-controller/)
Title: Re: ATmega8 Development Board
Post by: airman00 on September 14, 2008, 09:44:16 PM
damn that is clean and organized!
Title: Re: ATmega8 Development Board
Post by: reefat on September 14, 2008, 10:00:20 PM
I took my time to design before building it. And finally it took me a whole night to build it.
So, it should look clean and organized.  ;D
Title: Re: ATmega8 Development Board
Post by: airman00 on September 14, 2008, 10:08:12 PM
can you post a picture of the underside?
Title: Re: ATmega8 Development Board
Post by: reefat on September 14, 2008, 10:24:47 PM
It's kinda messy.  ;D
But I will let you know after taking a shot of the underside.
Title: Re: ATmega8 Development Board
Post by: sotu on September 15, 2008, 08:04:34 AM
Looking nice :)

What features are you planning to use with it? Servos, motors, sensors?
Title: Re: ATmega8 Development Board
Post by: reefat on September 15, 2008, 09:57:17 AM
@sotu. All kind of features (supported by ATmega8) can be implemented on this board. This board is nothing but an easy-to-use version of the ATmega8 chip. Headers on this board helps servos to be directly connected to PORTD[8] or PORTB[6]. And sensors (5V Reference Voltage) can be plugged into the 6 ADC channels. This is a stand-alone MCU Board, so you don't need any additional circuitry to be added. Just for now I am planning to use Servos and Sensors with it.
Title: Re: ATmega8 Development Board
Post by: benji on September 15, 2008, 12:38:13 PM
looks neat , why dont you PCB it
Title: Re: ATmega8 Development Board
Post by: reefat on September 15, 2008, 12:42:04 PM
@benji. Just did it last night as experimental basis. Let see how far it works. May be then I will do it. :)
Title: Re: ATmega8 Development Board (Experimental Prototype)
Post by: sotu on September 16, 2008, 06:28:17 AM
Next time you make a easy board like this, you should make a step by step detailed tutorial on how to make a circuit board like this. I would need a tutorial like that ;)
Title: Re: ATmega8 Development Board (Experimental Prototype)
Post by: reefat on September 16, 2008, 06:35:23 AM
@sotu. I would be happy to post a tutorial like that. Next time definitely I will try to do that.

O ya. Forgot to tell you guys, I have already implement this motherboard for a dummy Differential Drive Robot. And it just worked like that  ;). I can program it as quick as a snap of my fingures; really easy to use!
Title: Re: ATmega AVR Development Board (Experimental Prototype)
Post by: Admin on September 17, 2008, 07:21:24 AM
Nice job, looks really good.

I especially like your labeling :D
Title: Re: ATmega AVR Development Board (Experimental Prototype)
Post by: sotu on September 17, 2008, 08:00:09 AM
Sorry for this perhaps nooby question, but how about a list of the components youve used on this board.
So far i can see:
-Break away headers
-an ATmega8
-LED
-Capacitor (big, 100 uF?)
-Voltage regulator
-ON/OFF switch

Anything else?

I've started on my research to build my own MCU board.
So far i've learned basics about what each component do, now i need to know how to put them together, and what needs to be connected to what.

Title: Re: ATmega AVR Development Board (Experimental Prototype)
Post by: reefat on September 17, 2008, 08:35:18 AM
Thanks. @Admin

@sotu. I have used:

1) ATmega8 (28 PDIP)
2) A reset button and
3) 0.1uF multilayer capacitor
For the MCU unit

For the power supply unit:
1) LM2940 (low dropout voltage regulator)
2) 470uF and 22uF for filtering
3) Resistor 390ohms and an LED

That's all. Go to my blog Robotalk (http://robotalk.codecake.com/). You may find a few more info and link about it.
Good luck.
Title: Re: ATmega AVR Development Board (Experimental Prototype)
Post by: Trumpkin on September 17, 2008, 08:45:52 AM
nice, looks really neat and tidy. I'm working on an MCU board also.
Title: Re: ATmega AVR Development Board (Experimental Prototype)
Post by: Webbot on September 17, 2008, 01:39:31 PM
Nice job.

So what did you do about the power supplies in the end?

Did you use separate supplies for Servos and Sensors or are you running off one battery?



Title: Re: ATmega AVR Development Board (Experimental Prototype)
Post by: reefat on September 17, 2008, 02:51:00 PM
@ Webbot.
I just used single battery pack (5x1.2V NiMH). I didn't use any sensitive sensor yet. I will do some experiments with CdS(Phototransistor) and Sharp IR Rangefinder. And lets see if I can bypass the usage of extra battery. If I don't get any interference from this single-powered board I am using, then I don't need to use any extra power source. Why bother?

@Trumpkin.
First of all thanks for your comment. I will recommend everyone to design their own(unique) MCU Board. And post the schematic in the forum. I will post mine too. It will help us to correct each other.
Title: Re: ATmega AVR Development Board (Experimental Prototype)
Post by: Webbot on September 17, 2008, 08:07:34 PM
Quote
Why bother?

Its not the sensors that will give you a problem particularly. The problem you may get is any surges caused by the motors/servos that may end up making the processor RESET.

Once RESET your program will start from scratch, and may cause more surges, etc etc
Title: Re: ATmega AVR Development Board (Experimental Prototype)
Post by: Webbot on September 17, 2008, 08:18:07 PM
Quote
@Trumpkin.
First of all thanks for your comment. I will recommend everyone to design their own(unique) MCU Board. And post the schematic in the forum. I will post mine too. It will help us to correct each other.


Quite right. I posted mine here:-
http://www.societyofrobots.com/member_tutorials/node/190 (http://www.societyofrobots.com/member_tutorials/node/190)

My PCB is similar except mine is a bit more of a 'porcupine' with all those header pins - mainly coz I allowed you to decide which power supply every I/O pin could use rather than using a jumper to select it for an entire port.  I also broke out some special pins for the UART.  Sorry - that all sounds 'defensive' but isn't meant to be. After all - we are only tweaking Admins original 'classic' design. So the more designs the better!

Title: Re: ATmega AVR Development Board (Experimental Prototype)
Post by: reefat on September 17, 2008, 10:32:53 PM
@Webbot. Yea, you are right. I should have been more careful about "the surge". I don't have enough idea about it and when it can be happened. And couldn't the Voltage Regulator LM2940 protect the circuit against surge? Could you please refer me any link that has enough info about surge and protection (causing by servo)?
Title: Re: ATmega AVR Development Board (Experimental Prototype)
Post by: Admin on September 17, 2008, 10:43:55 PM
You can only guess for surge - it entirely depends on what your robot is doing and the devices it uses. Add a single additional servo, and the surge changes. Typically you should just guess based on experience of the devices you have hooked up, then measure the surge with an oscope. Adjust the caps accordingly.

But typically I just overestimate the surge and put whopping caps on everything.
Title: Re: ATmega AVR Development Board (Experimental Prototype)
Post by: Webbot on September 17, 2008, 10:51:03 PM
@Webbot. Yea, you are right. I should have been more careful about "the surge". I don't have enough idea about it and when it can be happened. And couldn't the Voltage Regulator LM2940 protect the circuit against surge? Could you please refer me any link that has enough info about surge and protection (causing by servo)?

If you're using Hitech HS-311 servos then their stall current is 800ma according to their data sheet. So if you are driving two servos and hit a wall then your two servos could require 1.6 amps. Can your battery supply this whilst still supply sufficient voltage to the 'in' of the voltage requlator. If not then your voltage out from the regulator may not be able to power your chip. Reset.
Title: Re: ATmega AVR Development Board (Experimental Prototype)
Post by: sotu on September 18, 2008, 01:58:10 PM
Im just about to order parts for experimenting for my own MCU.
This is the part i am planning to order/use:
A IC breadboard socket (not soldier required)
Resistors
Batteries
Capacitors
LED's
Voltage regulator
motors/servos
Microcontroller > ATmega
Male break away pin headers

Is this enough components to make a basic MCU that can run some programms in C++ moving servos and motors, perhaps even some sensors?

One question.
Where is the USB unit where you have to connect the USB cable from to your computer to transfer the codes?
Like one of theese: http://www.pololu.com/picture/view/0J82 (http://www.pololu.com/picture/view/0J82)
I cant see one of those on your development board.
Title: Re: ATmega AVR Development Board (Experimental Prototype)
Post by: reefat on September 18, 2008, 09:34:55 PM
@sotu. For making the "MCU Board", you don't need motor/servo. Better if you use them to test your board. And the requirements depend on your schematic/design of your circuit. It is smart way to design your circuit schematic diagram first, then order your parts. And we generally use "C" to program the microcontroller, not C++.
Title: Re: ATmega AVR Development Board (Experimental Prototype)
Post by: reefat on September 18, 2008, 09:38:44 PM
Oh, I forgot to mention about the ISP Programmer. I use AVRISP mkII, check this out:
http://www.atmel.com/dyn/products/tools_card.asp?family_id=607&family_name=AVR%AE+8%2DBit+RISC+&tool_id=3808 (http://www.atmel.com/dyn/products/tools_card.asp?family_id=607&family_name=AVR%AE+8%2DBit+RISC+&tool_id=3808)
You can order it from DigiKey, which is not that expensive (I think) $34.00:
http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail?name=ATAVRISP2-ND (http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail?name=ATAVRISP2-ND)
Title: Re: ATmega AVR Development Board (Experimental Prototype)
Post by: sotu on September 19, 2008, 07:01:57 AM
Ok, thanks :)