V-USB and AVR (Attiny, Atemga32u4, USBASP)

Posted by: Chao Category: Basic Electronics Tags: , , , Comments: 2

V-USB and AVR (Attiny, Atemga32u4, USBASP)

We are working on some boards that can directly communicate with PC these days, so here comes with three most typical boards:

  • USBASP: A wonderful programmer tool we have, do most of programming work, it also using V-USB interface.
  • Atmega32u4 small breakout board: Similar to arduino leonardo and arduino micro, plug the USB in then you can directly upload sketch into the IC in really two seconds. This is another version of the atmega32u4 board we made, you can use USBASP to program the leonardo bootloader into it with arduino IDE, or program other bootloaders like LUFA.
  • Easylogger board: Based on easylogger project (you can search easylogger on google), the nice thing is the V-USB function running on a small size attiny IC, which only have 8 pins. How to programmer? You can download the code, connect the USBASP again to the 6pins ISP, set fuse 0xdd for high bytes, and 0xe1 for low bytes according the make file, then write the flash. Now finally you can plug the board directly on PC, which will be recognized as a “USB input device”

See how these boards look like below:

  • From top, there are USBASP, easylogger and atmega32u4 board.
  • These are rough prototype boards, you can see we solder a extra USB connector on easylogger because of the poor connecting capability, and this due to the too thin thickness of the board. When the board thickness have 2.0mm, it should be directly plug into the USB port.

Circuits:

  • For ATmega32U4, the circuit is simple, you will only need to add two 22R resistors on D+ and D- port, these IO is designed specifically for USB.

atmega32u4 USB

  • level-conversion-with-zenerFor USBASP (atmega8) and Attiny85 board, the circuit is a bit more complex, and you can read a full description here. There two 68R on D+ and D- dataline, and two 3.6V zener diodes too to limit the volt between 3V3 and 5V, if you miss these the communication will be not stable and board will be not “recognized” by PC. There is another pull-up 1.5K resistor on D+ line.

What it can do?

  • There should be a lot of things you can do, for example here, the easylogger can send the analog volt value directly reading from the IOs to PC (since it recognized as input device), so when you open a notepad, it will keep typing the value. (More information and hacking you can ready the raw easylogger code, PB1 LED, PB3 (w/LED) and PB4 analog read, PB0 and PB2 for USB data).
  • There are more fun things you can do, can be programmed as keyboard, mice, joystick, of course, a programmer USBASP is really good for us. Some more projects can be found at objective development page, however these projects at bit old.
  • Another good point is, it only take any two IOs to talk with USB, some other alternative solution like using UART to USB solution (PL2303, FT232, etc) have much higher cost and occupy the useful UART ports.

You can get this USBASP programmer in our store, other two development boards will also arrive later in store.

Share this post

Comments (2)

  • poulbran Reply

    Thanks for the soldering! The boards also break of in your computer.

    September 12, 2016 at 10:00 am
  • poulbran Reply

    ^ off

    September 12, 2016 at 10:01 am

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.