Introduction: POV Display Fidget Spinner Using ATmega8 and Arduino IDE
Fidget spinners are always fun to play with but dont necessarily have a purpose, keeping this in mind and after coming across a few Light displaying Fidget spinners on web, I desgined this project to with an aim to acheive similar results in a very less manufacturing cost!
This PCB project is very similar to basic fidget spinners when it comes to size and feel but it displays pre programmed messages, single word or multiple using a method known as POV Displaying (Persistance of Vision)
Programming is done in the Arduino envoironment which makes it very easy to update and find support regarding the project. Its based on SMD Atmega8 which is comparatively very cheap than regular Atmega328p, but needs to be flashed with a bootloader in order to be programmed via Arduino which is explained in coming steps.
Gerber files are available exclusively for patrons : https://www.patreon.com/robox
Reach out on any of the platforms to buy the Spinner :)
Supplies
- Soldering tools
- Tweezers
- Single core wire
Components Required:
- 220 Ohm SMD resistor 0805 - 9
- 10KOhm SMD resistor 0805 - 1
- SMD LED 0805 - 9
- 16Mhz crystal
- SMD ATmega8-au
- TCRT5000 sensor -1
Step 1: What Is POV?
POV stands for Persistence of Vision, where LEDs are attached in a linear line and are moved physically to form a matrix of LEDs. The human eye cannot process more than 10-12 images per second. When a series of images more is presented in quick succession, it gives us the illusion that the images are in motion. This movement is fast enough to trick our eyes in thinking the message is displayed entirely.
Images here show how we frame the data bytes which need to be displayed and how we display one letter at a time.
For more detailed info on POV click here.
Step 2: PCB Designing and Features:
PCBs are designed in Altium designer (click here to get a free trail) and were manufactured by PCBWay,
First prototype order on PCBWay is free! Head on to https://www.pcbway.com/ to avail exciting offers.
Click here to buy these PCBs directly from PCBWay using the shared project feature.
Features:
- Atmega8 Microcontroller based
- 9 SMD LEDs used
- Powered by cheap CR2032 batteries
- 3 battery sockets for more run time
- TCRT sensor used for precision
- Clocked at 16MHz
- FTDI programming port on board
Specifications:
- Size: 72*72 mm
- Bearing used:
- FR4 1.6 mm PCB with black soldermask
Step 3: Soldering the Components
SMD components need be soldered first, Use of ample amount of flux will ease the task.
Remove the individual LEDs from the TCRT5000 casing to solder on to the PCB.
Solder single core wires to LEDs D5,D6,D7 (According to the silkscreen, originally the SPI pins of Atmega8) and to the cap near DTR pin in order to burn bootloader in next step.
Step 4: Setting Up Arduino IDE Burning Bootloader and Testing the Board
To set up Arduino IDE to program ATmega8 boards, head on to https://github.com/MCUdude/MiniCore and follow the instructions to add in the core in the Arduino environment.
Once Arduino IDE is set with the necessary cores, next step is to burn the bootloader in the chip. It will help the chip understand the Arduino language. for that we need any ardunio board, I used Arduino Nano.
Upload ArduinoISP code that can be found in examples in the Arduino and follow the regular Arduino as ISP connections connections:
Next, select Atmega8 in the minicore core from the boards menu and hit Burn bootloader command, after burning bootloader, FTDI board can be used to upload codes from now on.
A simple (slightly modified) blink code can be seen in the video.
Step 5: Get Figety!
Due to vast support Arduino offer, coding the spinner wasn't a difficult task. Code I utilized is mod and can be downloaded from my github.
Hop on the coin cell batteries and get fidgety :P
Improvements:
- Deep sleep capabilities of ATmega8 can be tested to increase run time.
- Adding one more sensor can result in more precise displaying along with spin direction detection