-
Categories
-
Platforms
-
Content
You know John meant flipping the orientation of the Hall sensor in the magnetic field, not changing the connections to its pins, right?Yes. On one side, the Hall Sensor outputs a high voltage - on the other, nothing (just the usual 2.5V).
That circuit should already give you that behaviour. When the Hall sensor outputs a high voltage, you should see that voltage on pin 3 of the IC. Pin 2 of the IC will be around 2.5V according to the setting of the trimpot (start by setting it half way). This will cause the output (pin 1) to go high, which will remove the bias from the MOSFET and cause the electromagnet to turn off. If that's not happening, follow my description step by step and tell me where your circuit differs.What I would like to do is make the circuit exhibit the behavior of the second configuration during the first - that is, when the Hall Sensor outputs a *high* voltage, the electromagnet shuts off, and vice versa.
How have you connected the LED? Can you post a schematic with the LED shown?Turns out I misread the behavior of the LED - it actually goes dim due to the Hall sensor outputting a high signal, due to voltage difference being smaller.
That's what the circuit is supposed to do.However, when the Hall Sensor was sending a high signal, the MOSFET did nothing - it was completely unaffected. When it sent a low signal (the LED brightening due to voltage difference) Pin 1 dropped down to ~2V, and the drain of the MOSFET (middle pin) jumped up to 12V (from 0V when idle).
That is all correct.When it sent a high signal, the magnet did nothing (i.e. was off). High signal registered as 5.00V on the Hall output pin, low signal as around 1.5V, idle as around 2.5V.
I wouldn't be surprised. I don't know enough about magnetism to say, though. For the thing to work, though, I think the magnetic field from the suspended magnet needs to be significantly stronger than the magnetic field from the electromagnet, because the Hall sensor needs to detect how close the suspended magnet is.If I had to take a wild guess, I would say that the electromagnet is interfering with the signal, but I don't know how to stop this...
How have you connected the LED? Can you post a schematic with the LED shown?
I wouldn't be surprised. I don't know enough about magnetism to say, though. For the thing to work, though, I think the magnetic field from the suspended magnet needs to be significantly stronger than the magnetic field from the electromagnet, because the Hall sensor needs to detect how close the suspended magnet is.
Have you tried re-winding the electromagnet with a larger core as shown in the project documentation?
That can't be right. The LED needs positive voltage on its anode relative to its cathode.Well, the cathode is on +5V and the anode on the analog output of the Hall sensor.
Yes, I think that's right. The Hall sensor needs to be positioned so it responds mostly to the magnetic field of the suspended magnet, because it's used to detect the distance downwards to the suspended magnet so the electromagnet can be controlled to keep the magnet suspended at the desired distance. The Hall sensor provides feedback to the circuit, telling it how far away the suspended magnet is.So it appears that this has now become an engineering problem - the magnetic field of the levitating magnet has to be strong enough to be pulled upward by the electromagnet from a greater distance than when it trips the sensor, while also not being caught by the iron core.
It appears this was partially solved in the original project by placing the Hall sensor a distance away from the electromagnet - the sensor wouldn't pick up the magnetic field nearly as badly, but everything would still interact just fine.
What were you using before? I think the project description is pretty clear that you need a Neodymium magnet.Unfortunately, this means I need to find some particularly strong neodymium magnets.