Paper Car Design

I have simplified the electronics for the paper car. My new design takes advantage of the WS2812B RGB LED which is easier to assemble because it reduces the component count from four down to one part. I also realized that while assembling the circuitry directly in copper foil is fun; it takes greater than an hour. To reduce the car assembly time the entire circuit is pre-assembled on a small 22x33mm PCB. The schematic of the car is easy to follow and consist of only the Tiny84A processor, WS2812B LED and two FETs that drive the pager motors.

PaperCar2014Schematic
The paper car circuit includes an AVR processor that can be programmed from within the Arduino environment. The advantage of this design is that the base board is small and inexpensive. It is very much like an Arduino Nano except the processor in this design provides only 8K of memory. The small physical size allows it to be attached to just about anything using double sided tape. The design can run LED strips or be embedded in a birthday card or it can be used to run a paper car.

The programmer for this design is a custom ISP programmer that has been designed to work easily with this board. I have used a spring loaded contact to allow the programmer to make contact with the target. This strategy allows you to reuse the programmer while also allowing you to program the target processor after it has been installed in a project. The processor can also be programmed from an Arduino that has been configured as a programmer. See http://arduino.cc/en/Tutorial/ArduinoISP for instructions on using your Arduino to program the Tiny84A.
The WS2812B is a bit addressable RGB LED and is supported directly from the new environment I have created. I have embedded a bit bang library for the WS2812 so that it is directly accessible from your sketch. The design of the driver is based on the ideas presented on the following website http://cpldcpu.wordpress.com/2014/01/14/light_ws2812-library-v2-0-part-i-understanding-the-ws2812/ . The LED output pin on the circuit board allows you to drive multiple WS2812B’s or even a LED strip. The relatively small SRAM space on the Tiny84A will limit the total number of LEDs that can be driven to ~100. Not really much of a limit.

To allow the car to be seen from the Arduino development environment I created a new board variant that maps the processor pins so that they can be used in a sketch. To simplify the installation of the software I created a copy of Arduino-1.0.5-r2 and modified it to include everything you need to write code for the car. I did this to create an immediately useable design. The new Arduino environment makes the following changes to the standard Arduino installation.

  • Add a board variant for the car. Copy “PaperCar_2014” folder to arduino-1.0.5-r2/hardware/arduino/avr/variants
  • Set up the default start up to select the car variant. Edit boards.txt to include the following text at the top of the file. The board.txt file is located in the arduino-1.0.5-r2/hardware/arduino/ avr directory.
  • ##############################################################
    attiny84.name=Paper Car 2014
    attiny84.bootloader.low_fuses=0x62
    attiny84.bootloader.high_fuses=0xdf
    attiny84.bootloader.extended_fuses=0xff
    attiny84.upload.maximum_size=8192
    attiny84.build.verbose=1
    attiny84.build.mcu=attiny84
    attiny84.build.f_cpu=8000000L
    attiny84.build.core=arduino:arduino
    attiny84.build.variant=Paper_Car_2014

  • Update the avrdude.conf file so that the warnings “avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny84” is eliminated . Add the following text starting at line 12,583 of avrdude.conf which can be found in the arduino-1.0.5-r2/hardware/tools/avr/etc directory
  • pagel = 0xB3;
    bs2 = 0xB4;

  • Add PaperCar2014_ library to support WS28212B and motor speed . Copy the folder PaperCar2014_ library to the the arduino-1.0.5-r2/libraries directory.
  • Provide new example code for the car
  • Install files:

    Paper_Car_Install.zip

    Leave a Reply

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