Author Topic: Help! 50 Dollars Robot Circuit Board and Programming  (Read 1966 times)

0 Members and 1 Guest are viewing this topic.

Offline PlagueTopic starter

  • Jr. Member
  • **
  • Posts: 11
  • Helpful? 0
Help! 50 Dollars Robot Circuit Board and Programming
« on: July 18, 2015, 01:45:53 PM »
I have searched through the forums (not the whole thing, but most of it using the search area), but i haven't found a solution to my problem.
I am trying to finish the $50 dollars robot, however I have encountered a few problems (I don't know if they are programming issues, electronic or software).
1. I want to verify if my circuit is wired correctly, I do not know how to solder, but i tried my best to make connects. I have tested the voltage distribution for the circuit and everything seems fine. I just want to get fresh eyes on them.
2. I tried to program the Atmega8-16pu but it did not go so well. First I used a USBasp I bought from Ebay to program the mcu but, I got an error from avrdude reading: "initialization failed, rc=-1" and "stk500_getsync(): not in sync: resp=0x00" and "Firmware update needed for usbasp." I tried to update the USBasp with an arduino but that didn't work (Avrdude spat out: "Invalid Device Signature"). I gave up on the USBasp and tried to use the arudino to program the atmega8. I used this tutorial i found online:

https://app.box.com/s/ol1z8jjnrpy6wly4w61imt7wcbxk3fcg.

That did not work either. So I decided to write the Photovore.hex file compiled from Avr Studio 4 using avrdude unto the arduino board. It was successfully written, So i removed the Arduino Atmega328p and placed it in my circuit, but VOILA!! nothing worked. (Invalid device signature error). I Double and double check all the Miso Mosi SCK and Reset, GND, VCC, 16mhz Crystal and 22pF Capacitor Connections. I even supplied an external power source.
I came back to

http://www.societyofrobots.com/

find a way to use atmega328p instead of the atmega8-16pu. I found something from a memeber of this forum, but he didn't post how he/she got to his/her solution.  I have no idea on how to manipulate the photovore files to make it work with Atmega328p.
Overall,
I need help in verifying if the circuit is okay and veryfying if i could use the Arduino Uno Atmega328p I removed instead of the atmega8-16pu, and If I can, could anyone provide me with solution and or photovore file replacements which will be compatible with Atmega328p. And if it will work, will the Atmega328p with arduino bootloader cause any other problems?
Note: I do not know how to program at all. So please if you have a solution try as much as you can to make you language simple for me to understand.
If this $50 dollar robot goes well i plan on learning programming starting with C.
Thank You


http://postimg.org/image/5phu4nikj/
http://postimg.org/image/wntj1jrth/
http://postimg.org/image/59jodyos5/
http://postimg.org/image/i3ckt9acx/
« Last Edit: July 18, 2015, 07:09:22 PM by Plague »

Offline mklrobo

  • Supreme Robot
  • *****
  • Posts: 547
  • Helpful? 14
  • From Dream to Design at the speed of Imagination!
Re: Help! 50 Dollars Robot Circuit Board and Programming
« Reply #1 on: July 19, 2015, 03:23:31 PM »
 :) Hello!
I have ran into the same problems you have, but I have just tried to use the Axon.
Though all this, remember, it is not hopeless!(seems so at this time) I have not reviewed your circuit
at this time, will have to digest that for awhile.
From what I have gathered so far, if you use the Studio 4, you can use a physical bootloader,
STK500, or the virtual com port to interface to the Axon II. Admin told me in one of my posts that
the Axon II had a bootloader already, so a physical bootloader was not necessary. If you use any
other board besides the Axon II, you may have to load a bootloader software, and have a physical
bootloader device. (STK 500)
If you got the Studio 4 to write a HEX file, that in itself, is a miracle.  :o I could not get it to do that at all.
NOT to worry, though! Download the AVR Studio 6, and you will not have any trouble making a hex file
for any of the Atmel MCUs. Writing a program consists of knowing the commands, and where they are
at, I am still trying to find them.  :'(
I can only imagine why your studio 4 program did not work; Your hex file will only work if the original
template was made in Webbot designer program
.(?) don't know why, except that the project designer
set the pin expectations for the AVR studio 4. Studio 6 does not require the template.
Check out my posts in Misc section, titled, Analyzing the Axon: Coding, Construction, and Contraptions.
I have worked out a lot of problems, and maybe this will help you. What I have learned about the Atmel
MCU line, is that if you program any processor outside of the Axon series, you will need a STK600,
which is a bootloader device for most of the Atmel processor series. It seems that this is a pain,  >:(
but I have found that (so far) the learning of all this stuff has helped me in the hobby and on my job.  ;D

Offline PlagueTopic starter

  • Jr. Member
  • **
  • Posts: 11
  • Helpful? 0
Re: Help! 50 Dollars Robot Circuit Board and Programming
« Reply #2 on: July 19, 2015, 03:57:59 PM »
From what I have gathered so far, if you use the Studio 4, you can use a physical bootloader,
STK500, or the virtual com port to interface to the Axon II. Admin told me in one of my posts that
the Axon II had a bootloader already, so a physical bootloader was not necessary. If you use any
other board besides the Axon II, you may have to load a bootloader software, and have a physical
bootloader device. (STK 500)

I read online that the Arduino Atmega chip alreaey has an Arduino bootloader. I would have gotten the Axon II but I am broke  :-\

If you got the Studio 4 to write a HEX file, that in itself, is a miracle.  :o I could not get it to do that at all.
NOT to worry, though! Download the AVR Studio 6, and you will not have any trouble making a hex file
for any of the Atmel MCUs.

I did not get avr studion to worl at first. I kept giving me a dependency error and a missing direrctory for the ".elf" file. So I went online and found someone who get rid of these error by downloading a "msys-1.0.dll file http://www.madwizard.org/download/electronics/msys-1.0-vista64.zip and moving it to WinAvr bin folder.
 Is it possible that the hex file isn't working because i used AVr Studio 4?

If i want to load the Photovore hex on Atemga328p (which i took from an arduino), should i just go ahead and write the program to the chip or do i need to tweak certain files such as (the makefile, SoR_utils, Global.h and timer files) or will choosing the Atmega328p chip on avr studio option rather than atmega8 do everythign for you.

Offline mklrobo

  • Supreme Robot
  • *****
  • Posts: 547
  • Helpful? 14
  • From Dream to Design at the speed of Imagination!
Re: Help! 50 Dollars Robot Circuit Board and Programming
« Reply #3 on: July 20, 2015, 07:24:58 AM »
 :) Hello!
To address your most complex event;
If I want to load the Photovore hex on Atemga328p (which i took from an arduino), should i just go ahead and write the program to the chip or do i need to tweak certain files such as (the makefile, SoR_utils, Global.h and timer files) or will choosing the Atmega328p chip on avr studio option rather than atmega8 do everything for you.
Truly, this issue of programming these chips are VERY daunting. :'(  I wish I could give you good advice on
tweeking out files, but  honestly, I do not know.  :'(  I thought about the doing the same thing, but the
tutorials indicated that the programmer should not alter files, and just enjoy programming the robot.
The direction that I am taking, is to use Studio 6  to write a simple program. That way, I do not need
the Project designer involved. (less software to make mistakes.)
I thought about altering the files, but if I  do, then if any mistakes are made, I will have to go back and
wipe my computer clean, and start again.  :'(
I will try to use the commands given from Studio 4; I assume the Axon II internal commands will not
change, giving me a chance to take advantage of programming it.
These problems have been experienced by most everyone on the forum; Which is why I created my
post, to iron out any problems with the Axon programming.
I commend you in working out the file problems.  8) I feel that the Axon and Atmel processors are
a valuable asset, and once figured out, can be your best friend!  ;D

Offline PlagueTopic starter

  • Jr. Member
  • **
  • Posts: 11
  • Helpful? 0
Re: Help! 50 Dollars Robot Circuit Board and Programming
« Reply #4 on: July 29, 2015, 02:25:32 PM »
I purchased another ATmega, and successfully. Loaded the hex file.
« Last Edit: July 30, 2015, 12:15:46 PM by Plague »

 


Get Your Ad Here

data_list