Pages: [1]   Go Down
Author Topic: connecting homemade magnetic sensor  (Read 568 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 9
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 ?
« Last Edit: November 23, 2009, 09:14:31 pm by ardui32 » Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 300
Posts: 26204
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

"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.

0
Offline Offline
Newbie
*
Karma: 0
Posts: 9
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1]   Go Up
Jump to: