Create standstill effect with LED from hall effect sensor ? Answered
A little bit info of what I'm working on. I am trying to create a standstill effect of the spokes of the car rim. I attached a hall effect sensor and a magnet to inside of the rim . I have tried 2 different approaches : ( code for each method are also attached)
1. use the hall effect sensor to determine the RPM of the rim and then flash the led accordingly to the spokes on the rim. The problem with this approach is that the led flash quite dim and and the spoke image rift. I cant find the right windows for flashing LED.
2. use the the hall effect sensor to detect any magnetic field and then flash whenever it is detected. This method is quite simple but the effect is blurry. The problem for this is that the magnet detection happen on the arc of the rim instead of at 1 pin point location. Hence the led is on for too long --> blurry effect. I also attache some diagram to explain my problem in case I didn't do well with words.
Do you have any suggestion, solution or comment on the approaches or the code. Please feel free to throw in. Im all ear.
Method 1: Calculating RPM then flash led : http://txt.do/5b9is
I am leaning toward this method but the effect is rifting. Not entirely sure how to fix it or what could possibly cause it.
to clarify: the rifting effect happen when i use 2 magnets on the rim. with only 1 magnet, it still rift but the led very dim, almost unnoticeable.
Image for the 2nd approach in case the pictures didnt show on instructables
the front : http://imgur.com/HwFm1lT
the back : http://imgur.com/1DvWjZK
the side : http://imgur.com/RHZIbfR
The problem : http://imgur.com/RHZIbfR
flashing LED whenever sensor detect the magnet: http://txt.do/5b9b7