Go Down

Topic: connecting homemade magnetic sensor (Read 680 times) previous topic - next topic

ardui32

Nov 24, 2009, 02:25 am Last Edit: Nov 24, 2009, 03:14 am by ardui32 Reason: 1
Hello , it's my first post here, i am from France and just discovered Arduino lately, and i love it !
i plan to build a turn counter (to count the revolutions of a shaft) using a relay's coil and a strong magnet, w ww.instructables.com/id/EK96L5PXY3ES9J5XZ1  .
A wing nut bolted on the rotating shaft will interfere with the magnetic field and a voltage will be generated in the coil.
the relay is an Omron G6B-2114P, the coil is 720 Ohms, 12v.
the magnet is cylindrical, 5x5 mm, NdFeB grade N45 : BHmax = 45MGOe.
i don't plan to dismantle the relay , it's small and the magnet so strong that i can turn the relay on and off by sliding the magnet along one relay face.
since the relay casing isn't transparent, i don't know the coil's exact position, i will have to fiddle around to center the magnet to the iron core.
PeterTheUnGreat at Instructables got 40 volts peak to peak with no load but with only a 1 mm gap between the gear tooth and the sensor.
i will have a much larger gap, so i can expect the voltage  not to be greater than 5 volts. How many volts can an input pin safely handle ?

how to connect it to an interrupt pin ?
my concern is not to damage my DFRduino Mega !
If the voltage is too large, i plan to short the coil's terminals, so the coil's own resistance (720 Ohms) will act as the load. Will it work like this ?
I don't have a scope, so it may be clever to approach the sensor close to the rotating shaft until the INT is triggered ?
Can i glue the sensor to a DC motor, so i can have a trigger per pole movement ?
i just tested the AttachInterrupt reference sketch by inserting a 510k resitor into pin 21 and it is very unstable, there is a lot of blinking even if i don't touch the resistor, then it doesn't work at all even if i touch it...
how to fix this ? ground the pin and provide a real 5v signal ?

AWOL

Quote
How many volts can an input pin safely handle ?

No more than the supply voltage, plus 0.5 volts.
To be safe, use a Zener diode.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

ardui32

Thanks AWOL, i will use a Zener !
or maybe i will try a Hall switch ?

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy