Hi guys. Wellcome back to a new awesome tutorial. POV or persistance of vision refers to the optical illusion that occurs when visual perception of an object does not cease for some time after the rays of light proceeding from it have ceased to enter the eye.
by: ELECTRONOOBS on 2026-05-06
The illusion has also been described as "retinal persistence", "persistence of impressions", simply "persistence" and other variations.
In this project we will learn how to use a Hall sensor in order to detect rotations. We will count the time it takes to make a full rotation of the POV propeller and by dividing the measured value by 360 we get time per degree. Next, with a smart code we decide when to turn on and off a line of LEDs in order to draw shapes in the air. The propeller will spin fast enough so the human eye won't be able to tell the difference and we will se an imaginary fixed shape. So let's get started.
Ok guys so our project is restrained to th amount of digital outputs the Arduino NANO or promini has. In this case we will use pins D2 to D13 of the Arduino since pins D0 and D1 are the Tx and Rx pins and we can't solder anyting to those and be able to upload code after that. If we look in the port map below of the Arduino with the ATMEGA328p chip, we see the ports for each pin.

We will use a total of 11 LEDs. I've used 8 green LEDs for the hour/minutes lines. Two red LEDs for the hours points and a blue LED for the border circle. For each LED we need a 100ohm resistor. We will also use a A3144 hall sensor switch with a 10K ohm resistor pullup. You could use both Arduino NANO or the Arduino proMini with 4V adn 16MHz speed. Finally we need some drilled PCB, wires, a 7.4V 2S LiPo battery, a sliding switch and the 3D case that I've designed. Use the link below for the full part list and also the download link of the 3D printed case for this project.
Arduino NANO: LINK eBay
LEDs: LINK eBay
7.4V LiPo: LINK eBay
Resistors: LINK eBay
Sliding switch: LINK eBay
A3144 hall switch: LINK eBay
Proto PCB: LINK eBay

Check the schematic below. Download it and have it in front of you while soldering. As we can see we have our hall sensor connected to a pullup to 5V from the arduino. The signal pin from the sensor (pin 3 of A314) is connected to digital pin D13 of the Arduino. On this pin we will generate pin change interruptions. Next we have 11 LEDs connected to pins D2 to D12 each with a 100 ohm resistor to limit the current. To supply the entire circuit I've used a LiPo 7.4V battery and a sliding switch to power everything up. Use some male pins for the battery if you want to take it out later for external cahrging.

You could solder everything on a drill PCB as I first did for my first prototype you can see below or download the 3D case I've designed and place everything inside it.

You have the files for the 3D printed parts in an STL format in the link above. These files include the main case, the back lid, the motor support, the two legs for the bearing and the top bearing supports. This should be the final shape of the entire project. Use M3 screws and nuts and fix everything in place.
On a wood plate place the two 3D printed legs with M3 screws. On a M8 large screw place the main case with nuts and washers.

Inside of the main case we will palce everything once soldered. Remember to ad the back lid and on this glue the sliding switch. On the fron line hole we will place the 11 LEDs and on the other side hole the hall sensor on the exterior of the case. The DC motor placed belwo and a connection between the motor and M8 screw pulleys. That's it. Now let's solder everything and place it inside and then look at the code.
First of all on a small pice of drilled PCB I solder the 8 green LEDs' follower by the two red ones and finally the blue one. Each with its 100 ohm resistor and a wire long enough. The short pin of each LED is the negative pin and all the LEDs share GND on that pin.

Now glue the small PCB with the LEDs on the interior of the case and solder each of the wires to pins D2 to D12 of the arduino. Alos solder the GND wire from all of the LEDs to the GND pin of the arduino. Don't use too large wires so shortehn each LED wire so it will fit almost exactly.
On the other side solder a 1K ohm resistor between 5V and the signal pin of the A3144 hall sensor. Also share GND between the middle pin of the A3144 and the Arduino GND pin. Finally solder the signal pin to digital pin D13 and we are done.

The last aprt is to glue the sliding switch on the 3D printed lid and solder two wires. One from the LiPo to the first pin of the switch and another from the Vin pin of the Arduino to the middle pin of the switch. I've added an extra two male pins so I'll be able to disconnect the battery for external charging.
Also remembre to glue the samll magnet on the bottom support so it will always be in front of the Hall sensor while spinning. I've used hot glue to to that as you can see below.

Don't close the case till we upload the code. Make sure that everything is well fixed in place with glue and that the propeller is balanced. For that it should always be horizontal when is not spinning. Add extra weight in order to balance it. Let's get to the code part on the next page.
Now let’s look over the code that you could also download from a link below. Make sure you’ll read all the comments in the code in order to understand it. This is the POV clock code. You also have the POV text display code later below but I’ll only explain this one. Ok, so first read the first part where we define the variables that we need such as the counters, time constants and so on.
/* Electronoobs POV dsiplay (Persistance of vision)
* Subscribe: http://www.youtube.com/c/ELECTRONOOBS
* Tutorial: http://www.electronoobs.com/eng_arduino_tut21.php */
//Variables for real time count
unsigned long Real_time_millis = 0;
unsigned long Previous_real_time_millis = 0;
float SEC;
float MIN= 45;
float HOUR = 2;
float dots_marker = 0; //Variable used for the 4 red dots
//POV clock cariables
unsigned long currentMillis, elapsed_loop_counter, previousMillis;
unsigned long counter_1, current_count;
//Interruption varaibles to count rotation speed
//We create 4 variables to store the previous value of the input signal (if LOW or HIGH)
byte last_IN_state; //Here we store the previous state on digital pin 13
float one_rot_time=0; //Here we store the full rotation time
float time_per_deg=0; //Here we store the time it takes to make one degree rotation
In the Setup.void we set the registers needed to activate the pin state interruption on digital pin D13 which is on port D of the Arduino that uses the ATMEGA328p chip. Alos set the registers for pins D2 to D12 to be set as OUTPUTS and set them to a LOW value.
void setup() {
PCICR |= (1 << PCIE0); //enable PCMSK0 scan
PCMSK0 |= (1 << PCINT5); //Enable pin state interruption on pin D13
//Output pins register configuration
/* D2 = Blue LED
* D3 = Red 1 LED
* D4 = Red 2 LED
* D5 = Green 1 LED
* D6 = Green 2 LED
* D7 = Green 3 LED
* D8 = Green 4 LED
* D9 = Green 5 LED
* D10 = Green 6 LED
* D11 = Green 7 LED
* D12 = Green 8 LED
*/
DDRD |= B11111100; //2 to 7 as output
DDRB |= B00011111; //8 to 12 as output
DDRB &= B11011111; //13 input
PORTD &= B00000011; //2 to 7 LOW
PORTB &= B11100000; //8 to 12 LOW
}
Now in the void loope we count seconds, minutes and hours and decide at which degree create the bar of LEDs for each of this using "if" statements. In this void loop we alos count the elapsed time on each rotation in order to know when to turn ON or OFF the LEDS. The blue LED connected on D2 will be always on creating the clock perimeter. The two red LEDs will turn on each 5 seconds or each hour on the clock design.
That's it. Download the code and upload it to the Arduino NANO. Turn the Arduino on using the slide switch, make sure the magnet is close enough of the hall sensor while spinning and turn on the DC motor that will spin the propeller. We are done. We created our POV clock. In the link below you will find a code for the text display as well.
By the way, there is no battery charging included in the schematic. Probably that will be a future upgrade. For now, just unplug the battery for external recharge and you’re good to go. If you like this kind of projects, check my Patreon page and support my workshop thru there. I would really, really, appreciate that guys since I spend a lot of time and money for each project Also use my forum and create new question there so me or any other member could answer it.

I hope that you’ve enjoyed this tutorial on POV display. If you have any question about this tutorial or any other, just leave it on my forum page. Also, don’t forget to subscribe and watch all of my other great tutorials. Remember, if you consider helping my projects check my Patreon page as well. Thanks again and see you later guys.
Leave a comment
Please login in order to comment.