I like to do a lot of personal fun projects, that are based on the Atmega or Attiny chips,
Because I like to use only the microcontroller chip on a custom made PCB,I always found uploading code to the chip a bit annoying a d I'm sure I'm not the only one ?. The reason I found it annoying is that I always had to search for my arduino board, flash the ISP sketch, then connect jumper wires from it to the board. Some time I even had to solder them to my board, because there was no connector.
To make things more simpler, I came up with this ideea, of putting a atmega chip on a mini usb cable, flash it with the Arduino as Isp sketch, so I can use only a cable to upload code to any atmega or attiny chip, without having to connect or solder jumper wires from an arduino to my boards
All you need on your future homemade projects based on the Atmel chips is an MiniUSB, female connector soldered to the board.
You cand even use the connector to connect other SPI peripherals to your board, like a flash memory chip.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Components Needed
First step is to gather the materials.
For this project you will need the folowing:
- 1 x USB cable
- 1 x MiniUSB 5 wires+ shielding ( https://www.aliexpress.com/item/Cablecc-Mini-USB-B... )
- 1 x On cable plastic case ( http://www.ebay.com/itm/-/252937807697? )
- 1 x MicroISP board ( http://www.ebay.com/itm/-/252937810508? )
- 1 x SPDT SMD switch ( https://www.aliexpress.com/item/10-pcs-Miniature-S... )
- 1 x Crystal Oscilator ( https://www.aliexpress.com/item/20PCS-Passive-Crys... )
- 2 x 22pF Ceramic Capacitors (1206)
- 1 x Ferite Bead (1206)
- 1 x 4,7uF Ceramic Capacitor (1206)
- 3 x 1uF Ceramic Capacitors (1206)
- 3 x 100nF Ceramic Capacitors (1206)
- 1 x 3v Voltage Regulator (SOT89)
- 1 x 10k ohm resistor (1206)
- 1 x 220 ohm resistor (1206)
- 1 x LED (1206)
- 1 x FTDI FT232RL Chip (SSOP28)
- 1 x ATMEGA328P Chip (TQFP32)
Step 2: Assembling the Components
After you gather all the needed componente, you can start building your ICSP Cable. YEYYY! :)
First start by checking if the board fits well in the case. It`s a little chance you will need to polish it a bit.
After that you can start soldering the component. When all the components are soldered cut the USB A cable to a 1,5 -2 meter length and the miniUSB cable to a 20cm length and the pull their cut ends to the sleeves provided with the case. (You can use the Female end of the miniUSB cable to extend your connection to the board)
Now peel the exterior of the cables and solder the to the board (like in the images) as close as posible.
After this is all done and there are no shorts, solder a thin wire from the RST pin to the VIA located between the 100nF capacitor and the 10k ohm resistor. You need to do this so you can upload the boot loader to the atmega328p. ( Use the female end of the miniUSB cable you just cut, to connect to the miniUSB male connector. You will end up with open wires wich you can connect to the pins 10,11,12,13,VCC and GND of an arduino)
Now you can begin to Upload the Bootloader.
Connect your Arduino to the computer, open the Arduino IDE, go to examples and open the ArduinoISP sketch. Go to TOOLS -> BOARD and select your Arduino, then go to TOOLS-> PORT, select your arduino Serial port and press the UPLOAD button.
If the ArduinoISP sketch uploaded succesfully, disconect the Arduino from the compuner and connect the corresponding wires from your Arduino ICSP Board to the 10 (RST), 11,12,13 VCC and GND pins, plug the Arduino back into the computer and go to TOOLS -> BOARD and select "Arduino Pro or Pro Mini", then go to TOOLS-> PROCESSOR and select "Atmega328 (3.3V, 8Mhz)" and finaly click on TOOLS->Burn Bootloader. If all was done correctly, it should star uploading the Bootloader to your 328p chip. In case this doesn`t work, you probably missed something, so start revising everything from the begining.
If the proccess was succesful, disconect the female part of the miniUSB cable, and the arduino from your computer. Desolder the wire you previously soldered between the RST and the VIA, and start assembling the board into the case.
Step 3: All Done! Enjoy!
Now your cable is ready!
Connect the USB A to the computer, open your Arduino IDE and upload the ArduinoISP sketch to your cable, by selecting from tools->board, "Arduino Pro or Pro Mini" and Processor "Atmega328 (3.3V, 8Mhz).
From now on all you have to do is put a miniUSB connector on your PCB, connect it, like in the image and you`re set to quickly upload sketches to your Atmega or Attiny project.
IMPORTANT: There is and error in the photo with the PCB miniUSB connector. You need to connect the housing of the miniUSB connector directly to the Reset pin of your micro, without the 100nF capacitor!