Sensor Testing - Senior-Design-ZotPonics/ZotPonicsRaspPi GitHub Wiki

This repository gets you started with how to test each sensor.

Fans

Connect the fan wires to the Raspberry Pi:

  • GND -> GND
  • Vcc -> 5V
  • Signal -> GPIO 6

Run fanTest.py

python3 fanTest.py

Lights

Connect the lights to the Raspberry Pi:

  • GND -> GND
  • Vcc -> 5V
  • Signal -> GPIO 5

Run lightsTest.py

python3 lightsTest.py

Pump

Connect the pump to the Raspberry Pi:

  • GND -> GND
  • Vcc -> 5V
  • Signal -> GPIO 26

Run pumpTest.py

python3 pumpTest.py

For the pump, it needs 12V input at either side of pump with duty cycle from 0% to 100% inclusive and taking integer percentage values. From this, we can check the voltage across the pump is 12V or lower using a multimeter.

Servos (for the vent flaps)

Connect the servos to the Raspberry Pi:

  • GND -> GND
  • Vcc -> 5V
  • Signal -> GPIO 25 Run servoTest.py
python3 servoTest.py

To test the relays are working, check the voltage flowing through the relay is 12V.

Since we know the relay is an open switch that means the relay will only pass 12V when it is on. Thus, we are able to test the relays are working by using a multimeter.

Temperature and Humidity Sensor (DHT11)

Connect the the Temperature and Humidity sensor to the Raspberry Pi:

  • GND -> GND
  • Vcc -> 5V
  • Signal -> GPIO 4

Run TempHumidTest.py

python3 TempHumidTest.py

Ultrasonic Sensor

Connect the Ultrasonic Sensor to the Raspberry Pi

  • GND -> GND
  • Vcc -> 5V
  • Trig -> 23
  • Echo -> 24

Run ultrasonicTest.py

python3 ultrasonicTest.py