go_away

Author Topic: Custom Robot Control Board  (Read 4002 times)

0 Members and 1 Guest are viewing this topic.

Offline GWER57Topic starter

  • Full Member
  • ***
  • Posts: 65
  • Helpful? 2
Custom Robot Control Board
« on: February 21, 2010, 05:07:48 PM »
Hi, I am in the process of creating my own augumented mcu aimed towards small to midsized robots. I was just wondering if I was missing any important features. The board is based on an ATMega 64A. It sports:
22 digital io
8 analog inputs
4 UART (through a multiplexer)
1 USB port
2 Bidirectional DC motor ports
1 LCD socket
1 LED

I also posted the schematic below. It is not final as i am still considering freeing up the I2C bus. Also, would SPI be important or are the UARTs and I2C (potentially) enough? I want this to be useable for almost any robot  ;D!

By the way, the schematic is in ExpressSCH form
GTW

Offline GWER57Topic starter

  • Full Member
  • ***
  • Posts: 65
  • Helpful? 2
Re: Custom Robot Control Board
« Reply #1 on: February 22, 2010, 08:57:52 PM »
I decided that i would include I2C and i decided to include a power supply monitoring curcuit. Does SPI have any uses other than for interfacing with memory cards? I haven't been able to find much so i was wondering how crucial it would be to the average robot builder. (I am considering selling it at one point probably around $60 maybe $70) And my goal has been to make it full-featured and cheap.
« Last Edit: February 24, 2010, 06:24:19 AM by GWER57 »
GTW

Offline Ro-Bot-X

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,431
  • Helpful? 25
  • Store: RoBotXDesigns.ca
Re: Custom Robot Control Board
« Reply #2 on: February 22, 2010, 09:15:16 PM »
Maybe export the schematic to a picture format (png, jpg...) so we can take a look at it?

SPI is used for a few devices, for instance a color LCD, or a SD card... I2C is also important for a robotic board as many sensors use this interface. So it is a good idea to include them both.
Check out the uBotino robot controller!

Offline GWER57Topic starter

  • Full Member
  • ***
  • Posts: 65
  • Helpful? 2
Re: Custom Robot Control Board
« Reply #3 on: February 23, 2010, 09:06:06 AM »
Okay, the schematic is two parts because there are a lot of headers  :D.
GTW

Offline Ro-Bot-X

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,431
  • Helpful? 25
  • Store: RoBotXDesigns.ca
Re: Custom Robot Control Board
« Reply #4 on: February 23, 2010, 03:39:17 PM »
Your motor driver is missing the protection diodes and the direction pins are connected to the MISO and MOSI pins that are used by the SPI interface. Try to find 2 other pins for the motor driver and make the SPI dedicated. Other than that, I don't find other issues at a first glance.
Check out the uBotino robot controller!

Offline GWER57Topic starter

  • Full Member
  • ***
  • Posts: 65
  • Helpful? 2
Re: Custom Robot Control Board
« Reply #5 on: February 23, 2010, 03:47:36 PM »
Done, i moved two of the control pins to other pins, two of the pins were strategically  placed on the 8-bit pwm and were not moved. I purposely left off the diodes because i thought the mcu would be protected by the voltage regulator since the l298 allows you to power the motors from an unregulated source. I am starting to become pressed for board space but i might be able to make it work :). I just did not want it if it wasn't really helping.
« Last Edit: February 24, 2010, 06:24:47 AM by GWER57 »
GTW

Offline galannthegreat

  • Supreme Robot
  • *****
  • Posts: 615
  • Helpful? 4
  • Blue-Lensed Blue LEDs?! What?! Impossible!!
Re: Custom Robot Control Board
« Reply #6 on: February 23, 2010, 09:18:58 PM »
It won't give your MCU much protection without the clamping diodes installed. 8 diodes (1N4007 would be my choice here) doesn't cost much, but does take up a fair bit real estate on PCBs but it's a smart idea, so if I were you I'd just place them in the circuit for precautionary measures.

The L298 motor driver solarbotics sells is a good example of how it is laid out.
http://www.solarbotics.com/assets/schematics/solarbotics-l298_schematic_complete.jpg
Kurt

Offline GWER57Topic starter

  • Full Member
  • ***
  • Posts: 65
  • Helpful? 2
Re: Custom Robot Control Board
« Reply #7 on: February 24, 2010, 06:17:17 AM »
Thanks, especially for the link. I'll try to fit those in.
« Last Edit: February 24, 2010, 06:23:42 AM by GWER57 »
GTW

Offline galannthegreat

  • Supreme Robot
  • *****
  • Posts: 615
  • Helpful? 4
  • Blue-Lensed Blue LEDs?! What?! Impossible!!
Re: Custom Robot Control Board
« Reply #8 on: February 24, 2010, 11:55:09 AM »
Yea, no problem, can't wait to see the finished product, it looks like it will be awesome. :)
Kurt

Offline Hewhowalk

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Re: Custom Robot Control Board
« Reply #9 on: February 25, 2010, 04:52:36 AM »
i actaully think you should read the AVR-manual (http://www.atmel.se/dyn/resources/prod_documents/doc8160.pdf) about how they think you should build your circuit, especially the part about uart and usb. Both of them are high-speed enough to give you some seroius disturbances without the proper decooupling capacitor and filters.

Otherwise I think it's a cool project you have going and I am looking forward to see it.

Offline GWER57Topic starter

  • Full Member
  • ***
  • Posts: 65
  • Helpful? 2
Re: Custom Robot Control Board
« Reply #10 on: February 25, 2010, 11:19:03 AM »
Yeah but i do have decoupleing caps in the power portion of the curcuit. There are a .1uF and ~100uF cap connected to the unregulated source, and a .1uF connected to the regulated supply. Isn't that enough?
GTW

Offline galannthegreat

  • Supreme Robot
  • *****
  • Posts: 615
  • Helpful? 4
  • Blue-Lensed Blue LEDs?! What?! Impossible!!
Re: Custom Robot Control Board
« Reply #11 on: February 25, 2010, 11:41:23 AM »
You'll need decoupling caps on each chip, especially the FTDI UART to USB chip and your AVR.
Kurt

Offline Ro-Bot-X

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,431
  • Helpful? 25
  • Store: RoBotXDesigns.ca
Re: Custom Robot Control Board
« Reply #12 on: February 25, 2010, 11:45:49 AM »
The safest rule is to use one 10uF and one 0.1uF capacitors as close as possible to every IC on your board (connected to GND and Vcc). The 10uF cap will help with sudden voltage drops and the 0.1uF cap will help with filtering the noise on the power line. You can also do that to some sensors, like the Sharp IR range sensor, but in this case you can do it directly on the sensor.
Check out the uBotino robot controller!

Offline GWER57Topic starter

  • Full Member
  • ***
  • Posts: 65
  • Helpful? 2
Re: Custom Robot Control Board
« Reply #13 on: February 25, 2010, 04:32:28 PM »
Okay thanks, I thought you just used one per power supply.
One more question, should i put resistors between the mcu and the motor driver (And for that matter, any other interfaces or ics)? I just want to be sure that i don't suck the life out of a pin, so to speak.
GTW

Offline GWER57Topic starter

  • Full Member
  • ***
  • Posts: 65
  • Helpful? 2
Re: Custom Robot Control Board
« Reply #14 on: March 08, 2010, 05:30:27 PM »
Okay, I attatched pretty much the final schematic with all of the changes made (except for the filtering caps). If anyone sees any feature it is lacking, please mention so. Much thanks!
GTW

Offline GWER57Topic starter

  • Full Member
  • ***
  • Posts: 65
  • Helpful? 2
Re: Custom Robot Control Board
« Reply #15 on: May 24, 2010, 07:11:09 AM »
Okay, final revision. If you see any errors please let me know.  ;D

Also, what do you think a reasonable selling price would be? My initial thought was $79 but that is probobly a bit high.
So now I'm thinking maybe $65 or so.

Thanks
« Last Edit: May 24, 2010, 07:19:03 AM by GWER57 »
GTW

Offline BEAMer

  • Full Member
  • ***
  • Posts: 105
  • Helpful? 0
Re: Custom Robot Control Board
« Reply #16 on: May 24, 2010, 08:59:00 AM »
Hi GWER57,

 Why don't you go for the L293D motor driver chip? It has clamping diodes inside them and can happily handle up to 1 Amps. It has an automatic thermal shutdown which will shut down the chip in case of too much heat! Its not very costly also.

Just 16 pins and no external components. So very little space occupied. The data sheet also shows how to create pads which can dissipate some amount of heat.

BEAMer

Offline GWER57Topic starter

  • Full Member
  • ***
  • Posts: 65
  • Helpful? 2
Re: Custom Robot Control Board
« Reply #17 on: June 08, 2010, 02:30:06 PM »
I opted for the slightly more expensive l298 because of the ability to handle 2 amps contiuous and 4 amps peak.

Versus 1 and 2 respectively. (I think!)

I wanted to make sure that it could handle motors that large so as to not limit myself in the future.
GTW

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,132
  • Helpful? 108
Re: Custom Robot Control Board
« Reply #18 on: June 08, 2010, 02:42:28 PM »

The other controller to consider is the Toshiba TB6612FNG - see http://www.pololu.com/catalog/product/713
Its 1A continuous per motor, and  3A peak - which I now is less - just thought I'd chip in.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline GWER57Topic starter

  • Full Member
  • ***
  • Posts: 65
  • Helpful? 2
Re: Custom Robot Control Board
« Reply #19 on: June 08, 2010, 06:34:21 PM »
Thanks these are all great suggestions,

The only reason I went with this driver is i didn't want the current draw to be a big factor when choosing motors.
I know I can't drive a medium to large size motor but I'm only concerned with the smaller size.

While on the subject, what do you think a good retail price would be?
I want to make it fairly inexpensive but I would like to make a decent profit for each board.

Thanks
GTW

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
Re: Custom Robot Control Board
« Reply #20 on: June 08, 2010, 07:48:04 PM »
Well, you will have to factor in costs of advertising, web site, etc etc...

Or just save the hassle and don't sell them, its a lot more fun to spend time doing things enjoyable instead of figuring out how to sell stuff  :-\

Offline GWER57Topic starter

  • Full Member
  • ***
  • Posts: 65
  • Helpful? 2
Re: Custom Robot Control Board
« Reply #21 on: June 08, 2010, 08:00:09 PM »
Right now it costs about $40 per board, $30 for parts $10 for board.

A page would probobly run me about $7 a month.

And advertising maybe another $10 a month.

So I suppose $60 would be reasonable and that way I could break even with the selling of one board a month.

Thats just my thoughts from the economic standpoint, what do you guys think in terms of the features listed at the top?

Thanks for all of the ideas!
GTW

Offline GWER57Topic starter

  • Full Member
  • ***
  • Posts: 65
  • Helpful? 2
Re: Custom Robot Control Board
« Reply #22 on: June 13, 2010, 03:07:27 PM »
I have a question.

I was trying to program my design on a proto board but it wont program. My pc is unable to read the signature of the device.

Without the mcu the board draws 15mA, and with the mcu it draws 25mA. When I press the read signature button the current decreases momentarily and I assume that this is the mcu resetting but i'm not positive.

I've triple checked my connections and everything seems to be in order. Also, I am unabe to select ATMega 64A from the device drop down list, and instead I have to settle for the older ATMega 64.

What might be the problem?

Thank you much in advance for your help.
« Last Edit: June 13, 2010, 08:03:24 PM by GWER57 »
GTW

Offline GWER57Topic starter

  • Full Member
  • ***
  • Posts: 65
  • Helpful? 2
Re: Custom Robot Control Board
« Reply #23 on: June 14, 2010, 06:49:45 AM »
I've done some research and my programmer (AVRISP v2 copy) is compatable with the ATMega 64A. I'm pretty sure my chip isn't bricked but its possible. If anyone has any thoughts on what might be the problem please let me know!  :)
GTW

Offline GWER57Topic starter

  • Full Member
  • ***
  • Posts: 65
  • Helpful? 2
Re: Custom Robot Control Board
« Reply #24 on: October 01, 2010, 08:10:14 PM »
I think i found the solution! In the datasheet it says:
PE4 INT4/OC3B(1) (External Interrupt 4 Input or Output Compare and PWM Output B for
Timer/Counter3)
PE3 AIN1/OC3A (1) (Analog Comparator Negative Input or Output Compare and PWM Output A
for Timer/Counter3)
PE2 AIN0/XCK0(1) (Analog Comparator Positive Input or USART0 external clock input/output)
PE1 PDO/TXD0 (Programming Data Output or UART0 Transmit Pin)
PE0 PDI/RXD0 (Programming Data Input or UART0 Receive Pin)


It seems like you use these for the programming interface instead of MOSI and MISO!
I have yet to acually test this out but it is progress!
GTW

 


Get Your Ad Here

data_list