80Views12Replies

Author Options:

Create standstill effect with LED from hall effect sensor ? Answered

Hi everyone,

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. 


Code: 

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. 


Method 2: 
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

Discussions

0
None
steveastrouk

2 years ago

If your wheel has 2 fold symmetry, as you show, then you can flash the light 4 times in one revolution, which will give a brighter effect.

0
None
steveastrouk

2 years ago

Please don't start ANOTHER question. Try replying to some of the messages posted in your previous ones.

Measuring the speed of the rotation is not necessary

0
None
Jack Vusteveastrouk

Answer 2 years ago

This question provide more information than the other one . And i already did what suggested which is flash led whenever the magnet detect. the effect is blurry due to the detection range.

Please read it carefully

0
None
steveastroukJack Vu

Answer 2 years ago

Please read carefully what I said, detect just on the rising edge of your signal, which will happen in one place. If you have a processor in the loop, the delays and uncertainty it can introduce can induce jitter. There is no need for a processor

Exactly which model of hall switch are you using ? The datasheet lists 6.

0
None
Jack Vusteveastrouk

Answer 2 years ago

this is the sensor

http://www.littelfuse.com/~/media/electronics/data...

What i dont understand is that I did make it flash at the edge of the signal, but the duration of the flashing is the important one. if the flash too short, led will be very dim, if it longer, then blurry.

if i dont use delay, what should i use ? sorry, not very familiar with arduino much

0
None
steveastroukJack Vu

Answer 2 years ago

Like I said, that datasheet is for FIVE variants. Which are you using ?

0
None
steveastroukJack Vu

Answer 2 years ago

If you want freezing, it has to be VERY bright and very fast. You can make the LED take 10X more current, if you flash it for 1/10th the time. It will be instantaneously 10X (or more) brighter.

0
None
Jack Vusteveastrouk

Answer 2 years ago

That is what I have been thinking about but not entirely sure if I should modified the LED bar.

But about the duration, do you have any idea on what should be ? Because if the I use this approach, (2nd method), like I mentioned, right now, the code will only make the LED light up whenever it detect the magnetic field, and the pick up range is a bit too large to make the illusion image clear.

If we use

delay(some specific time);

it wont work with different speed.

0
None
steveastroukJack Vu

Answer 2 years ago

You can only flash the LED briefly, or the illusion fails, but the delay could be created with two hallsensors, one for on, one for off, and a latch.

0
None
Downunder35m

2 years ago

And all this nonsense will be destroyed by the cops once drive the thing on the road....
I agree, there was absolutely no need for a new topic - if you would not just joke around but instead provide all details right away all this mess would have been avoided.
And as said before: People use strobe lights for speed control - they contain all you need.

0
None
Jack VuDownunder35m

Answer 2 years ago

well, the other question is just a small part of the problem that i focused on. This question is more of a bigger picture. There are many way to solve a problem, so i just want to do thing in the way that I thought of. It's more fun that way. :D