hello,
is this possible to measure distance with hall effect 3144?
i wrote a code:
int sensorPin = A1;
int counter = 0;
void setup()
{
// setup serial - diagnostics - port
Serial.begin(9600);
pinMode(sensorPin, INPUT);
}
void loop()
{
counter++;
int sensorValue = analogRead(sensorPin);
Serial.print(counter);
Serial.print(" ");
Serial.println(sensorValue);
delay(1000);
}
in output when there is magnet it shows 1023, when magnet is in close distance shows 3 or 4.
ted
May 12, 2018, 1:38pm
2
Not easy, I asked producers of the magnets - at which distance your magnet has 1nT field strength - no one answered that.
Unless you calibrate sensor manually.
The 3144 is a hall effect switch . It is digital, it is on or off, no in between so analogRead() is not appropriate.
To find information on analog sensors Google "linear hall sensor arduino".
Look at my Magnetic Bounce project in The MagPi 69, free PDF at:-
That does exactly what you want.
Video at Magnetic Bounce - YouTube
ted
May 12, 2018, 3:42pm
6
Very nice,I played the video 10 times
ted
May 13, 2018, 8:03am
7
Mike
What you are using to draw the lines(youtube), it seems it is not a MegunoLink ?
ted:
Mike
What you are using to draw the lines(youtube), it seems it is not a MegunoLink ?
This is a project for the Raspberry Pi and everything is written in Python.