Author Topic: 50$ robot - problem with programmer  (Read 7374 times)

0 Members and 1 Guest are viewing this topic.

Offline karlisTopic starter

  • Full Member
  • ***
  • Posts: 79
  • Helpful? 0
50$ robot - problem with programmer
« on: May 14, 2008, 12:18:15 PM »
Hello every one. i`m building 50$ robot, with atmega16 microchip, and i have litle problem, i`m stuck with that programmer... i have litle researched and found out that some people are using MAX232 microchip, i found 1 in ebay http://cgi.ebay.com/RS232-Serial-TTL-Converter-Board-Adaptor-Module-MAX232_W0QQitemZ250248052213QQihZ015QQcategoryZ4661QQssPageNameZWDVWQQrdZ1QQcmdZViewItem
 and befour ordering, i asked question to seller "can i use this MAX232 chip to connect atmega16 to PC?" and he ansvered that its not posible! :( i wanted to know if its true or not ?

edit: allso i wanted to ask is there any tutorial accessable, wich explains (shematic) how connect some LCD to atmega?
sorry for my bad language :(
« Last Edit: May 14, 2008, 12:23:19 PM by karlis »

Offline karlisTopic starter

  • Full Member
  • ***
  • Posts: 79
  • Helpful? 0
Re: 50$ robot - problem with programmer
« Reply #1 on: May 15, 2008, 07:53:16 AM »
any one? please

Offline dolinay

  • Contest Winner
  • Jr. Member
  • ****
  • Posts: 18
  • Helpful? 0
Re: 50$ robot - problem with programmer
« Reply #2 on: May 15, 2008, 08:42:41 AM »
Hello,
I didn't try the $50 robot so I'm not sure what exactly you need to do, but to send data between PC and microcontroller you can use MAX232. I am using MAX 232 to communicate between Atmel Tiny 2313 and PC via serial line. I attach the schematics. It will require four capacitors besides MAX232 and that's all. Vcc is 5 Volts, X1 is the 9-pin connector for serial cable which goes to PC.
On AT Mega16 instead of pins 2,3 you will connect it to pins 14,15 (RXD, TXD). 

This will work if you write some program for the ATMega which needs to send/receive data from PC or maybe if you have bootloader in the ATmega16 and download programs to it with the bootloader. But if you just need to download program to the ATmega (hex file) - as described here: http://societyofrobots.com/step_by_step_robot_step4.shtml - you should not need MAX232. You need just some simple programmer, which you can make yourself. I use this one for parallel port: http://www.ikalogic.com/isp.php, but there is also similar one for serial port: http://www.lancos.com/siprogsch.html.

Offline karlisTopic starter

  • Full Member
  • ***
  • Posts: 79
  • Helpful? 0
Re: 50$ robot - problem with programmer
« Reply #3 on: May 15, 2008, 09:33:22 AM »
ammm what i want is to programm the chip.. so i can flash some leds / lcd / or move some wheels :)

now i dont realy understand what does MAX232 do, can you explain it to me ? isnt it  a programmer, which i can hook up to my robot and pc to programm it via WinAVR ?

should i buy MAx232 chip and build the connector like in your shematics ?

btw 1uF/63V (63v is ment to be volts ?)

ps thanks for response and sorry for my bad language :(
« Last Edit: May 15, 2008, 09:36:09 AM by karlis »

Offline dolinay

  • Contest Winner
  • Jr. Member
  • ****
  • Posts: 18
  • Helpful? 0
Re: 50$ robot - problem with programmer
« Reply #4 on: May 15, 2008, 01:03:39 PM »
No problem. I'm not expert in hardware myself but I'll try  ;).  MAX232 is circuit which converts the voltage levels between the microcontroller (ATMege16) and PC. It is needed because the microcontroller can only work with 5V but the serial line on PC requires higher voltage and also negative voltage. But for simple programmer you do not need it. You could either buy the "AVR STK Serial Port Dongle Programmer" described in the tutorial or make something like the parallel port programmer at http://www.ikalogic.com/isp.php. If you can, I suggest buying the ready made programmer. It only costs some $15 and will you save you problems. 

One important thing: you will write your programs in the WinAVR, but you do not use WinAVR to program the microcontroller. WinAVR will produce file with HEX extension which you then download (program) to the microcontroller using some other program - this program is also called programmer to make things more confusing. This program can be PonyProg if you buy the "AVR STK Serial Port Dongle Programmer" - it's use is described in the tutorial. If you build the parralel port programer, then you have to use the ISPPROG program described there.

Yes, 63V means volts. It means the maximal allowed voltage for the capacitor.

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,150
  • Helpful? 110
Re: 50$ robot - problem with programmer
« Reply #5 on: May 15, 2008, 02:03:30 PM »
MAX232 just converts the RS232 signal levels from the traditional +/-12v levels that your PC expects on its serial port and the +/-5v levels that the UART on your controller uses. Beyond that it has nothing to do with programming a controller. Suggest you search this site for programmers - specifically the AVRISP mk II - which is the easiest option for new folk - if not the cheapest solution. But all those pro's and con's are already discussed elsewhere.
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 karlisTopic starter

  • Full Member
  • ***
  • Posts: 79
  • Helpful? 0
Re: 50$ robot - problem with programmer
« Reply #6 on: May 15, 2008, 02:35:10 PM »
oh i see... i heard that PonyProg is very slow, some few bytes of code it could upload to MCU can take up to an hour, is thsis true, or its fast/medium speed uploading?

ps if i buy programming cable, what kind of problems i`ll save for my self ? some kind of bugs in resistors, unstable connections or something like that ?

pps whats with thouse clocks for MCU's ? should i find how and where to connect them to ? or for so simple task as flashing led's its no nececery to include in circruit ? and if i should put 1 in my circruit, what kind of frequency (Mhz) i should get ? equal to MCU's frequenc?

ppps in dolinay post was link to paralel port programmer, and in its shematic i spoted some drawing that i do not understand, i have cut them out and attached, could some1 explain them what does that mean? is it diode or what ?
« Last Edit: May 15, 2008, 02:41:36 PM by karlis »

Offline dolinay

  • Contest Winner
  • Jr. Member
  • ****
  • Posts: 18
  • Helpful? 0
Re: 50$ robot - problem with programmer
« Reply #7 on: May 17, 2008, 09:58:49 AM »
PonyProg is very slow with USB to Serial converters - if your laptop does not have serial port. I tried it with 2 different converters, in both cases it was unusably slow. On computer with normal serial port it works fine, reads/writes in few seconds. Maybe with some USB to serial converters it works better...

Karlis, no offense, but it seems to me what you're trying to do is like trying to read Shakespeare when you've just learned the alphabet. I suggest you do some search and reading as Webbot said. There are plenty of tutorials which will give you step-by-step instructions and explanations. Only after you get some experience, try your own experiments. 

Offline karlisTopic starter

  • Full Member
  • ***
  • Posts: 79
  • Helpful? 0
Re: 50$ robot - problem with programmer
« Reply #8 on: May 17, 2008, 02:57:11 PM »
nice to hear about PonyProg, because i use normal PC :)

about that Shakespeare thing i`m not taking any offense, because i understand that most of peoples dont want to help noobs like me :) but i`m no quiting things because i dont understand them in first attempt..

good news are that i made a serial programmer, and done "smoke test" successfully - today :) tomorow i`ll add microswich for power, and try to upload some blinking led programm..

i would be wery thankfull if some one could post some step-by-step links how to do things.. why i`m asking for it ? well i`m a bit lame in searching, and most of the time i`m founding same pages agen and agen, even if thare are no such thing described what i`m searching for.. i hope you understand what i thot :)

overall i`m not so stupid, i just need good literature (tutorials) with corect shematics, not like in 50$ tutorial (in this site) where all u see is colored circles wich show where to connect them, no sheme no nothing..

ps serial port programmer i build by this tutorial - http://www.captain.at/electronics/atmel-programmer/

Offline karlisTopic starter

  • Full Member
  • ***
  • Posts: 79
  • Helpful? 0
Re: 50$ robot - problem with programmer
« Reply #9 on: May 18, 2008, 08:18:34 AM »
finaly i`m done, now when i wanted to upload led test.hex it showed error [device mising or unknown device ~24] i have hooked it up to power, its turned on and all other wiring is ok, MCU gets its 4.9v and input befour voltage regulator is about 10.5 so its all ok, when i turn it on it even does not show (new device found ...)  i have searched all over google and in this forum, but i didnt find any good solution for me..

are any things that i should do in bios, or with other kind of softwares to unlock or turn on parallel port ?
i know that its talked about much in here but if you can help just drop link, but if you, whatever who, are mad on my noobness then please dont say anything ...

sorry for my bad language

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,660
  • Helpful? 169
    • Society of Robots
Re: 50$ robot - problem with programmer
« Reply #10 on: May 18, 2008, 11:51:22 AM »
karlis, you need to try harder on searching . . . Everything you ask is here on the forum.

Quote
allso i wanted to ask is there any tutorial accessable, wich explains (shematic) how connect some LCD to atmega?

http://www.societyofrobots.com/robotforum/index.php?topic=3839.0

Quote
ppps in dolinay post was link to paralel port programmer, and in its shematic i spoted some drawing that i do not understand, i have cut them out and attached, could some1 explain them what does that mean? is it diode or what ?

Like this?
http://www.societyofrobots.com/robotforum/index.php?topic=618.msg3728#msg3728


Quote
i just need good literature (tutorials) with corect shematics, not like in 50$ tutorial (in this site) where all u see is colored circles wich show where to connect them, no sheme no nothing..

 :o
You aren't going to find anything better on the entire internet, I promise you!

schematics here

Offline karlisTopic starter

  • Full Member
  • ***
  • Posts: 79
  • Helpful? 0
Re: 50$ robot - problem with programmer
« Reply #11 on: May 18, 2008, 01:55:06 PM »
Admin, thanks for all of thouse links, that 1 about lcd is great :)

are any trobleshooting available for paralel port programmers ? robot's board is wired corecty, i`m nearly 100% sure, parallel port programmer is allso wired up corectly because there are only 6wires and 3resistors >.< but when i connect everything togather it does not respond, Pony Prog shows only device mising or unknown device ~24, and its calibrated corectly
« Last Edit: May 18, 2008, 02:06:39 PM by karlis »

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,660
  • Helpful? 169
    • Society of Robots
Re: 50$ robot - problem with programmer
« Reply #12 on: May 18, 2008, 02:30:07 PM »
Check this and let us know your results:
http://www.societyofrobots.com/robot_faq.shtml#circuit_debug

My opinion of the parallel port is that you are wasting your time . . . You've probably spent 10 hours already on it, with lots of frustration, no? My recommendation would be to just pay the $36 for a nice programmer . . . Remember, time is money!

Offline karlisTopic starter

  • Full Member
  • ***
  • Posts: 79
  • Helpful? 0
Re: 50$ robot - problem with programmer
« Reply #13 on: May 18, 2008, 02:50:51 PM »
About power - at moment i`m not using bateries - its an old cell phone charger, wich outputs ~11v

i appierenced "semi-successfull" programm upload to MCU, first it showed that device is mising, and after ignoring that it showed that its uploaded, it took some while but still ( like 40secs ) then i swiched off, disconnected the programming cable, and turned on again.. led did not flash, i checked voltage on LED and it was ~0.07v (led has ~7kohm resistor)

i`m thinking that if i remove that resistor it will work fine.. its only an litle led

one more thing.. what will happen if i shield my programming cable ? in old days wires had shielding so other powerfull devices wont interack them, nowdays most likely all cables have round ball or something on 1 end of a cable, i think its a magnet or something like that, because on 1 tutorial i readed "cut out magnets and bla bla bla..." could it be true ? will/could it work ?

btw what programming cable should i buy ? i dont think that i`ll trade my atmega16 to other MCU..

thanks for helping mates :)
and sorry for my language skills :( i`m trying my best...
« Last Edit: May 18, 2008, 02:51:54 PM by karlis »

Offline karlisTopic starter

  • Full Member
  • ***
  • Posts: 79
  • Helpful? 0
Re: 50$ robot - problem with programmer
« Reply #14 on: May 19, 2008, 06:48:36 AM »
i had to spam to make this topic live agen... sorry

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,150
  • Helpful? 110
Re: 50$ robot - problem with programmer
« Reply #15 on: May 19, 2008, 08:13:31 AM »

Quote
i just need good literature (tutorials) with corect shematics, not like in 50$ tutorial (in this site) where all u see is colored circles wich show where to connect them, no sheme no nothing..


Check out my attached PDF in the following post

http://www.societyofrobots.com/robotforum/index.php?topic=3292.msg25198#msg25198
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 karlisTopic starter

  • Full Member
  • ***
  • Posts: 79
  • Helpful? 0
« Last Edit: May 19, 2008, 01:44:41 PM by karlis »

Offline karlisTopic starter

  • Full Member
  • ***
  • Posts: 79
  • Helpful? 0
Re: 50$ robot - problem with programmer
« Reply #17 on: May 20, 2008, 06:24:52 AM »
oh comon people, just say wich one is bether, i will buy it and start reading tutorials.. i wont be back in electronic any more, because soldering is one of easyest things in life, if you are doing that since age 10 like i do :D

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,150
  • Helpful? 110
Re: 50$ robot - problem with programmer
« Reply #18 on: May 23, 2008, 06:14:48 PM »
The reason you may not have had any response is that 'we' may not have any experience with the devices that you are quoting. Doesn't mean they 'wont' work - but we don't know that they 'do' work.

If you want a programmer that is known to work then buy the AVR ISP MK II programmer mentioned in the tutorial - if you want to take a risk with a cheap eBay gadget then fine - but don't give us the
Quote
oh common people
line. (Is this meant to be 'Oh - come on people!'). You're going outside of the realm of the $50 robot - but if you go the eBay route and find something that works then share the info with others.

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 Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,660
  • Helpful? 169
    • Society of Robots
Re: 50$ robot - problem with programmer
« Reply #19 on: May 25, 2008, 04:01:11 PM »
This happens a lot, when people read my $50 Robot and decide they can do better by using some obscure cheaper part. But then they have no idea how to use it so they ask . . . For example, soooo many people want to replace the servos with DC motors . . .

You just gotta trust that I know what I'm doing when I decided it was the best for making the $50 Robot :P
Heck, if you haven't built a robot before, what makes you think you can outdo me ;)

I designed it with cost and simplicity #1 in my mind. Just go with the more expensive programmer, it will save you tons of time and frustration ;D

Oh, and always read the datasheets about your parts. It will answer your questions faster than us reading it for you :P

and a few extra faces so this message doesn't come out too mean:
 :D ;D ::) :P :-*

Offline karlisTopic starter

  • Full Member
  • ***
  • Posts: 79
  • Helpful? 0
Re: 50$ robot - problem with programmer
« Reply #20 on: May 28, 2008, 11:00:44 AM »
i`m apologising about that "oh come on people".. i`m doing allmost everything by the tutorial, except mcu, because my local shop didnt have atmega8 anymore.. so i decided to buy "bigger" one....

about DC motors - its prety posible to connect it to MCU with some H-bridge or smtg, atleast thats how far i have discovered, and i say it ( thats its posible to run ~12v DC with MCU, so saying thats its imposible is a lie

i think lot of people would be happy to see how to crack it :)

last thing, in tutorial there where no clock included ( in shematic ) and thing that i dont understand is - are clock's (crystals) nececery to programm MCU ? why need another clock if in MCU itself is one ?
i bought programmer in ebay, that i hope will work (not delivered yet) and in sellers describtion where shematic, where was 4mhz clock (crystal) ( see attachment below)
« Last Edit: May 28, 2008, 11:01:59 AM by karlis »

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,150
  • Helpful? 110
Re: 50$ robot - problem with programmer
« Reply #21 on: May 28, 2008, 03:20:32 PM »
Quote
about DC motors - its prety posible to connect it to MCU with some H-bridge or smtg, atleast thats how far i have discovered, and i say it ( thats its posible to run ~12v DC with MCU, so saying thats its imposible is a lie

i think lot of people would be happy to see how to crack it

Search the forum and Google for 'H-Bridge' - lots of answers out there

Quote
in tutorial there where no clock included
The microcontroller comes with a built in clock. For the ATMega8 this can be programmed, via fuses, to run at 1MHz or 8MHz - so an external clock isn't absolutely necessary unless you want to clock the controller at a different rate.

Quote
i bought programmer in ebay, that i hope will work (not delivered yet) and in sellers describtion where shematic, where was 4mhz clock (crystal)
That shouldn't matter. The programmer is effectively a serial device so it works no matter what clock speed your controller is running at. However - some documentation says that your programmer should be to set to 'talk' at about 25% of the frequency of your controller.
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 karlisTopic starter

  • Full Member
  • ***
  • Posts: 79
  • Helpful? 0
Re: 50$ robot - problem with programmer
« Reply #22 on: May 29, 2008, 02:23:21 AM »
so if i have atmega16 (16mhz right?) i still need 4mhz external clock for programmer, as showed in my prev post attachment ?

Offline bens

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 332
  • Helpful? 3
Re: 50$ robot - problem with programmer
« Reply #23 on: May 29, 2008, 02:37:09 AM »
There are potentially a couple of things wrong with your statement:

1) Your mega16 probably has a maximum speed grade of 16 MHz, but I assume it will only be running at 8 MHz (or maybe even 1 MHz by default) if it's running off of its internal RC oscillator rather than an external resonator.

2) What Webbot said wasn't exactly right.  The restriction is that the ISP clock (the SPI clock used by the ISP programmer when programming your AVR) must be less than 1/4 of your I/O clock, otherwise the AVR can't handle the incoming SPI programming commands.  It definitely does not have to be (and should not be) exactly 1/4 of your I/O clock speed.  The only problem you run into with a programmer is that its ISP clock might be set too fast for your particular AVR, but you can almost always configure the ISP clock to be slower using your AVRISP programming software.

- Ben

Offline karlisTopic starter

  • Full Member
  • ***
  • Posts: 79
  • Helpful? 0
Re: 50$ robot - problem with programmer
« Reply #24 on: May 29, 2008, 09:31:22 AM »
so then every thinkg is allmost good, i`ll wait for my isp cable and update topic later with any good or not so good news :)

Offline karlisTopic starter

  • Full Member
  • ***
  • Posts: 79
  • Helpful? 0
Re: 50$ robot - problem with programmer
« Reply #25 on: June 19, 2008, 12:55:47 AM »
This is Update post:

i bought this AVR ISP

built my robot so i can programme it, and i have tested it, my led flashes :)

as sayd ebay seller it works with AVR studio 4, tried with ponyProg, error about device not found.

for about ~25$ its worth to buy one :)
« Last Edit: June 19, 2008, 08:02:53 AM by karlis »

Offline bens

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 332
  • Helpful? 3
Re: 50$ robot - problem with programmer
« Reply #26 on: June 19, 2008, 01:07:54 AM »
Your link doesn't work for me, so I can't see what you bought.  But there are a number of inexpensive AVR ISPs out there.  Pololu sells one intended for use as an Orangutan programmer, but it functions as both a general AVR ISP and a USB-to-serial adapter (logic-level RX and TX only) that you can use to connect your AVR to a PC:

http://www.pololu.com/catalog/product/740

I believe Ladyada also sells some:

http://www.adafruit.com/index.php?main_page=index&cPath=16

- Ben

Offline karlisTopic starter

  • Full Member
  • ***
  • Posts: 79
  • Helpful? 0
Re: 50$ robot - problem with programmer
« Reply #27 on: June 19, 2008, 08:06:02 AM »
link fixed

what H-bridge would you suggest me to look for, i`m willing to use old RC car, there are bouth stearing and drive wheel's so its ideal for me, i know there are H-bridges, basicly they are like relay's but what would be nicest for my line folowing robot? (Atmega16 MCU)

Offline bens

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 332
  • Helpful? 3
Re: 50$ robot - problem with programmer
« Reply #28 on: June 19, 2008, 01:26:37 PM »
The H-bridge you use will depend on how much current your motors draw (use stall current for a worst-case estimate) and at what voltage you plan on running them.  Once you know this information you can look into what H-bridges will satisfy these requirements.

- Ben

Offline karlisTopic starter

  • Full Member
  • ***
  • Posts: 79
  • Helpful? 0
Re: 50$ robot - problem with programmer
« Reply #29 on: June 20, 2008, 02:04:53 AM »
thouse DC motors are running on 3v max 6v, and freakout voltage is ~12v, when they usualy burn out

on that toy cars chasy are socket for 4 batteries, so thats ~4.8-6v

and H-bridge what i need posibly is that will work from MCU and deliver ~6 to 9v to motors

i would be greate full for some tutorial or ebay link :)


Karlis.

 


Get Your Ad Here

data_list