The principle of shake LED stick is based on that people have
persistence of visual senses. When you light up a column LED at different moments in different ways, shake it, and a very beautiful picture will display before your eyes. It not only can display pictures but also can display characters, both static and dynamic. The pictures will be very nice. We can equip this kind of LED on our bicycles and fans, and other things. It’s good choice for DIY.
Step 2: Make
Cut perforated circuit board into halves (image 2)
Connect the two pieces of boards (image 3)
Solder LED, vibrating sensor (image 4, image 5)
4.1 You must get data of the characters that you want to display, and data mode is column by column, for example “12”: (image 6)
Column by column data mode is: first, get the first column data, then
get the second data, and by this analogy. The LEDs have a common anode, so I need to invert the data. You can get the character data from the below URL, as displayed in the above picture:
4.2 Data Update
When you are shaking LED stick, vibrating switch will switch on and off
and MCU can catch this variation level. We can enter interruption function and update data. So why do we need this vibrating switch? Because we can’t update at any time, we need a reference point to make sure that the position of picture will not change. First, we set the first column data, and delay, then set the second column data, and delay, by this analogy, you will see a picture if the delay time is too short. The performance is as below: (image 7)
Step 3: Improvement
It is so weary to use our hands, why not use a motor? Now, let’s see my improvement, and you need:
1. Make motor paste on perforated circuit board.
2. Use infrared sensor instead of vibrating sensor, and infrared sensor’s position must be situated suitably. My method is: equip infrared sensor near rotating shaft, because when infrared sensor detect motor it will output a signal, vice versa, then MCU can update data. (image 10)
3. Due to the circuit board rotates as the motor runs, we need to install MCU and the battery on rotary stick, and make it balance. (image 11)
This is to use infrared sensor to get a reference, and update data column by column. You can use your imagination, and display more beautiful pictures, next is my rotary clock, expect your share.
I got some other ideas: I want to display an expression or a small key,
or an animal. It will be amazing if the animal can move and run. Do you have better idea?
Download codes here: shake LED stick
Source page:ElecFreaks blog