Pov Cylinder With Arduino Due

About the project

The device displays animated GIF pictures on a rotating cylinder. The GIF pictures can be downloaded from a PC via Bluetooth.

Project info

Difficulty: Difficult

Platforms: ArduinoAtmelMicrosoftTexas Instruments

Estimated time: 1 month

License: MIT license (MIT)

Items used in this project

Hardware components

ARDUINO DUE ARDUINO DUE x 1
433MHz wireless ISM transceiver module 433MHz wireless ISM transceiver module x 1
RGB LED Weatherproof Flexi-Strip 30 LED/m RGB LED Weatherproof Flexi-Strip 30 LED/m x 1
Voltage Regulator - 5V Voltage Regulator - 5V x 1
General Purpose LVDT with Guided Core General Purpose LVDT with Guided Core x 1
Resistor Network - 330 Ohm (6-pin bussed) Resistor Network - 330 Ohm (6-pin bussed) x 3
Resistor Network - 330 Ohm (6-pin bussed) Resistor Network - 330 Ohm (6-pin bussed) x 1
Resistor 1K Ohm 1/4 Watt PTH - 20 pk Resistor 1K Ohm 1/4 Watt PTH - 20 pk x 2
Transistor NPN (2N3904) Transistor NPN (2N3904) x 1
Sparkfun Capacitor Kit Sparkfun Capacitor Kit x 1
Sparkfun Capacitor Kit Sparkfun Capacitor Kit x 1
Sparkfun Capacitor Kit Sparkfun Capacitor Kit x 1
Resistor Network - 330 Ohm (6-pin bussed) Resistor Network - 330 Ohm (6-pin bussed) x 1
Resistor 1K Ohm 1/4 Watt PTH - 20 pk Resistor 1K Ohm 1/4 Watt PTH - 20 pk x 1
GravityDIGITAL IR Transmitter Module GravityDIGITAL IR Transmitter Module x 1
GravityDigital IR Receiver Module GravityDigital IR Receiver Module x 1
Tiny Breadboard Tiny Breadboard x 1
Styrofoam Cylinder (Diameter: 20cm, Height: 10cm) Styrofoam Cylinder (Diameter: 20cm, Height: 10cm) x 2
DC Gear Motor 12V 100RPM DC Gear Motor 12V 100RPM x 1
THERMOPILE TEMP ELEMENT TO-5 THERMOPILE TEMP ELEMENT TO-5 x 1
THERMOPILE TEMP ELEMENT TO-5 THERMOPILE TEMP ELEMENT TO-5 x 1
2112 LUTs 80 IO 3.3V 6 Spd 2112 LUTs 80 IO 3.3V 6 Spd x 1
Ground Bar 1 x .125 Tapped - Fits 1800H- Copper Ground Bar 1 x .125 Tapped - Fits 1800H- Copper x 3
5V@2A, 6.3VCT@2A 330-0-330 5V@2A, 6.3VCT@2A 330-0-330 Used as shaft. x 1
STANDARD CONTACT MICROPHONE STANDARD CONTACT MICROPHONE x 1
Copper Foil Tape w/ Conductive Adhesive Copper Foil Tape w/ Conductive Adhesive Used to stick on rotor x 1
Plywood Disk (Ø 150mm,  Thickness: 10mm) Plywood Disk (Ø 150mm, Thickness: 10mm) x 2
Aluminum Disk ( Ø 200mm, Thickness: 2.5mm) Aluminum Disk ( Ø 200mm, Thickness: 2.5mm) x 2

View all

Software apps and online services

Atmel Studio IDE Atmel Studio IDE Used for Arduino SW Development
Arduino IDE Arduino IDE Can be used as alternative to Atmel Studio IDE
Cygwin Cygwin Cygwin provides functionality similar to a Linux distribution on Windows. Used for the PC Control Program.
Microsoft Visual Studio 2015 Microsoft Visual Studio 2015 Used for the Graphical User Interface.
Scroll saw (generic) Scroll saw (generic)
Bench Drill (generic) Bench Drill (generic)
Laboratory power supply (generic) Laboratory power supply (generic)

Hand tools and fabrication machines

Soldering iron (generic) Soldering iron (generic) x 1
Laptop with Windows 10 (generic) Laptop with Windows 10 (generic) x 1

Story

Introduction

This is my first Arduino project. My work was inspired by several maker projects that created Persistence of Vision Displays [2,3,4].

Persistence of vision (POV) refers to the optical illusion whereby multiple discrete images blend into a single image in the human mind and believed to be the explanation for motion perception in cinema and animated films [1].

The projects [2,3,4] implement POV globe displays, using discrete LEDs and discrete shift registers. Instead my device is using a rotating cylinder and off-the-shelf RGB LED strips as POV Display.

The main features of my POV Cylinder are:

  • POV (Persistence of Vision) Display
  • Displays animated GIF pictures on a rotating cylinder
  • The GIF pictures are stored in Arduino's RAM or Flash
  • Communication with PC via Bluetooth

Youtube Video

Technical Overview

  • Cylinder Diameter: 200 mm
  • Cylinder Height: 200 mm
  • Cylinder material: Styrofoam
  • Cylinder weight: 420 g
  • 4 RGB LED Strips based on LPD8806
  • Screen size 151 x 40 pixels
  • Based on Arduino Due
  • Includes HC06 Bluetooth module
  • Controlled via Bluetooth from a PC

Mechanical Construction

The mechanical construction is shown in the drawing below.

Mechanical Construction (not to scale)

The device comprises a chassis and a rotor. The chassis consists of two circular plywood disks which are connected via three threaded bars. The distance between the disks is 120 mm. In the middle there are two ball bearings and the shaft. For the shaft also a threaded bar is used. The shaft is driven by an electric motor via two crown gears and a toothed belt. The rotation speed is up to 1300 RPM (22 Hz).

The rotor consists of two styrofoam cylinders and two circular aluminium disks. The styrofoam cylinders are glued to the lower disk. The upper disk can be removed. It is used to attach the rotor to the shaft.

POV Cylinder Chassis (rotor removed)

The electronics is located in the upper part of the rotor. It includes the following parts:

  • Arduino Due board
  • Self-made shield for the Arduino Due board
  • Power Supply (PS) Board
  • HC-06 Bluetooth Module

Rotor Top View

The power supply (7.5V) is fed to the power supply board via sliding contacts and a contact ring.

Four LEDs strips with in total 40 RBG LEDs are used. They are connected with cables to the Arduino Shield.

LED Stripes

The four LED stripes are placed as shown in the drawing below. By using four shifted LED stripes the distance in the Y-axis between the LEDs is divided by 4. The distance in the X-axis is handled by SW. The SW updates all 40 LEDs 151 times per revolution. The grid in the drawing corresponds to the visible pixels.

Placement of LED stripes

Electronic Circuitry

The electronic circuitry is shown in the attached PDF schematic.

There is a power supply board with a LM317 voltage regulator. The input voltage is 7.5 Volt and the output voltage is 4.6 Volt. The voltage regulator supplies the Arduino Due board and the LED strips.

There is also a self-made shield for the Arduino. It contains the connector cables to the LED strips and a circuitry for the IR receiver. The IR receiver is used to detect the rotor position. It is connected to a timer/interrupt input of the Arduino.

There are four LED strips named STRIP0 to STRIP3. Each strip has 5 LPD8806 LED drivers and 10 RBG LEDs. STRIP0 is connect to USART0 and STRIP1 is connected to USART1. Both USARTs are operating in SPI mode. STRIP2 and STRIP3 are connected in series and are driven by the Arduino's SPI interface.

For communication with a PC a HC-06 Bluetooth module is connected to USART3. The Bluetooth module is supplied by the 3.3 Volt provided by the Arduino board.

Arduino Software

The Arduino software consists of the main program (mpc.ino) and the following libraries:

  • bt - Driver SW for Bluetooth module
  • LDP8806 - Driver SW for LED strips
  • MemoryFree - Functions to detect available free RAM memory
  • mpcgif - Playback of GIF files located in RAM or Flash memory
  • pictures - Internal GIF pictures stored in Flash
  • trace - Functions for SW debugging

Periodic output of the pictures to the LED strips is done interrupt driven. There are two toggle frame buffers. Each frame buffer holds one picture with 40 x 151 pixels. Each pixel is a one byte color palette index. While one frame buffer is output to the LED strips via interrupt and DMA, the other frame buffer is prepared by the main program (e.g. by the function decoding the GIF pictures). Toggling of the frame buffers is done by the frame interrupt routine.

There is one frame interrupt per revolution triggered by the IR sensor. The frame interrupt routine measures (via a hardware timer) the evolution speed and programs periodic column interrupts (one per column, i.e. 150 interrupts per revolution) with a hardware timer. The column interrupt routine outputs the current column to the LED strips. For performance reasons output is done via three DMA channels that operate fully in parallel.

The full Arduino source code is available at github.

PC Control Program

The PC Control Program (pccp) is a command line tool written in C++. It is running under Cygwin and communicates with the Arduino via Bluetooth. The pccp allows to control the POV Cylinder with the following single character commands:

  • 0-7 - fill screen with color (black, red, yellow, green, cyan, blue, violet, white)
  • t - draw triangle curve (as a test picture)
  • s - enable or disable rotation of displayed picture
  • r - draw single row 
  • c - draw single column
  • y - playback internal GIF picture stored in Flash memory
  • f - download external GIF file from PC via BT
  • x - playback downloaded external GIF file

The pccp also provides an interface to a graphical user interface. Furthermore it displays the current rotation speed (in Hz and µs) and a frame counter value.

The full source code is available at github.

Graphical User Interface

The graphical user interface is an Universal Windows App. It allows to select the GIF file to be displayed by the POV Cylinder. The app has been derived from the FilePicker app from the "Microsoft Windows Universal Samples" [5].

The full source code is available at github.

Screenshot Graphical User Interface

References

[1] https://en.wikipedia.org/wiki/Persistence_of_vision

[2] RGB LED GLOBE - POV - 40 x 200

[3] POV Globe Display RGB

[4] POV Globe Display RGB - Project description (in German)

[5] https://github.com/Microsoft/Windows-universal-samples

Schematics, diagrams and documents

POV Cyclinder with Arduino Due

This is the schematic.

Code

Arduino source code for POV Cylinder

PC Control Program for POV Cylinder

This is a C++ command line program running under Cygwin

Graphical User Interface for POV Cylinder

This is a Windows Universal App

Credits

Leave your feedback...