Hall effect sensor A3144 with TinkerPie
Counts wheel turns with a magnet: speedometers.
| Type | Digital sensors |
|---|---|
| Connect to | any accessory pin |
| Gives | true near a magnet pole |
| Simulator | Yes: a control appears under the simulated board |
How it works
A Hall effect sensor notices a magnetic field. The A3144 switches on when the south pole of a magnet comes close to its marked face, and off when the magnet moves away.
How to wire it
Signal (DO / OUT / S) to any accessory pin: S1-S4, P10-P13, P43 or P44. Power from 3.3 V where the module allows it.
Code
In blocks: Accessories category in TinkerPie Studio. As code:
// JavaScript
sensors.hallSensor(Pin.S1)
// Arduino C++
sensors::hallSensor(Pin::S1) Good to know
- Works best when the magnet passes within a few millimetres.
- No moving parts, so it lasts a long time and is very fast.
- Count each pass of a magnet to measure wheel turns and speed.
Similar modules
- PIR motion sensor HC-SR501
- IR obstacle sensor
- Touch sensor TTP223
- Push button module
- Tilt switch SW-520D
- Reed switch (magnet)
- Vibration sensor SW-420
- Line tracker TCRT5000
More projects to try
Questions
Can I try the Hall effect sensor A3144 without buying one?
Yes. In TinkerPie Studio the simulator shows a control for it under the board, so you can test your program before you build it.
Why does nothing happen when I bring my magnet close?
The A3144 reacts to one pole only. Turn the magnet around, and bring it near the flat, printed side of the sensor.