In this project we are going to use Load cell and HX711 Weight Sensor with Raspberry Pi to build a Automatic Gate. We have seen these pressure sensing gates at many malls and showrooms, which automatically opens when someone is standing near the door and get closed after that person is gone. So here we are also creating the same Automatic Gate which will sense the pressure and get opened automatically and will remain open until that pressure or weight will be there. This gate will be closed automatically as soon as the weight is removed. This automatic gate can also be built using PIR sensor like here.
Here for demonstration purpose, we have used simple DC motor as the gate and a hard cardboard as a platform for putting the weight, check the demo Video at the end. In last tutorial, we have Interfaced Load Cell and HX711 with Arduino to measure the weights. For more Raspberry Projects, check here.
- Raspberry Pi (any model should work)
- Load cell
- HX711 Load cell Amplifier Module
- L293D Motor Driver IC
- DC motor or Electric gate or DVD trolley
- 16×2 LCD
- Power source or power bank
- Connecting wires
- Nut bolts, Frame and base
Load Cell and HX711 Weight Sensor Module:
Load cell is transducer which transforms force or pressure into electrical output. Magnitude of this electrical output is directly proportion to the force being applied. Load cells have strain gauge, which deforms when pressure is applied on it. And then strain gauge generates electrical signal on deformation as its effective resistance changes on deformation. A load cell usually consists of four strain gauges in a Wheatstone bridge configuration. Load cell comes in various ranges like 5kg, 10kg, 100kg and more, here we have used Load cell, which can weight upto 40kg.
Now the electrical signals generated by Load cell is in few millivolts, so they need to be further amplify by some amplifier and hence HX711 Weighing Sensor comes into picture. HX711 Weighing Sensor Module has HX711 chip, which is a 24 high precision A/D converter (Analog to digital converter). HX711 has two analog input channels and we can get gain up to128 by programming these channels. So HX711 module amplifies the low electric output of Load cells and then this amplified & digitally converted signal is fed into the Arduino to derive the weight.
Load cell is connected with HX711 Load cell Amplifier using four wires. These four wires are Red, Black, White and Green/Blue. There may be slight variation in colors of wires from module to module. Below the connection details and diagram:
- RED Wire is connected to E+
- BLACK Wire is connected to E-
- WHITE Wire is connected to A-
- GREEN/BLUE Wire is connected to A+