OpenServo.com Forum Index OpenServo.com
Discussion of the OpenServo project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Possible $5 AVR Programmer for OpenServo

 
Post new topic   Reply to topic    OpenServo.com Forum Index -> Utilities and Tools
View previous topic :: View next topic  
Author Message
mpthompson



Joined: 02 Jan 2006
Posts: 650
Location: San Carlos, CA

PostPosted: Fri Jan 06, 2006 6:29 am    Post subject: Possible $5 AVR Programmer for OpenServo Reply with quote

One of the needs for the Atmel STK500 is to initially program the OpenServo bootloader into Flash and set the MCU fuse bits. Although the STK500 is a reasonable investment if you want to do other AVR development, it's overkill to just use it to program the bootloader into each OpenServo. Or, recover an OpenServo because the bootloader Flash somehow became corrupted. There are other inexpensive AVR programmers, but most of these just support ISP (in-service programming) and not High Voltage Serial Programming which is needed for the OpenServo.

I came across a circuit for AVR an programmer which looks like it would fit the bill for the OpenServo. It uses the PC parallel port and supports High Voltage Serial Programming. Best of all, it looks to be about $5 in parts and could probably be assembled in just a few hours.

A description can be found here:

http://elm-chan.org/works/avrx/report_e.html#AVRXP

There is a 20-pin version and a much simpler 8-pin version of the circuit. The 8-pin circuit diagram can be found here:

http://elm-chan.org/works/avrx/avrxp8.png

There is a DOS program here to program both Flash and Fuse bits:

http://elm-chan.org/works/avrx/avrxtool.zip

Or a Windows program here to program both Flash and Fuse bits:

http://elm-chan.org/works/avrx/avrxtool32.zip

If anyone gives this a try, please report back and let us know if it works as I anticipate it would. It would certainly help those who want to build their own OpenServos, but are not interested in the Atmel STK500.

-Mike
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
dsg123456789



Joined: 03 Jan 2006
Posts: 21

PostPosted: Fri Jan 06, 2006 10:30 pm    Post subject: Reply with quote

The 8-pin circuit diagram is broken--you might consider copying the image and uploading it elsewhere. There seems to be a device to prevent direct image linking on the host of the image.
Back to top
View user's profile Send private message AIM Address
mpthompson



Joined: 02 Jan 2006
Posts: 650
Location: San Carlos, CA

PostPosted: Sun Jan 08, 2006 8:12 am    Post subject: Reply with quote

I investigated this programmer a little more. It looks simple enough, but it uses Toshiba transistors and diodes that apparently seem pretty hard to get in the US in low quantities. I think more standard parts can be substituted, but the circuit has to be modified because the Toshiba transistors have internal bias resistors which would have to be added external to more standard 2222A and 2907A transistors.

-Mike
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
mpthompson



Joined: 02 Jan 2006
Posts: 650
Location: San Carlos, CA

PostPosted: Thu Jan 12, 2006 8:17 am    Post subject: Reply with quote

I'm nearly finished building a breadboard implementation of this cheap AVR High Voltage Serial programmer that could be used to bootstrap or recover an OpenServo. I'll cross my fingers that it works. I couldn't find the Toshiba transistors and diodes here in the U.S. and I had to substitute more common devices.

If things work out well, I'll document the design and include a new schematic reflecting the circuit I built and tested. Someone should then be able to replicate the programmer with about $5 to $10 in parts from a place like Jameco. The final step would be to create a single sided PCB design for the circuit that would be easy for people to make at home.

-Mike
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
mpthompson



Joined: 02 Jan 2006
Posts: 650
Location: San Carlos, CA

PostPosted: Fri Jan 13, 2006 1:41 am    Post subject: Reply with quote

Good news for those not wanting to invest in an SDK500 and save their money for more servos. I was able to validate that the simple programmer described in this thread can indeed be used to bootstrap or recover the OpenServo. Below is a picture of the programmer wired on a protoboard with the SDK 500 adapter plugged into it.



The total cost in parts is about $8 minus the protoboard. Mostly just a collection of transistors, diodes, capacitors and resistors. I'll soon solder the circuit to one of these to make it a little more permanent.

I'll put together the schematic and parts list as well as some other notes for building the programmer and post it to this site soon.

I believe one of the ways of making the OpenServo project successful is to be sure that it is accessible to as many people as possible. Hopefully this inexpensive programmer is a step in that direction.

-Mike

BTW, below is the output from the programmer application as I was bootstrapping the ATtiny45.

Reading the Device Type

Code:
C:""Documents and Settings""mike""avrxtool32""bin>avrpp -p1 -r
Put a device on the socket and type Enter...
PAR->Unknown device (FF-FF-FF).
HVS->Detected device is ATtiny45.

Device Signature  = 1E-92-06
Flash Memory Size = 4096 bytes
Flash Memory Page = 64 bytes x 64 pages
EEPROM Size       = 256 bytes
EEPROM Page       = 4 bytes x 64 pages

C:""Documents and Settings""mike""avrxtool32""bin>


Setting the Fuses

Code:
C:""Documents and Settings""mike""avrxtool32""bin>avrpp -p1 -fl11100010
Put a device on the socket and type Enter...
HVS->Detected device is ATtiny45.
Writing fuse low byte...Passed.

C:""Documents and Settings""mike""avrxtool32""bin>avrpp -p1 -fh11011111
Put a device on the socket and type Enter...
HVS->Detected device is ATtiny45.
Writing fuse high byte...Passed.

C:""Documents and Settings""mike""avrxtool32""bin>avrpp -p1 -fx0
Put a device on the socket and type Enter...
HVS->Detected device is ATtiny45.
Writing fuse extended byte...Passed.

C:""Documents and Settings""mike""avrxtool32""bin>


Writing the Bootloader

Code:
C:""Documents and Settings""mike""avrxtool32""bin>avrpp -p1 ATtinyX5_Bootloader.hex
Put a device on the socket and type Enter...
HVS->Detected device is ATtiny45.
Flash: Erasing...Writing...Verifying...Passed.

C:""Documents and Settings""mike""avrxtool32""bin>
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
ginge
Site Admin


Joined: 14 Jan 2006
Posts: 1031
Location: Manchester, UK

PostPosted: Fri Mar 17, 2006 1:44 am    Post subject: Reply with quote

Mike, do you know if this programmer is suitable for the new V2 designs? I no longer have access to the STK500, and this looks good.
If it works, i'll make a PCB for the project.

Which part substitutions were needed for the replacement to the RNxxxx devices? The one I am particularly interested in knowing about is Q1 (+12v switch) and which component you selected.

Barry
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
mpthompson



Joined: 02 Jan 2006
Posts: 650
Location: San Carlos, CA

PostPosted: Fri Mar 17, 2006 4:52 am    Post subject: Reply with quote

Barry,

My schematic I built the circuit from is can be found here:

http://www.openservo.com/misc/simple_programmer.pdf

I simply used very common 2222A and 2907A transistors and a common 1N4148 diode. They worked fine.

I don't think that this programmer will be suitable for OpenServo 2.0 because it is a high voltage serial programmer. The ATtiny45 required this mode of programming because the fuse had to be set to disable the Reset line and this couldn't be done with the ISP programming method.

Although I haven't tried it myself, I would suggest the simpler cuircuit shown below:

http://www.openservo.com/misc/ispdongle.pdf

I believe the application software (AVR_ISP.ZIP) to use this circuit can be obtained from the Atmel site or many other places such as the following link:

http://www.nalanda.nitc.ac.in/industry/datasheets/atmel/prod203.htm

This will program the ATmega8/168 using the lower voltage ISP method which should be fine for OpenServo 2.0.

Also, the site where I got the high voltage serial programmer has other simple ISP programmers and software as well.

http://elm-chan.org/works/avrx/report_e.html#AVRXP

I hope this information helps. Please start a thread in the forum if you find a very cheap and easy method of bootstrapping OpenServo 2.0. I'm sure others will find it useful.

-Mike
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
jonnblaz



Joined: 02 Aug 2013
Posts: 1
Location: France

PostPosted: Fri Aug 02, 2013 6:05 am    Post subject: Reply with quote

If things work out well, I'll document the design and include a new schematic reflecting the circuit I built and tested. Someone should then be able to replicate the programmer with about $5 to $10 in parts from a place like Jameco.
_________________
ghost rider
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    OpenServo.com Forum Index -> Utilities and Tools All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group