Linker Hall Sensor Module is a Hall sensor.
A Hall effect sensor is a transducer that varies its output voltage in response to a magnetic field. Hall effect sensors are used for proximity switching, positioning, speed detection, and current sensing applications.
In its simplest form, the sensor operates as an analog transducer, directly returning a voltage. With a known magnetic field, its distance from the Hall plate can be determined. Using groups of sensors, the relative position of the magnet can be deduced.
Electricity carried through a conductor will produce a magnetic field that varies with current, and a Hall sensor can be used to measure the current without interrupting the circuit. Typically, the sensor is integrated with a wound core or permanent magnet that surrounds the conductor to be measured.
Frequently, a Hall sensor is combined with circuitry that allows the device to act in a digital (on/off) mode, and may be called aswitch in this configuration. Commonly seen in industrial applications such as the pictured pneumatic cylinder, they are also used in consumer equipment; for example some computer printers use them to detect missing paper and open covers. When high reliability is required, they are used in keyboards.
When no magnet near the Linker Hall Senso , the RX side will continue to output a high level (logic 1), if the magnet near it, the RX terminal will output a low level (logic 0) .So we can use pcDuino GPIO read the RX level to determine whether there is a magnet near the Hall Sensor, the following is a magnetic switch routine.[/vc_column_text][/vc_column][/vc_row][vc_row][vc_column width=”1/1″][vc_tour][vc_tab title=”Parts List” tab_id=”1394428947-1-93″][vc_column_text]1. pcDuino V2 x1
2. Linker Hall Sensor x1
3. Linker LED x1
4. Linker Base x1
5. Linker cable x2
6. Magnet x1[/vc_column_text][/vc_tab][vc_tab title=”Wiring Diagram” tab_id=”1394428947-2-45″][vc_column_text][/vc_column_text][/vc_tab][vc_tab title=”Test Code” tab_id=”1394429061809-2-5″][vc_column_text]
import gpio from time import sleep led_pin = "gpio2" sensor_pin = "gpio4" def delay(ms): sleep(1.0*ms/1000) def setup(): gpio.pinMode(led_pin, gpio.OUTPUT) gpio.pinMode(sensor_pin, gpio.INPUT) print " Linker LED Pin : D2 \n Hall Sensor Pin : D4" def loop(): while(1): if(gpio.digitalRead(sensor_pin)): gpio.digitalWrite(led_pin, gpio.HIGH) else : gpio.digitalWrite(led_pin, gpio.LOW) setup() loop()
2. A magnet near Hall Sensor, RX output low level, the red LED lights on Hall Sensor is on,Linker LED is off: