User Tools

Site Tools


products:microtouch:index.html

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
products:microtouch:index.html [2011/01/27 00:04]
ladyada
products:microtouch:index.html [2016/01/28 18:05] (current)
Line 2: Line 2:
  
 {{  :​products:​microtouch:​microtouchlattice_t.jpg ​ |}} {{  :​products:​microtouch:​microtouchlattice_t.jpg ​ |}}
 +
 +{{  :​products:​microtouch:​imageslide_t.jpg ​ |}}
  
 {{  :​products:​microtouch:​microtouchback_t.jpg ​ | :​products:​microtouch:​microtouchback_lrg.jpg}} {{  :​products:​microtouch:​microtouchback_t.jpg ​ | :​products:​microtouch:​microtouchback_lrg.jpg}}
  
-{{  :​products:​microtouch:​microtouchstuffback_t.jpg ​ |:​products:​microtouch:​microtouchstuffback_lrg.jpg}} 
  
 Sure, the iTouch is pretty cool. But who wants such a locked down device? Why not build your own touch-screen device, with your own apps, all on open source hardware and using open source tools? OK, it can't play MP3s, but it does have a 320x240 TFT color display with resistive touch screen, an Atmega32u4 8-bit microcontroller,​ lithium polymer battery charger, backlight control, micro-SD slot, and a triple-axis accelerometer. Yeah, this is the next big thing and for those of us who like to DIY, you can do a lot of cool stuff with this dev board. Sure, the iTouch is pretty cool. But who wants such a locked down device? Why not build your own touch-screen device, with your own apps, all on open source hardware and using open source tools? OK, it can't play MP3s, but it does have a 320x240 TFT color display with resistive touch screen, an Atmega32u4 8-bit microcontroller,​ lithium polymer battery charger, backlight control, micro-SD slot, and a triple-axis accelerometer. Yeah, this is the next big thing and for those of us who like to DIY, you can do a lot of cool stuff with this dev board.
Line 11: Line 12:
 Of course, we wouldn'​t leave you with just a schematic and a 'good luck'! The designer of the microtouch (known to us by the code name [[http://​rossum.posterous.com/​|"​Rossum"​]]) has written [[https://​github.com/​rossumur/​microtouch|a full hardware core operating system and multiple demo apps]] such as... Of course, we wouldn'​t leave you with just a schematic and a 'good luck'! The designer of the microtouch (known to us by the code name [[http://​rossum.posterous.com/​|"​Rossum"​]]) has written [[https://​github.com/​rossumur/​microtouch|a full hardware core operating system and multiple demo apps]] such as...
  
-  * **[[http://​wiki.ladyada.net/​products/​microtouch/​index.html#​calibrate_app|Calibrate]]** Touch-screen +  * **[[#​image_viewer_built-in|Image viewer]]** built into the hardware core, you can plug in a microSD card with images, slide shows or animations that show up as 'mini Apps'  
-  * **[[http://​wiki.ladyada.net/​products/​microtouch/​index.html#​doomed|Doomed]]** a 3D rendering maze +  * **[[#​calibrate_app|Calibrate]]** Touch-screen 
-  * **[[http://​wiki.ladyada.net/​products/​microtouch/​index.html#​accelerate_app|Accelerate]]** keep the ball in the center of the screen by tilting +  * **[[#​doomed|Doomed]]** a 3D rendering maze 
-  * **[[http://​wiki.ladyada.net/​products/​microtouch/​index.html#​paint_app|Paint]]** fingerpainting but without the cleanup +  * **[[#​accelerate_app|Accelerate]]** keep the ball in the center of the screen by tilting 
-  * **[[http://​wiki.ladyada.net/​products/​microtouch/​index.html#​flip_app|Flip]]** a Reversi game +  * **[[#​paint_app|Paint]]** fingerpainting but without the cleanup 
-  * **[[http://​wiki.ladyada.net/​products/​microtouch/​index.html#​mines_app|Mines]]** like Minesweeper but without the hassle of installing Windows +  * **[[#​flip_app|Flip]]** a Reversi game 
-  * **[[http://​wiki.ladyada.net/​products/​microtouch/​index.html#​icosohedron_app|3D Icosohedron]]** controllable by tilting the board +  * **[[#​mines_app|Mines]]** like Minesweeper but without the hassle of installing Windows 
-  * **[[http://​wiki.ladyada.net/​products/​microtouch/​index.html#​pacman_app|Pacman]]** a sprite animation demo +  * **[[#​icosohedron_app|3D Icosohedron]]** controllable by tilting the board 
-  * **[[http://​wiki.ladyada.net/​products/​microtouch/​index.html#​lattice_app|Lattice]]** 3D lattice demo+  * **[[#​pacman_app|Pacman]]** a sprite animation demo 
 +  * **[[#​lattice_app|Lattice]]** 3D lattice demo
  
-The project is a collaboration between Rossum & Ladyada!+The project is a collaboration between Rossum & Ladyada! ​ 
 + 
 +Designed in California and New York 
 + 
 +====== Hardware Design ====== 
 + 
 +{{  :​products:​microtouch:​microtouchstuffback_t.jpg ​ |:​products:​microtouch:​microtouchstuffback_lrg.jpg}}
  
-====== Microcontroller ​======+===== Microcontroller =====
  
 {{  :​products:​microtouch:​microtouchavr.gif ​ |}} {{  :​products:​microtouch:​microtouchavr.gif ​ |}}
Line 30: Line 38:
  
  
-====== Lithium Polymer batteries & charger ​======+===== Lithium Polymer batteries & charger =====
  
 {{  :​products:​microtouch:​microtouchstuffback_t.jpg ​ |:​products:​microtouch:​microtouchstuffback_lrg.jpg}} {{  :​products:​microtouch:​microtouchstuffback_t.jpg ​ |:​products:​microtouch:​microtouchstuffback_lrg.jpg}}
Line 38: Line 46:
 The board has a built in single-cell 3.7v LiPoly charger ([[http://​www.microchip.com/​wwwproducts/​Devices.aspx?​dDocName=en527982|MCP73812]]). The LiPoly should be connected to the [[http://​www.ladyada.net/​wiki/​partfinder/​jst|2-pin 2.0mm JST-PH]] - verify polarity before connecting! The charger chip is very simple but will properly charge the lipoly. The charge rate is set to be about 250 mA, so do not plug it into a non-powered hub. It should work fine with any computer. Unfortunately there is no notification when the battery is charging (say an LED) but you can detect the battery status via the microcontroller'​s ADC pin. You can change the charge rate by adjusting **R17** from 4.7K. Check the MCP73812 datasheet for the resistor that corresponds to your desired charge rate The board has a built in single-cell 3.7v LiPoly charger ([[http://​www.microchip.com/​wwwproducts/​Devices.aspx?​dDocName=en527982|MCP73812]]). The LiPoly should be connected to the [[http://​www.ladyada.net/​wiki/​partfinder/​jst|2-pin 2.0mm JST-PH]] - verify polarity before connecting! The charger chip is very simple but will properly charge the lipoly. The charge rate is set to be about 250 mA, so do not plug it into a non-powered hub. It should work fine with any computer. Unfortunately there is no notification when the battery is charging (say an LED) but you can detect the battery status via the microcontroller'​s ADC pin. You can change the charge rate by adjusting **R17** from 4.7K. Check the MCP73812 datasheet for the resistor that corresponds to your desired charge rate
  
-====== 3.3V power supply ​======+===== 3.3V power supply =====
  
 {{  :​products:​microtouch:​microldo.gif ​ |}} {{  :​products:​microtouch:​microldo.gif ​ |}}
Line 44: Line 52:
 The output of the lithium polymer battery (or USB passthru) connects to a LP2985 3.3v LDO. This regulator is fairly good quality and will give about 1% precision output and up to 150mA. Most of the power usage in this design is for the 4 x backlight LEDs which can be up to 80mA total. There is also 10-20 mA taken by the microcontroller,​ ~20mA taken by the TFT, and another 2 mA for the red indicator LED. The accelerometer takes almost no power. The output of the lithium polymer battery (or USB passthru) connects to a LP2985 3.3v LDO. This regulator is fairly good quality and will give about 1% precision output and up to 150mA. Most of the power usage in this design is for the 4 x backlight LEDs which can be up to 80mA total. There is also 10-20 mA taken by the microcontroller,​ ~20mA taken by the TFT, and another 2 mA for the red indicator LED. The accelerometer takes almost no power.
  
-====== Indicator LED ======+===== Indicator LED =====
  
 {{  :​products:​microtouch:​microled.gif ​ |}} {{  :​products:​microtouch:​microled.gif ​ |}}
Line 50: Line 58:
 This LED is on pin **PC7** and is used to indicate when the bootloader is active. You can use it for pretty much anything you'd like This LED is on pin **PC7** and is used to indicate when the bootloader is active. You can use it for pretty much anything you'd like
  
-====== Crystal ​======+===== Crystal =====
  
 {{  :​products:​microtouch:​microtouchxtal.gif ​ |}} {{  :​products:​microtouch:​microtouchxtal.gif ​ |}}
Line 56: Line 64:
 The timing crystal is at 16 MHz. This is overclocking the Atmel a bit (at 3.3v it would prefer to be at 12MHz) - we test the chips to verify they work before shipment. The reason for overclocking is to be able to do fast video-speed display interfacing. The crystal has two stability capacitors next to it. The timing crystal is at 16 MHz. This is overclocking the Atmel a bit (at 3.3v it would prefer to be at 12MHz) - we test the chips to verify they work before shipment. The reason for overclocking is to be able to do fast video-speed display interfacing. The crystal has two stability capacitors next to it.
  
-====== Power button (aka How to turn it on!) ======+===== Power button (aka How to turn it on!) =====
  
 {{  :​products:​microtouch:​micropower.gif ​ |}} {{  :​products:​microtouch:​micropower.gif ​ |}}
Line 64: Line 72:
 Of course, to turn itself off, the chip can drop **PF0** low. The user will have to press the button again to turn it back on. This shoudln'​t be done when on USB power because the bootloader can get stuck in a '​brownout loop' but a press of the reset button will '​kick'​ it out. Of course, to turn itself off, the chip can drop **PF0** low. The user will have to press the button again to turn it back on. This shoudln'​t be done when on USB power because the bootloader can get stuck in a '​brownout loop' but a press of the reset button will '​kick'​ it out.
  
-====== Reset Button ​======+===== Reset Button =====
  
 {{  :​products:​microtouch:​microreset.gif ​ |}} {{  :​products:​microtouch:​microreset.gif ​ |}}
Line 70: Line 78:
 The Reset button is connected to the AVR's reset pin. You can use this to enter the bootloader (or, if you overwrote the bootloader, reset the board) The Reset button is connected to the AVR's reset pin. You can use this to enter the bootloader (or, if you overwrote the bootloader, reset the board)
  
-====== ISP header & AVR reprogramming ​======+===== ISP header & AVR reprogramming =====
  
 {{  :​products:​microtouch:​microisp.gif ​ |}} {{  :​products:​microtouch:​microisp.gif ​ |}}
Line 76: Line 84:
 The AVR can be reprogrammed by any standard AVR programmer and avrdude or similar. If reprogramming,​ don't forget you have to keep the power button pressed during the programming cycle **or** plug it into the miniUSB jack **or** provide 3.3V power from the programmer. Just make sure that the target power really is 3.3v, for example the USBtinyISP provides 5 not 3.3v which could damage the LCD The AVR can be reprogrammed by any standard AVR programmer and avrdude or similar. If reprogramming,​ don't forget you have to keep the power button pressed during the programming cycle **or** plug it into the miniUSB jack **or** provide 3.3V power from the programmer. Just make sure that the target power really is 3.3v, for example the USBtinyISP provides 5 not 3.3v which could damage the LCD
  
-====== LCD backlight ​======+===== LCD backlight =====
  
 {{  :​products:​microtouch:​microbacklight.gif ​ |}} {{  :​products:​microtouch:​microbacklight.gif ​ |}}
  
-The LCD has 4 backlight white LEDs in parallel. We use a 22-68 ohm resistors (the image shows 68, the value may change depending on how bright the TFT backlight is for the current model) on each Cathode (K) and drive the cathode with a NPN connected to pin **PC6**. You can dim the backlight by software-PWMing ​the pin (there is no hardware PWM on that pin). For the most part either the backlight is on or off. When off, the display is not visible.+The LCD has 4 backlight white LEDs in parallel. We use a 22-68 ohm resistors (the image shows 68, the value may change depending on how bright the TFT backlight is for the current model) on each Cathode (K) and drive the cathode with a NPN connected to pin **PC6**. You can dim the backlight by changing ​the hardware PWM value of the pin. When off, the display is not visible ​- it is transmissive,​ not transflective.
  
-====== microSD/​transflash card ======+===== microSD/​transflash card =====
  
 {{  :​products:​microtouch:​microsd.gif ​ |}} {{  :​products:​microtouch:​microsd.gif ​ |}}
-  + 
-====== 3-axis Accelerometer ​======+Both MicroSD and MicroSD High Capacity cards are supported. 
 + 
 +===== 3-axis Accelerometer =====
  
 {{  :​products:​microtouch:​mma7455.jpg ​ |}} {{  :​products:​microtouch:​mma7455.jpg ​ |}}
Line 94: Line 104:
 Do not throw the Microtouch to test the accelerometer! Please use the Accelerate App instead :) Do not throw the Microtouch to test the accelerometer! Please use the Accelerate App instead :)
  
-====== USB  ​======+===== USB  =====
  
 {{  :​products:​microtouch:​usb.jpg ​ |}} {{  :​products:​microtouch:​usb.jpg ​ |}}
Line 101: Line 111:
  
 The USB port is also used to recharge the LiPo battery at about 250mA. You can also run the Microtouch direct from USB but because the lipo charger is connected directly to the regulator, it can't supply the full 100-150mA required (the voltage isnt buoyed by the battery). As a result, the core code will detect the voltage drop and dim the backlight. For that reason, you'll notice its dimmer without a battery The USB port is also used to recharge the LiPo battery at about 250mA. You can also run the Microtouch direct from USB but because the lipo charger is connected directly to the regulator, it can't supply the full 100-150mA required (the voltage isnt buoyed by the battery). As a result, the core code will detect the voltage drop and dim the backlight. For that reason, you'll notice its dimmer without a battery
 +
 +====== Bootloader ======
 +
 +You don't need an AVR programmer to use this board, we put a nice bootloader on there already! The bootloader is activated by pressing the RESET/BOOT button while plugged into USB. You can tell the bootloader is active when the **green '​Boot'​ LED pulses/​breathes** The board will then show up as a Serial or COM port, and you can use **avrdude** to program it. The '​programmer name' is **avr109** so for example, to test you should run **avrdude -p m32u4 -P COM3 -c avr109** which will initialize the bootloader.
 +
 +{{  :​products:​atmega32u4breakout:​avr109.gif ​ |}}
 +
 +The bootloader will time out eventually (after about 5 seconds)
 +Because we are not using a USB/serial converter, bootloading is tremendously fast, we can program a full chip in under 2 seconds!
 +
 +The bootloader takes up the last 4K of FLASH, so be aware that you will only have 28K instead of 32K. We have found that this isn't very constricting as 28K is still plenty. If you'd like more space, you can always use the 6-pin ISP connector and an AVR programmer (which will delete the bootloader)
 +
 +If you're using windows, you will need an **inf** driver file, you can download it below (in the **Downloads** section). Mac/Linux peeps don't as it shows up as a '​generic'​ serial port in /​dev/​ttyUSB* or /dev/cu.* (check both and/or **dmesg**)
 +
 +{{:​products:​microtouch:​microtouchcdcboot.zip|Here is a copy of the bootloader, makefile and a bat file to show how we program microtouches}}
  
 ====== Apps! ====== ====== Apps! ======
Line 111: Line 136:
  
 The main screen shows all the apps you have programmed into the microtouch. Select an app by touching the circle with your finger The main screen shows all the apps you have programmed into the microtouch. Select an app by touching the circle with your finger
 +
 +
 +===== Image viewer (Built-in) =====
 +
 +{{  :​products:​microtouch:​flower_t.jpg ​ |:​products:​microtouch:​flower.jpg}}
 +
 +You can use the microtouch as a photo viewer by converting images into **im2** (which makes it easier to draw to the screen). The converter is in the github repository. Place the images in the root directory of the microSD card and plug in the card. Turn on the microtouch and you'll see the icons for the images. Pres the circle to load the first one. You can '​swipe'​ your finger to move from one image to the next.
 +
 +{{  :​products:​microtouch:​imageslide_t.jpg ​ |:​products:​microtouch:​imageslide_t.jpg}}
 +
 +Troubleshooting: ​ The files on the SD card might not show up immediately upon bootup. ​ When using cards 2GB or larger, if the image icons do not appear, go to the HWTest app and ensure that it confirms the card is ready. ​ After leaving the HWTest app, the icons appear.
  
 ===== Off ===== ===== Off =====
Line 173: Line 209:
  
 A '​go'​-like game, this single player game is over when all the tiles turn one color A '​go'​-like game, this single player game is over when all the tiles turn one color
 +
 +====== Download ======
 +
 +  * [[https://​github.com/​adafruit/​microtouch|PCB files in EagleCAD format are available from Adafruit'​s github]] (CC attrib/​share like)
 +  * [[https://​github.com/​rossumur/​microtouch|Firmware core including image converter is all available from Rossum'​s github]] (MIT license)
 +  * [[http://​www.adafruit.com/​datasheets/​atmega32u4cdc.inf|Bootloader INF file for windows (mac/linux don't need a driver)]]
 +
 +To develop code, you'll need an install of the AVR-gcc tool chain.
/home/ladyada/public_html/wiki/data/attic/products/microtouch/index.html.1296086656.txt.gz · Last modified: 2016/01/28 18:05 (external edit)