As said before, the TOAST hardware uses the ESP8266 and does not use any Arduino.
It comes in different flavours
- All Sensors Type – has heaps of sensors on board and reports the status to the MQTT bus
- RCSwitch Type – has some sensors and a 433MHz receiver and transmitter and 2 relays to switch lights
a ATTINY85 based sender for the TOAST
- Irrigation Type – is for plant irrigation (not implemented yet)
The TOAST in a housing suitable
for a cellar room.
In my case it is sitting in the room
where the water supply enters
Now let’s have a look at the sensors. Clockwise from top.
– The Smoke Detector
It would be quite a challenge to build your own smoke detector. So I bought a regular one, opened it up and found a chip, that has an output pin, that is just not connected (please search the internet for the chip you find). Simply connect that pin via a diode, and 2 resistors to a pin on the ESP8266. The diode ensures the right polarity, the resistors bring down the 9V to 3V for the ESP8266 input pin (look at the picture above)
The smoke detector is connected via cable to the ESP8266. This is suitable for e.g. cellar rooms or places where cables are possible. For bedrooms you might better buy wireless smoke detectors. Of course they have a price.
– The Motion Detector (PIR)
The Motion Detector is just a PIR type that you can buy everywhere.
Normally they come with their own on board voltage regulator so we have to use the 5V supply voltage. And luckily they have a 3.3 V output so we can connect the PIR directly to one of the pin’s. No problem at all.
In my case the motion sensor is just for fun. Now I can see how often someone enters the room.
– The DHT22 Temperature and Humidity Sensor
The DHT22 is the better version of the DHT10. It can be directly connected to the input pin and, please note, to the 3.3V power that the ESP8266 provides. Though I skipped the pull up resistor it is working flawlessly.
It is sitting outside the housing to monitor the temperature and the humidity of the room.
– The Simple Water Detector
The simple Water Detector is actually nothing but two wires close together, but not connected. It is lying on the ground. As soon as water „shortcuts“ the two wires, the pin of the ESP8266 will go „low“ and the ESP8266 will report the change.
If you do not want to use 2 wires, you can e.g. buy a soil moisture sensor. That is looking better.
This sensor is pretty important to detect any water leakages.
– The DS18B20 Temperature Sensors
The DS18B20 is a OneWire bus temperature sensor. So you can just have several of them in parallel. The TOAST sketch will detect them all and report each sensor with its OneWire address. The pull up resistor is required by the OneWire bus.
Please read the OneWire specification for the length of the bus and the number of devices on that bus. I had no problems with 3 DS18B20 sensors, each having 3 meters cable. I have read somewhere that 5 is the maximum in this setup.
The RCSwitch Type can use all the sensors from above. In addition it has a 433 MHz receiver and sender and 2 relays.
Features of the TOAST sketch:
- It can receive all commands that the RCSwitch library recognises
RC commands can be connected to one of the relays. So you can switch the relays with the regular RC remote
or you can use a ATTINY85 and a 433MHz sender to implement your own „event driven“ switch (see below)
all received commands are also sent to the MQTT bus, so any system listening on the MQTT bus will recognise a switch change
e.g. OpenHAB could show the status of some ligths
- It can receive any RC command from MQTT bus and send the command via 433MHz e.g. to some power plugs
that enables the TOAST to be integrated into a house automation system like OpenHAB and e.g. switch an aquarium light on sunset or sunrise, or start ventilators or turn on lights, …
- It can switch the relays via MQTT message
So the relays can be switched via RC command or MQTT message
- Of course all the sensors will be reported via MQTT messages
WARNING: Do not buy very cheap 433Mhz receivers. The reception is often very poor, range is very low and they will not be able to receive signals from the 3.3V ATTINY85 senders below. The cheap 433MHz sender modules are ok, for both, the TOAST and the ATTINY85 sender below.
This is a simple battery powered 433MHz sender for the TOAST. You could use it e.g. with a wall switch to turn on some lights.
I am using 3 wall switches. Two will turn on and off the main light, the third turns on and off a spot light.
The sender will send the RC code, defined in the sketch, 3 times and will then go to a very deep sleep, consuming only nA (nano Amperes). So the battery should last years, depending of course on the usage. Sending commands will exhaust the battery sooner.