-
-
Notifications
You must be signed in to change notification settings - Fork 102
Hardware
Here is a list of hardware that are supported by TerrariumPI
All hardware is connected using PHySICAL pin numbering. Which is from 1-40. The software will translate it to BCM if needed. https://pinout.xyz/
In order to spare the device, you can use a second GPIO port for power management. In that case use the following value as address: [GPIO_ReadoutPin],[GPIO_Powerpin]. In this way, the second pin number is used for powering up and down the sensor. This will reduce the amount of power usage, and some sensors will benefit from this, especially moisture sensors.
I2C sensors are supported. By running i2cdetect -y X
you can see the I2C addresses of the devices. These values are used as input address in TerrariumPI. TerrariumPI uses by default 1 for bus number.
example output i2cdetect -y 1:
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: 10 -- -- -- -- -- -- -- 18 -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- 29 -- 2b -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
It is possible to add analog sensors to TerrariumPI. But as TerrariumPI is only has a digital GPIO ports, an extra add on is needed to add analog ports. For now the (RaspIO Analog Zero)[https://rasp.io/analogzero/] is known to work. But any MCP3008 based board should work.
Here you will see all the sensors that can be read out by TerrariumPI
Temperature sensors can be read out in degrees Celsius or Fahrenheit
The Chirp sensor can read out temperature through I2C bus. It can be used on both I2C buses if needed.
https://www.tindie.com/products/miceuz/i2c-soil-moisture-sensor/
If you want to use multiple Chirp devices, make sure you change the I2C address per Chirp first to make sure they do not use the same address. This can be done with the debugging tools.
setting value: [I2C_address],[I2C_bus]
where I2C_bus is optional
Debugging: To debug or change the address of your Chirp, use this code: https://github.com/ageir/chirp-rpi
DHTXX and AM2302 are supported through GPIO. Make sure you have the sensor connected correctly and using the right resistor. These sensors are a bit sensitive and can break easily.
setting value: [GPIO_address]
Debugging: Go to the folder Adafruit_Python_DHT/examples
in the pi home direcory. There run the AdafruitDHT.py
. It will give the needed options to test your sensor.
Use the standard PI 1wire bus system to connect multiple DS1820 temperature sensors. The sensors will automatically detected and added to the system.
ex: http://www.reuk.co.uk/wordpress/raspberry-pi/connect-multiple-temperature-sensors-with-raspberry-pi/
setting value: None, will be automatic detected
Debugging: list the 1 wire system folder ls -l /sys/devices/w1_bus_master1/
and look for folder(s) starting with a number
See temperature
This sensor is currently only supported through OWFS 1-wire.
setting value: None, will be automatic detected
Debugging: ...
See temperature
Use GPIO nummer for reading out the state. This will be used to read out the digital state of the sensor. This is either on or off. Where on is enough moisture, and off to low moisture. You have to calibrate the sensor with the on board potentiometer.
setting value: [GPIO_address],[GPIO_power_pin]
where GPIO_power_pin is optional to use for power saving
Debugging: ...
pH sensors are mostly analog sensors and therefore TerrariumPI expects that there is a analog add-on being used.
See temperature
Dimmer
Switch
The software supports different types of external displays. For now the LCD and OLED types are supported. For more detail on supported hardware see either the LCD or OLED display information.
The software will show every 30 seconds the state of the Pi in terms of uptime, CPU load and CPU temperature. Next to that it will show all averages per sensor type. At this moment it is not possible to select individual sensors to show on the display.
When an value is out of range (warning) the text line will be surrounded by '!'
Further it is possible to select different notification messages through the notification system
The software is capable of scrolling the text both horizontal (when longer then amount of chars) and/or vertical (when more messages then lines). It can detect by display type how much it can show. Make sure you select the right resolution!
The software supports LCD displays based on I2C communication.
setting value:
-
[I2C_address],[I2C_bus]
where I2C_bus is optional Resolution
Debugging: ...
See LCD 16x2
The software supports OLED displays based on I2C communication.
See LCD 16x2
It is possible to connect LED to three GPIO ports in order to display the status of TerrariumPI based on the logfile. At normal operation a green LED will be on indicating all working fine. When a warning is triggered somewhere in the software an amber light will be turned on. This amber light will stay on for 15 minutes so that you have some time to notice it. An error will turn on a red LED and that will stay on for 60 minutes
In order to use this LED notifications, create a new logging settings file based on the original and name it logging.custom.cfg
Then edit in logging.custom.cfg
the section handler_notificationHandler
setting the args
value to ([37,35,33],)
where the numbers are the physical pin numbers in the order of green, amber, red
For setting up, see general notification section above.
https://shop.4tronix.co.uk/products/4-pack-pi-stop-educational-pistop-traffic-light-add-on-for-raspberry-pi