# Hall effect sensor on pi

**URL:** https://discourse.nodered.org/t/hall-effect-sensor-on-pi/1242
**Category:** General
**Created:** [2 July 2018 18:02 UTC](https://discourse.nodered.org/t/hall-effect-sensor-on-pi/1242 "2018-07-02T18:02:51Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![RogierQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rogierq/32/3211_2.png) [@RogierQ](https://discourse.nodered.org/u/RogierQ)
#### Post date: [2 July 2018 18:02 UTC](https://discourse.nodered.org/t/hall-effect-sensor-on-pi/1242/1 "2018-07-02T18:02:51Z")

</div>

I have a hall effect sensor for magnetic field.  
This runs on an adruino but is it possible to connect it to a pi without the use of an arduino?

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [2 July 2018 18:12 UTC](https://discourse.nodered.org/t/hall-effect-sensor-on-pi/1242/2 "2018-07-02T18:12:59Z")

</div>

did you try a google search?  
are you looking for a node-red node that works with the sensor?

---

<div class="post-metadata">

### Author: ![RogierQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rogierq/32/3211_2.png) [@RogierQ](https://discourse.nodered.org/u/RogierQ)
#### Post date: [2 July 2018 18:15 UTC](https://discourse.nodered.org/t/hall-effect-sensor-on-pi/1242/3 "2018-07-02T18:15:08Z")

</div>

sure i checked google 😉  
and also the “old” forum

examples enough but no together with node red and i cannot find a node that does analog input

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [2 July 2018 18:20 UTC](https://discourse.nodered.org/t/hall-effect-sensor-on-pi/1242/4 "2018-07-02T18:20:07Z")

</div>

The pi doesn’t have any analogue input (unless you add an adc chip)

---

<div class="post-metadata">

### Author: ![RogierQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rogierq/32/3211_2.png) [@RogierQ](https://discourse.nodered.org/u/RogierQ)
#### Post date: [2 July 2018 18:50 UTC](https://discourse.nodered.org/t/hall-effect-sensor-on-pi/1242/5 "2018-07-02T18:50:47Z")

</div>

Clear, so it is not possible without am arduino

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [2 July 2018 18:55 UTC](https://discourse.nodered.org/t/hall-effect-sensor-on-pi/1242/6 "2018-07-02T18:55:59Z")

</div>

Right, you can not connect the sensor directly to the Pi, but ( as Dave said) you could connect it to an analog-to-digital converter and attach that to one of the Pi’s pins.

However, you will have to do some work to figure out how to do that.

---

<div class="post-metadata">

### Author: ![davidcgu](https://avatars.discourse-cdn.com/v4/letter/d/e8c25b/32.png) [@davidcgu](https://discourse.nodered.org/u/davidcgu)
#### Post date: [2 July 2018 20:41 UTC](https://discourse.nodered.org/t/hall-effect-sensor-on-pi/1242/7 "2018-07-02T20:41:07Z")

</div>

RogierQ,

There are many possibilities..... there ar hall sensor which you can set with a poteciometer to the desired value to trigger a digital output so you don't need analog input from the raspberry pi as example:

> **[Raspberry Compatible Linear Hall Magnetic Sensor Module KY-024 for Arduino |...](https://www.ebay.com/itm/Raspberry-Compatible-Linear-Hall-Magnetic-Sensor-Module-KY-024-for-Arduino/112772109198?_trkparms=aid%3D222007%26algo%3DSIM.MBE%26ao%3D2%26asc%3D44039%26meid%3D95c029063a5344ba9996e1606654324c%26pid%3D100005%26rk%3D6%26rkt%3D12%26sd%3D263455225489%26itm%3D112772109198&_trksid=p2047675.c100005.m1851)**
>
> 1PC Hall Magnetic Standard Linear Module For Arduino AVR PIC. The linear Hall magnetic module connected digital 3 interfaces. When the linear Hall magnetic module senses detected the key signal. LED lights on, otherwise off. | eBay!

You have also the option to get an I2C to Analog 4 channel like ADS1015 which can be handled through the raspi

> **[I2C ADS1015 12 Bit 4-CH Analog-to-Digital ADC Board Module 2.0V to 5.5V | eBay](https://www.ebay.com/itm/I2C-ADS1015-12-Bit-4-CH-Analog-to-Digital-ADC-Board-Module-2-0V-to-5-5V/202345119026?hash=item2f1cb57d32:g:GqcAAOSwzHRbGjHm)**
>
> The ADS1015 provides 12-bit precision at 3300 samples/second through I2C. Interfacing is done via I2C. so you can have up to 4 ADS1015's connected on a single 2-wire I2C for 16 single ended inputs. | eBay!

And my preferred choice personally is to use an arduino board flashed with standard firmdata and plgged by usb to the raspberry which can be easily handled in node red with node-red-node-arduino so you separate the input/outputs power from the raspberry, for me this has several advantages, very easy and more safe.

> **[Controlling Arduino From Node-RED With Firmware Firmata IoT#](http://www.instructables.com/id/Controlling-Arduino-From-Node-RED-With-Firmware-Fi/)**
>
> Controlling Arduino From Node-RED With Firmware Firmata IoT#: In this opportunity we will use Node-RED to control and Arduino MEGA 2560 R3, thanks to the collaboration of a colleague Absolutely Automation I indicated this method that allows to...

There are many tutorials, now is your choice to investigate a bit.....

Regards

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [22 March 2019 17:20 UTC](https://discourse.nodered.org/t/hall-effect-sensor-on-pi/1242/8 "2019-03-22T17:20:09Z")

</div>

> [@davidcgu](#):
>
> my preferred choice personally is to use an arduino board flashed with standard firmdata

Nice answer. My go-to approach these days is always an ESP8266 flashed with ESPeasy, Tasmota or Homie (or custom code if you are that way inclined as I sometimes am) connected over WiFi to MQTT.

That way I don't have to worry about having the sensor next to the Pi. ESP devices are so cheap that it makes no odds whether you get them or an Arduino and they are a lot more versatile in general because of their networking.

You could even switch up to an ESP32 if you need more power and/or Bluetooth.
