Reader small image

You're reading from  Practical Python Programming for IoT

Product typeBook
Published inNov 2020
Reading LevelIntermediate
PublisherPackt
ISBN-139781838982461
Edition1st Edition
Languages
Right arrow

Creating a Hall-effect sensor circuit

We will be building the following circuit on our breadboards. Similar to our HC-SR04 example and circuit in Figure 11.5, we need to use a voltage divider since our Hall-effect sensor outputs 5-volt logic, which we need to shift down to 3.3 volts:

Figure 11.10 – Hall-effect sensor circuit

You will notice that the output of this circuit is dualistic and will depend on which sensor you are using:

  • For a non-latching switch or latching switch type Hall-effect sensor, you will connect the circuit directly to GPIO 21 since the sensor will output a digital HIGH/LOW signal.
  • For a ratiometric type Hall-effect sensor, you will need to connect the sensor to your Raspberry Pi via your ADS1115 analog-to-digital converter since the sensor outputs a varying analog voltage.
I have not included the ADS1115 wiring in Figure 11.9 or in the following stepped breadboard layouts. We have already seen how to connect an analog output...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Practical Python Programming for IoT
Published in: Nov 2020Publisher: PacktISBN-13: 9781838982461