The REDisp Micro AVRisp is a seriously small (1 square inch) ISP programmer that is recognized as a USBtinyISP using the same drivers and is therefore ready to use with the likes of AVRdude and the Arduino IDE. Available from my Tindie Store for only $16 pre-assembled (£10) ready to use and tested however all files, firmware and other information is available open-source and totally 100% absolutely free from GitHub. This instructable will explain how to assemble a board if you have bought the parts, a detailed hardware explanation for those who wish to build their own and finally instructions on how to program and use the device.
Hardware inspiration came from the FabIsp project by David A. Mellis with improvements such as firmer decoupling, fusing and a Power Led. The project can be made by hand on a perf-board using the schematic, but the issue with this is the initiation - the Attiny on board itself needs programming with an ISP programmer in order to be used as an ISP programmer, and sourcing the parts is another problem in itself. The REDisp comes pre-tested and programmed so to start this auto-replicating family of ISP programmers, all you need now is $16. I even program the new REDisp's with a REDisp! If you are feeling adventurous you can select to get the board un-assembled and take it on yourself with a pre-programmed chip, in which case steps 2-3 are for your instructions. Steps 1 is for you if you wish to build this project from scratch with a detailed explanation of the hardware. Finally step 5 is using the board.
- A fully capable ISP for chips with up to 64K of flash
- Fused to protect your PC
- Automatically supplies your project with 5V
- Tiny as it gets (1"x1")
- Pre tested and assembled by hand
- Conservative decoupling
- A power LED for peace of mind
Mac and Linux require no drivers - windows drivers are available from the USBtinyISP page.
Continue to step 1 for a hardware explanation
Step 1: a Hardware Explanation
The system uses software running on an ATTiny44a-ssu to convert USB data in the USBtiny protocol to ISP programming data.
USB is annoying, although the Vbus level is 5V most data lines are only 3.3V or so tolerant so precautions must be made. Two 3.6V zener diodes are in place to limit the voltage (D1, D2) with the 40-60R resistors (R4, R5) limiting their current. Low power diodes are best due to a lowered capacitance and less induced noise on the signal lines (500Mw or less) The diodes on the REDisp are two 375Mw sod-323 3.6V models. D- also needs a 1.5K pull-up resistor constructed with 3x 1K (R1-3) resistors to 5Vcc reduced to 3.6 by the Diodes and this also generally lowers the actual voltage closer to 3.3V. The ID line is not required but is sometimes used for VID/PID. Vbus is connected to the boards VCC Via a 500Ma tripping current resetting PolyFuse, This automatically shuts of the power if you draw over the USB limit of half an Amp.
LED and PSU bypassing
I always include a power LED for debugging and peace of mind that it is actually working witn a current limiting resistor R7. The two bypass capacitors (C1-2) are separate as the 100nf is better at reacting to fast current spikes but the 1uf is capable of providing increased power for longer durations during complex upload operations etc.
The AVR requires an external clock source as the internal oscillator is no where near accurate enough to reliably control USB protocols, and V-USB firmware only accepts certain clock rates. 12MHZ is a good compromise between speed and reliability.
Attiny Control Hardware
The Core is the Attiny44a SSU and it is what does the processing. It is connected to the USB front end and to the ISP output. It has its own personal decoupling capacitor in C3 and a Reset pull-up R6 between 1 and 10K. The Tiny must be programmed first once soldered to the board before it can be used - so the jumper SJ1 connects its reset line to the reset line on the ISP output so it can be programmed from the port. Once programmed this is removed for normal use. The GPIO SPI port is connected to the ISP output .
The output of the Attiny is connected to this output, which is also reversible for programming the Attiny itself. By default it supplies 5V dc.
Step 2: Soldering Yourself and Parts - the Non-polarized
The parts are available from various distributors - here are what i use from farnell (some are slightly different but are equivalent) -
- The Attiny - ATMEL ATTINY44A-SSU
- 12MHz Crystal - ABM8-12.000MHZ-B2-T
- The 500Ma Fuse - MC36206 (hold 200Ma)
- MINI USB - 10033526-N3212MLF
- 3.6V zener diodes - BZX384-C3V6
- 1K resistor - MCWR08X1001FTL
- 10K resistor - MCWR08X1002FTL
- 50R resistor - RC0603FR-0751RL (51R)
- 22PF capacitor - GRM2165C1H220JZ01D
- 100NF capacitor - GRM21BR71E104KA01L
- 1UF capacitor - GRM219R61H105KA73D
Led is arbitrary so choose whatever you have
For the PCB one can be ordered direct from OSHpark here, or you can etch your own using the schematic.
The Resistors (R1-7), Capacitors (C1-5), Fuse and USB are non-polarized and can be soldered on by hand, although I would recommend a heat gun rework for the USB - the pins are unaccessible with an iron.
The USB has two small plastic pins which sit in drilled holes in the PCB for perfect alignment, In house I use solder-paste but tinning the 5 pads, adding some flux and using a heatgun to rework the usb pins should work just fine.
Tin the pad on each resistor that's closest to your iron hand, add flux and place the correct resistor down on the pads applying pressure and reflowing the tinned pad, then solder the other side. I really like this tutorial by itsInOurKernel as an example - check him out!
Step 3: The Polarized
The rest of the parts are polarized and require the alignment noted in the second image - the LED alignment is specific to the LED's I supply but the polarity is also noted.
This chip has a fairly large pitch and each pin can be individually soldered by hand with an iron, whilst using tweezers to hold it in place. Note the alignment of pin 1.
This is another part that is impossible to do entirely with an iron, tinning each pad and then reflowing with a heat gun is your best bet. Make sure the text faces the way shown above.
The diodes although difficult can be hand soldered, using the same method as shown in the resistor and capacitor video. The bar denoting polarity faces down as shown, and is quite difficult to see with the naked eye but possible.
The Led is soldered again the same as the capacitors and resistors with the polarity noted in the image.
And that's it constructed! time to set it up.
Step 4: Setting Up the Device
You will remember the Jumper SJ1 connecting the ISP output reset line to the ATTinies own reset instead of its GPIO. When the jumper is closed it will allow you to program the ATTiny onboard through the ISP output, and for normal usage it should be open otherwise the ATTiny will attempt to program itself and give you some fun errors.
Whether you purchased this board assembled or in parts the chip is ALREADY PROGRAMMED AND TESTED so move on to the next step for using the device. If you have bought the parts and the chip separately and are building this from scratch complete the following steps to program the ATTiny. David A. Mellis wrote a very easy command-line makefile in order to program and fuse set the chip, i've packaged it alongside a solid version of AVRdude 6.0.1 to allow a super easy install and this is available here.
In order to use the system first download the folder Fabisp Firmware file from above and make sure it is all in one folder as shown in the photos. Inside the folder open the MakeFile (I used notepad++) and change the programmer to the one you will be using as shown above (AVRdude name). Using your chosen command line interface (CMD etc) navigate to the folder and first run "avrdude" to check its functioning correctly, then making sure the board is ready and plugged in via your programmer and that SJ1 is closed, type "make program" and watch the magic happen for 20 seconds. First it will write the code and then it will set the fuses. Programming done! unplug remove SJ1 now to avoid a long head scratching moment attempting to figure out how the ISP is giving you errors about programming itself....
Plug in your ISP and if nothing explodes, move on to the next step! I would recommend just touching the parts to check nothing is hot and shorted especially the diodes (if VCC shorts to one of the data pins they get VERY hot VERY fast).
Step 5: Drivers and Usage
When plugging the device in your OS should notify you about this new device - drivers are only required for windows - get them here. Install the drivers to the device name that pops up (probably FABisp or USBtinyISP).
Next on all OS's check that a new device has appeared called USBtinyISP (after installing drivers for windows). In Device Manager on windows (shown), system profiler on mac and dmesg on linux.
Using the REDisp
In Avrdude to use the programmer select "-c usbtiny" as the programmer argument in the command, or from the Arduino IDE first select USBtinyISP from the programmers menu and to upload simply press upload whilst holding shift ("upload using programmer" is shown) both images are shown.
Try uploading and everything should run smoothly, if not troubleshoot time! feel free to comment if you have any issues.
Thanks for Reading