Small Prototype Engineering
GSM update. 2017-12-06
Why not make the Home Diagnostic system below even better with extended connectivity thru GSM!
Tested some simple code with EasyPIC7 dev board and the GSM click 3 from Mikroe to see how it can be done. The GSM click 3 is expensive and not well suited for more than prototyping. Fortunatly its possible to buy the SIM800L gsm module for around 8USD on ebay and they both use the almost same GSM modem unit. Same code and ATC commands can be applied on both.
Connected the TX pin of the SIM800 module to the UART input for the PIC. Powered it by 5V.
The code is written in that way if a wireless trigger detects a event/incident it will send one SMS to a pre set mobile number and inform the user which sensor has trigged. Not all events will trigger the SMS function. Recieved mail is one that will not trigger SMS function.
Crowded inside!
Home diagnostics. 2017-08-23
Some time ago i realized that i wanted to have some kind of system monitoring water leakage, mailbox, cooler and other important things in my home. One reciever with a display and sound that recieves data/ triggering from several wireless 433MHz sensors. Things that will be monitored are
-Cooler
-Drainage wells (2pcs)
-Mailbox
-Garagedoor
-Waterleakage5pcs
It will also be easy to add new sensors to the system in the future by updating software.
For data transmission a couple different 433MHz transcievers has been tested where the best had very good reach and fucntions but where to expensive. Sine i will monitor many nodes the price of each sensor card i important.
The HC-11 transciever can found on ebay for 2,5Usd and has a reach of 15m indoors with the bundled spiral antenna. Better antenn will improve transmission reach. I have done alot of testing with HC-11 and have not found any cons so far. I'm using default settings for the modules but they can be set by user. Only gnd, Vcc and data pins are used. One thing i noticed that different batches of the HC-11 loads the power rail uneven. I needed to increase the bulk capacitors to 30uF close to the Pic, othervise the Pic was resetted every time it attempted to transmitt data.
TX-unit
The TX units which i call sensors can be used in three ways. The sensor board can be completly off when used in water leackage monitoring and is actived by shorting two probe pins with water. These pins controll the enable pin on a small SOIC LDO. Two CR2032 batteries will provide power for many years.
For the mailbox detection a IO pin is connected to a micro swithc close to the hatch. The sensor board is now always on and draws 800uA in idle mode. Transmission is during short periods and current consumption will be 30mA. In this case a small rechargeable battery with solarpanel is used.
It's also possible to read analog values but this function is not implemented in software at the moment, only supported by the sensor board.
Since many sensor board will be used i ahve tried to keep down the cost to around 5Usd/pcs. This includes
2 CR2032 batteries with holders
1 HC-11 RF unit
1 PCB
1 NMTS4177 fet used as load switch
2 BC847
1 LP2985-5.0 LDO
1 Green SMD LED
and some RC components and header connector pins
The first unit is used as water level indicator in a drainage well. For this purpose i 3D printed a small round holder to connect the sensor wire to which then are held in place by two small screws. These screws will actually sense the water level.
RX-unit
The RX unit uses the same RF module and outputs information on the 2x16 display, in some cases a buzzer is enabled. Since more sensors will be added in the future i have chosen a PIC with as much flash memory (14kB) as possible. 16F1846 has alot of functions and the main feature i use is of course the built in EUSART module.
The way the whole system work is that every sensor sends a unique word depending on where its mounted. The sensor in the well sends the word "Well" and when this is detected by the RX unit, it will alarm and tell the user which sensor has trigged. To save battery life the word is sent 10 times. After transmission is complete the RF module is disabled.
A load switch will output 12Vdc from the RX unit which can be used to trigger external IOs. It can of course also send information to other external units but this is not implemented for now.