Hi,
Working with kids on a project and we cannot get the Hall Effect Sensor to work. Here's what we've done.
We connected the US5881 (https://www.adafruit.com/products/158) to a breadboard. We used a 10k 5% resistor (determined from the bildr tutorial of the US1881 and figured out by the Adafruit app) between pins 1 and 2. We connected pin 1 to 5v on the Arduino Uno, pin 2 on the sensor to pin 8 on the Uno, and pin 3 on the sensor to GND on the Uno.
We found some basic code here (http://www.markfickett.com/electronics/ ... ttest.html) and loaded it into a sketch, changed the sensor in the code to 8, and uploaded it. Nothing.
No matter what we do, no matter what other code we try, we cannot get the Hall Effect sensor to register the presence of a magnet. We have been working with the specific magnet recommended on the product page (this one -->https://www.adafruit.com/products/9).
We welcome any help!
Yours,
Chris
Hall Effect Sensor Confusion
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- crafty184
- Posts: 21
- Joined: Tue Oct 08, 2013 12:14 pm
Hall Effect Sensor Confusion
- Attachments
-
- 2014-05-13 12.13.55.png (453.1 KiB) Viewed 646 times
-
- 2014-05-13 12.12.23.jpg (627.04 KiB) Viewed 646 times
- adafruit_support_bill
- Posts: 88092
- Joined: Sat Feb 07, 2009 10:11 am
Re: Hall Effect Sensor Confusion
The circuit looks right. Make sure you are presenting the south pole of the magnet to the front (label) face of the sensor. If you put a multimeter on the signal pin (center), do you see any change?
- crafty184
- Posts: 21
- Joined: Tue Oct 08, 2013 12:14 pm
Re: Hall Effect Sensor Confusion
I need a little help with this step. Here's what I did...
1. I touched the positive lead on the MultiMeter to the signal pin as you indicated.
2. I touched the negative lead to the ground pin.
3. It read something like 243 mV.
4. When I presented the South Pole (although, how to really know which is which on that rare earth magnet?) it read something like 2.2v.
Is this expected behavior?
It was tough to squeeze the magnet in, so in part I worry that the magnet touched the MM leads. If you think that's a possibility given these results, perhaps further testing is warranted on my part.
Thanks for your help.
Chris
1. I touched the positive lead on the MultiMeter to the signal pin as you indicated.
2. I touched the negative lead to the ground pin.
3. It read something like 243 mV.
4. When I presented the South Pole (although, how to really know which is which on that rare earth magnet?) it read something like 2.2v.
Is this expected behavior?
It was tough to squeeze the magnet in, so in part I worry that the magnet touched the MM leads. If you think that's a possibility given these results, perhaps further testing is warranted on my part.
Thanks for your help.
Chris
- adafruit_support_bill
- Posts: 88092
- Joined: Sat Feb 07, 2009 10:11 am
Re: Hall Effect Sensor Confusion
You are seeing some change there - although I would expect it should be HIGH with no magnet and LOW with the magnet there.
Looking at the code from the link you posted, the internal pullup resistor in the Arduino is enabled. That means you should not need the extra resistor in the circuit.
Try to re-arrange the components on the breadboard to give clear access to the front of the sensor and try again.
Looking at the code from the link you posted, the internal pullup resistor in the Arduino is enabled. That means you should not need the extra resistor in the circuit.
Try to re-arrange the components on the breadboard to give clear access to the front of the sensor and try again.
- crafty184
- Posts: 21
- Joined: Tue Oct 08, 2013 12:14 pm
Re: Hall Effect Sensor Confusion
Hi Bill,
Here's what I did now..
1. I checked to make sure appropriate voltage was going into breadboard. Perfect 5v (4.89ish) going in.
2. Got the leads connected nicely to the middle pin (+) and the ground pin. Reading zero'ed out. Not sure my meter does LOW, it's a pretty good one. But it read zero for sure.
3. Brought the magnet into play and it still read zero. No change at all when the magnet was placed near the sensor. The meter didn't flinch.
Chris
Here's what I did now..
1. I checked to make sure appropriate voltage was going into breadboard. Perfect 5v (4.89ish) going in.
2. Got the leads connected nicely to the middle pin (+) and the ground pin. Reading zero'ed out. Not sure my meter does LOW, it's a pretty good one. But it read zero for sure.
3. Brought the magnet into play and it still read zero. No change at all when the magnet was placed near the sensor. The meter didn't flinch.
Chris
- adafruit_support_bill
- Posts: 88092
- Joined: Sat Feb 07, 2009 10:11 am
Re: Hall Effect Sensor Confusion
Sounds like maybe a bad sensor. Just to double check:
Do you still have the resistor between the middle pin and 5v?
And can you post the exact code you are using?
Do you still have the resistor between the middle pin and 5v?
And can you post the exact code you are using?
- crafty184
- Posts: 21
- Joined: Tue Oct 08, 2013 12:14 pm
Re: Hall Effect Sensor Confusion
I took the resistor out.
/**
* Switch the status LED on or off to match a digital input pin.
*/
#define PIN_SENSOR 8
#define PIN_STATUS 13
void setup()
{
pinMode(PIN_STATUS, OUTPUT);
pinMode(PIN_SENSOR, INPUT);
digitalWrite(PIN_SENSOR, HIGH);
}
void loop()
{
digitalWrite(PIN_STATUS, digitalRead(PIN_SENSOR));
}
/**
* Switch the status LED on or off to match a digital input pin.
*/
#define PIN_SENSOR 8
#define PIN_STATUS 13
void setup()
{
pinMode(PIN_STATUS, OUTPUT);
pinMode(PIN_SENSOR, INPUT);
digitalWrite(PIN_SENSOR, HIGH);
}
void loop()
{
digitalWrite(PIN_STATUS, digitalRead(PIN_SENSOR));
}
- adafruit_support_bill
- Posts: 88092
- Joined: Sat Feb 07, 2009 10:11 am
Re: Hall Effect Sensor Confusion
OK. Contact [email protected] with a link to this thread and we'll get a replacement sensor right out to you.
Please be positive and constructive with your questions and comments.