18650 battery powered Arduino DS18B20 temperature sensor would lost on average 2 years without to re-charge or replace the battery. It is best to use 3.3v Arduino Pro Mini with lower clock speed to conserve battery. To optimize battery life further you can remove power LED and status led connected to Arduino pin 13.
Check out PiHome Shop for all you need for your Smart Heating
18650 battery powered temperature sensors are feed power to Arduino mini through raw pin utilising onboard voltage regulator. I have these temperature sensors running over 16 months now and battery is still 96%.
See below the real picture of my One Wire ds18b20 temperature sensor. Following picture of DS18b20 sensor running on 18650 battery for over 24 month and battery still at 96%.
If you want to make your own temperature sensors please take note of wiring connections for nRF24L01 to Arduino and One Wire DS18B20 temperature sensor.
Arduino Sketch for DS18B20 1-Wire digital Temperature Sensor
Here is MySensors sketch i’m using for low power DS18B20 1-Wire digital temperature sensor node, make sure you modify your node id as per your needs and not to have all temperature sensors nodes with same id.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 |
// _____ _ _ _ // | __ \ (_) | | | | // | |__) | _ | |__| | ___ _ __ ___ ___ // | ___/ | | | __ | / _ \ | |_ \_ \ / _ \ // | | | | | | | | | (_) | | | | | | | | __/ // |_| |_| |_| |_| \___/ |_| |_| |_| \___| // // S M A R T H E A T I N G C O N T R O L // ***************************************************************** // * Battery Powered OneWire DS18B20 Temperature Sensor * // * Version 0.31 Build Date 06/11/2017 * // * Last Modification Date 16/06/2019 * // * Have Fun - PiHome.eu * // ***************************************************************** // Enable debug prints to serial monitor #define MY_DEBUG //Set MY_SPLASH_SCREEN_DISABLED to disable MySensors splash screen. (This saves 120 bytes of flash) //#define MY_SPLASH_SCREEN_DISABLED //Define Sketch Name #define SKETCH_NAME "Temperature Sensor" //Define Sketch Version #define SKETCH_VERSION "0.31" // Enable and select radio type attached #define MY_RADIO_RF24 //#define MY_RADIO_NRF5_ESB //#define MY_RADIO_RFM69 //#define MY_RADIO_RFM95 //IRQ Pin on Arduino //#define MY_RF24_IRQ_PIN 8 // Set LOW transmit power level as default, if you have an amplified NRF-module and // power your radio separately with a good regulator you can turn up PA level. // RF24_PA_MIN RF24_PA_LOW RF24_PA_HIGH RF24_PA_MAX RF24_PA_ERROR #define MY_RF24_PA_LEVEL RF24_PA_MIN //#define MY_DEBUG_VERBOSE_RF24 // RF channel for the sensor net, 0-127 Default is 76 #define MY_RF24_CHANNEL 91 //PiHome - Make Sure you change Node ID, for each temperature sensor. 21 for Ground Floor, 20 for First Floor, 30 for Domastic Hot Water. #define MY_NODE_ID 30 //RF24_250KBPS for 250kbs, RF24_1MBPS for 1Mbps, or RF24_2MBPS for 2Mbps #define MY_RF24_DATARATE RF24_250KBPS //Enable Signing //#define MY_SIGNING_SIMPLE_PASSWD "pihome" //Enable Encryption This uses less memory, and hides the actual data. //#define MY_ENCRYPTION_SIMPLE_PASSWD "pihome" // Set baud rate to same as optibot //#define MY_BAUD_RATE 9600 //set how long to wait for transport ready in milliseconds //#define MY_TRANSPORT_WAIT_READY_MS 3000 #include <MySensors.h> #include <DallasTemperature.h> #include <OneWire.h> #define ledpin 4 // LED for one Blink Power On, second blink for temperature sensors after successfull radio contact with gateway and three blinks for low battery // Define sensor node childs #define CHILD_ID_BATT 1 #define CHILD_ID_TEMP 0 #define COMPARE_TEMP 1 // Send temperature only if changed? 1 = Yes 0 = No #define COMPARE_BVOLT 1 // Send battery voltage only if changed? 1 = Yes 0 = No //#define MIN_TEMP_DIFF 0.2 // Minimum temperature difference for comparision #define MIN_BVOLT_DIFF 0.05 // Minimum Battery voltage difference for comparision #define ONE_WIRE_BUS 3 // Pin where dallase sensor is connected #define MAX_ATTACHED_DS18B20 1 unsigned long SLEEP_TIME = 56000; // Sleep time between reads (in milliseconds) // Battery related init int BATTERY_SENSE_PIN = A0; // select the input pin for the battery sense point float oldBatteryV = 0; MyMessage msgBatt(CHILD_ID_BATT, V_VOLTAGE); // Dallas Temperature related init OneWire oneWire(ONE_WIRE_BUS); // Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs) DallasTemperature sensors(&oneWire); // Pass the oneWire reference to Dallas Temperature. float lastTemperature[MAX_ATTACHED_DS18B20]; int numSensors=0; bool receivedConfig = false; bool metric = true; // Initialize temperature message MyMessage msg(CHILD_ID_TEMP, V_TEMP); void before(){ // Startup up the OneWire library sensors.begin(); } void setup(){ //This is LED pin set to output and turn it on for short while pinMode(ledpin, OUTPUT); digitalWrite(ledpin, HIGH); delay(60); digitalWrite(ledpin, LOW); // requestTemperatures() will not block current thread sensors.setWaitForConversion(false); // needed for battery soc // use the 1.1 V internal reference #if defined(__AVR_ATmega2560__) analogReference(INTERNAL1V1); #else analogReference(INTERNAL); #endif } void presentation() { // Send the sketch version information to the gateway and Controller //sendSketchInfo("Temperature Sensor", "0.31"); sendSketchInfo(SKETCH_NAME, SKETCH_VERSION); // Fetch the number of attached temperature sensors numSensors = sensors.getDeviceCount(); //Blink LED as number of sensors attached blink_led(numSensors, ledpin); //check if attached sensors number is grater then 0 if no then put led on solid #if numSensors > 0 digitalWrite(ledpin, HIGH); #else digitalWrite(ledpin, LOW); #endif // Present all sensors to controller for (int i=0; i<numSensors && i<MAX_ATTACHED_DS18B20; i++) { present(i, S_TEMP); } } void loop(){ // get the battery Voltage //ref http://www.ohmslawcalculator.com/voltage-divider-calculator // Sense point is bypassed with 0.1 uF cap to reduce noise at that point // 1M, 100K divider across battery and using internal ADC ref of 1.1V // ((1e6+100e3)/100e3)*1.1 = Vmax = 12.1 Volts // 12.1/1023 = Volts per bit = 0.011828 //R1 820k, R2 220k //((820e3+220e3)/220e3)*1.1 = Vmax = 5.2 Volts //5.2/1023 = Volts per bit = 0.005083089 int battSensorValue = analogRead(BATTERY_SENSE_PIN); //float batteryV = battSensorValue * 0.005083089; //R1 820k, R2 220k divider across battery and using internal ADC ref of 1.1v float batteryV = battSensorValue * 0.011828; //R1 1M, R2 100K divider across battery and using internal ADC ref of 1.1v int batteryPcnt = ( ( batteryV - 2.9 ) / ( ( 4.2 - 2.9 ) / 100 ) ); // for 18650 Battery Powred #ifdef MY_DEBUG Serial.print("Pin Reading: "); Serial.println(battSensorValue); Serial.print("Battery Voltage: "); Serial.print(batteryV); Serial.println(" v"); //Print Battery Percentage Serial.print("Battery percent: "); Serial.print(batteryPcnt); Serial.println(" %"); #endif #if COMPARE_BVOLT == 1 float CUR_BVOLT_DIFF = (oldBatteryV - batteryV); if (CUR_BVOLT_DIFF < 0) { CUR_BVOLT_DIFF = CUR_BVOLT_DIFF * -1; } if (oldBatteryV != batteryV && CUR_BVOLT_DIFF > MIN_BVOLT_DIFF) { send(msgBatt.set(batteryV, 2)); sendBatteryLevel(batteryPcnt); oldBatteryV = batteryV; } #else send(msgBatt.set(batteryV, 2)); sendBatteryLevel(batteryPcnt); oldBatteryV = batteryV; #endif // Fetch temperatures from Dallas sensors sensors.requestTemperatures(); // query conversion time and sleep until conversion completed int16_t conversionTime = sensors.millisToWaitForConversion(sensors.getResolution()); //sleep() call can be replaced by wait() call if node need to process incoming messages (or if node is repeater) sleep(conversionTime); // Read temperatures and send them to controller for (int i=0; i<numSensors && i<MAX_ATTACHED_DS18B20; i++) { // Fetch and round temperature to one decimal float temperature = static_cast<float>(static_cast<int>((getControllerConfig().isMetric?sensors.getTempCByIndex(i):sensors.getTempFByIndex(i)) * 10.)) / 10.; // Only send data if temperature has changed and no error #if COMPARE_TEMP == 1 if (lastTemperature[i] != temperature && temperature != -127.00 && temperature != 85.00) { #else if (temperature != -127.00 && temperature != 85.00) { #endif // Send in the new temperature send(msg.setSensor(i).set(temperature,1)); // Save new temperatures for next compare lastTemperature[i]=temperature; } } //Condition to check battery levell is lower then minimum then blink led 3 times if (batteryV < 2.9) { //for 18650 Battery Powered Sensor blink_led(3, ledpin); //Serial.print("Low Voltage"); } //go to sleep for while sleep(SLEEP_TIME); } //Blink LED function, pass ping number and number of blinks usage: blink_led(variable or number of time blink, ledpin); void blink_led(int count, int pin){ for(int i=0;i<count;i++){ digitalWrite(pin, HIGH); delay(700); digitalWrite(pin, LOW); delay(700); } } |
For more information about NRF24L01+ connection with Arduino please check this link
If you want to have One Wire DS18B20 Temperature Sensor connected directly to Raspberry pi GPIO pin then follow this post
59 comments
thank you for sharing your sketch following portion of your code fixed my nrf communication issue.
// RF channel for the sensor net, 0-127
#define RF24_CHANNEL 125
//PiHome Node ID
#define MY_NODE_ID 25
//RF24_250KBPS for 250kbs, RF24_1MBPS for 1Mbps, or RF24_2MBPS for 2Mbps
#define RF24_DATARATE RF24_250KBPS
Did you do any calculations on battery life? As you said you only removed power led and led connected to pin 13 to save power. your sketch seems to send readings every minutes. Which is lots of battery power used per day.
@Valentine, no i haven’t done any calculations on how long 18650 battery would last, i m running these sensors for nearly 18 months and battery is still 90%+
Can you provide me picture how to connect all parts together please?
Hi Jan,
thank you for your interest in PiHome project, i m working on PCB design for temperature sensors, boiler relay controller and zone controller, i’m not professional pcb designer hence its taking little longer and there is steep learning curve. i hop i will have something completed by this weekend.
Thank you
Admin
Hi Jan,
i have added pcb to GitHub for 18650 Battery Powered Temperature Sensor.
let me know if this helps or you need further information.
Admin
All connection between arduino and NRF24L01+ added. these connections are self explanatory.
any plans to sell these pre-assembled sensros and boiler relay modile? what i really looking for to have all these bits pre-assembled.
G
@Garey,
no i dont have any plan to make and sell any pcb as there is not demand and most people want to do diy but i can guide you how you can get pcb manufactured.
I wonder if you can help me. I am in the process of attempting to build this as my first project.
I have got as far as step 7 regarding the software install all looking good, however I am little stuck on the electronics.
I have some knowledge of electronics but finding it difficult to follow the wiring shown on your website, on how to build the Battery Powered Temperature Sensor, Serial Gateway and Boiler relay controller.
Can you please provide a link for how the parts are put together (PCB designs ? )
I can only see the coding in GitHub, unless I am missing the point.
Many thanks in advance
Hi Mark,
i will put some clear wiring diagram in next few days.
are you planning to see these pcbs? or can you help me to build for my home use ?
This project looks fantastic.
I wish you would reconsider just selling the kits.
Or even an amazon checkout with all the required components.
The opensource component builds the trust; you can compete in this space.
hi LR Jenkins,
i can help you to build all this if you want, how good you are with electronics? and DIY?
Admin
man I think you can sell these PCBs very easy and I can see others are asking you same thing may be re-consider to make/sell these.
on same note can you make sd card image and save lots of people time on software installation…
Hi,
I would like to build a test version myself of your battery powered sensor.
Can you provide a electrical schema of your pcb?
I’m unable to read the brd and sch files as I don’t know which program to use.
thx
Hi Daniel,
i m using Eagle PCB software its free, this is very simple pcb with one arduino mini pro (3.3v) and one ds18b20 sensor powered by 18650 battery.
Hi,
Thanks for the wire schema.
I downloaded your brd an sch files from github, but I can’t open them with Eagle Cad software, It complains about an error in the file.
I made small adjustment and added a diode between the battery power and power of the nrf.
I causses a small voltage drop to the radio doesn’t receive the 4.2v at start.
i m using Version Eagle 9.0.1, i dont have problem using Arduino onboard regulator to supply 3.3v to nrf radio and on top of that i have 47uf (some people recommend 10uf as well) and 0.1uf to cover the burst required during transmission, these nrf radio need 3.3v not 4.2v.
I forgot to mention:
I remove the regulator to save more battery power :).
Can I buy temperature sensor pre-solder and same for other required parts I.e. multi zone relay and wireless over relay, what I really need is full system pre-soldered and I can do the software side without any problems. Do you have any ebay shop?
Is everything ok with the 1M, 100k divider used for battery voltage ? With 1M connected to GND and 100k to Vcc, A0 pin gets 1M/(1M+100k) of the Vcc voltage, so if battery is 4.2V it gives 4.2V * 0.909… = 3.81V while the reference is set to 1.1V the readings on pinA0 (battSensorValue) are always 1023. I think 100k should go to GND and 1M to Vcc…
Yes, that is a mistake, i have changed pcb design as well to reflect this change.
Seriously… thanks for all the hard work you’ve put into this, it’s a really impressive and useful project.
I have one question / observation regarding your battery percentage calculation on line 97:
int batteryPcnt = (batteryV / 4.2) * 100;
..which would show 4.2V as 100%, 2.1V as 50% and 0V as 0%?
IME 18650s don’t like being discharged below about 2.9V (which would still show 69% in your sketch), so when I calculate battery percentages (in a pro mini based 18650 charge/discharge capacity checker), I did it more like this:
int batteryPcnt = ( ( batteryV - 2.9 ) / ( ( 4.2 - 2.9 ) / 100 ) );
Of course, this would mean that batteryPcnt would go negative below 2.9V – not sure how that would affect things elsewhere – I just thought it might prompt users to charge their sensors before the risk of damaging their cells (= higher reliability).
(I’m just waiting for my nRF24L01 modules to arrive before really getting stuck in to a build).
PS: Does it all play nicely with PHP7 now?
Hi artlab,
you are right about battery level, there is always room for improvement, at current version there is no way to alerting user about battery level on home screen until unless user checks battery status in settings which is very unlikely. PiHome was migrated to PHP7 while back and its working good so far.
on nRF module, you need to fine tune PA level, i have seen some time nrf modules works good on max and some time need to change this low.
// RF24_PA_MIN RF24_PA_LOW RF24_PA_HIGH RF24_PA_MAX
#define MY_RF24_PA_LEVEL RF24_PA_LOW
Thanks – that’s good to know. 🙂
I’m planning on incorporating TP4056 modules (like this) as they provide over-charge/discharge protection and a convenient way to recharge the cells via micro USB… as a bonus, the sensor will continue to operate whilst the cell’s being charged – all for 22 pence! 😉
artlab,
yes you could use tp4056 to charge 18650, cheap and effective solution.
Hi Admin,
Do you anticipate any problems with supplying the nRF24L01 boards at above the 3.6v they specify as a max supply voltage? Battery sensor runs it at 4.2v (and the relay boards at 5v …) I looked at buck/boost for it, but that would cost ~8x the price of the nRF module (for an efficient one, e.g. TPS63031).
For the relay boxes, a simple buck converter is fine so long as the 5v supply is good (1.7v dropout) and we don’t need to worry about efficiency too much, but for the battery sensors I’m thinking just to have a bunch of spare nRF modules to hand and see how it goes. Thoughts?
I’m really enjoying playing with this system, it should be installed and running in a few days, so thanks again. There are a few odds and ends in the (MySQL/PHP/JS) code that I’ve fiddled with to get working – would you prefer I submit pull requests on Github, or post them here? Also made some hacks to the Arduino code (added temp sensors to the relays, for example). I just can’t seem to leave things alone. 😉
Artlab,
18650 battery feed power to Arduino raw pin to use onboard regulator and nRF24L01 radio is feed from 3.3v but i never tried feeding nRF24L01 above 3.3v as it might kill nRF radio, relay box is feed from 5.0v and i m using separate voltage regulator for nRF24L01 radio to keep power as much clean as possible, on same note relay board itself if 5v.
you can submit pull request on Github or you can share here as zip file its up to you, i always welcome improvements as i m not perfect pro programmer/coder.
Ah, yes – I really need to read stuff more carefully… Although, in my defence, I worked from the ‘Boiler Relay‘ page first, which made no mention of the external voltage regulator (other than in a sketch comment).
It also doesn’t help, either, that I tried to be clever and followed the advice on MySensors regarding removing the on-board vreg from the Arduino (to conserve battery life).
I have questions now regarding the behaviour of the arduino on-board vreg (regarding Vcc) when voltage from the battery on the RAW pin drops down below Vcc + dropout… instinct tells me things will get wobbly, but I’ll do some experiments to check and report back here.
Don’t put yourself down about the code, BTW – I’ve found it refreshingly well commented and fairly easy to follow, even for a muppet like me. 🙂
i m glad you find this work helpful.
Boiler Relya: I’ll update pcb image later to make things more clear, you can remove on board voltage regulator if you are using 2 x AA batteries but i m using 18650 battery, hence onboard voltage regulator is needed for battery powered temperature sensor.
OK, so I tested the on-board voltage regulator on a 3.3v arduino pro mini clone (a ‘voltage selectable’ [3.3v or 5v] 8Mhz ATMega328 board, to be precise).
I fed it 4.2v down to 2.9v via the RAW input, with a nRF24L01 attached via Vcc, all the time running the boiler relay sketch, while also monitoring the Vcc line.
From 4.2v down to 3.35v input it was a solid 3.3v on Vcc, then below that the Vcc line stayed ~0.05v below the input (‘dropout’), ending up at 2.85v – so, no problems there! – all well within nRF24L01 spec. 🙂
I also performed a similar test on a 5v version, finding a dropout of around 0.4v when input to RAW drops below Vcc… when I was playing with an arduino-based 18650 tester, I made the mistake of powering via RAW at 5v, then basing voltage calculations on that 5v, rather than the ~4.6v that Vcc actually was – that and powering relays from Vcc, which dipped the Vcc voltage further (all analogue readings were in 1024th of Vcc, what ever that was at the time).
I guess I need to update my understanding of how linear voltage regulators work, as I was expecting to find dropout in the region of 2v… even the ‘Genuine’ arduino UNO spec suggests a 2v dropout when powering via the jack (=RAW), recommending a >7v supply. The MIC5205 used on the pro mini has a dropout so low that I suspect witchcraft. 😀
i did some testing while back as i was trying to find right voltage and supply for nrf radio and i came to conclusion:
For temperature sensors best to use onboard regulator.
For other i.e zone relay and boiler relay use separate voltage regulator with following combination to have rock solid communication:
10uf–0.1uf–1117 3.3–10uf–0.1uf and then 10uf on nRF radio. i tried different capacitor values but this one worked best, all other combinations produced very unreliable results from nRF radio.
lol “witchcraft” loved this line 🙂
I actually ended up using MP2307-based buck converters (mainly as I had a few laying around) to drop the 5v down to 3.3v in the zone/boiler relay boxes… these little boards are pretty much as the ‘Typical Configuration’ given in the datasheet and pretty much the same C values as you used, except for 22uF on the output. They’re all on the bench for testing/calibration at the moment and working perfectly – we’ll see what happens when they get dispersed around the house. 🙂
Another note regarding the battery-powered temperature sensors, I’ll leave it here in case it’s of use to anyone:
I’ve been experimenting with different arduino clones… originally I tried an ATMega 168 based board (3.3v) but it wouldn’t take the sketch (not enough memory), but by disabling ‘debug’ (as it was in the sketch before I fiddled with it!) it went on fine.
I also found that for some reason the 168 wasn’t happy with the onewire interface (DS18B20 data) being on pin 3 (failed to find the sensor, both with this sketch and the ‘dallas test’ sketches included with the library), moving it to pin 7 sorted it, though. Possibly this was a problem with the specific clone(s), I had one that gave erratic readings of A0 (battery voltage) – which is now added to my mounting pile of arduino ‘victims’.
which bootloader you used.thank you
@Ozgur,
what ever boot-loader is coming by default with these Arduino boards, i m not using any custom Arduino boot-loader but i have plane to investigate this to conserve power.
Hi,
It is possible to buy this sensor from you? I am not an electronics guy, so it would be challanging for me to build it on my own. I have an RPI based Opanhab solution but I am in truble with my temp. sensors. As it is Mysensores compatible, as I can see it would be possible to use with Openhab as well. Luckily the heating season has already started, so I am on pressure. 😀
I foud these ads, are these related to you?
Thank you,
Hi Attila,
yes that is me. You can buy these temperature sensors, all temperature sensors are 2xAAA battery powered, how many sensors you need? do you have compatible gateway?
Hi, thank you for your quick reply. I would buy three for testing and if it works, I would buy more. At the moment I measure temp at 10 locations in my house. Can I order at that site, or directly from you?
Compatible gateway:
No, at the moment I have no gateway. I saw that you have a gateway solution as well. to be honest I thought that I would connect aNRF24L01 module directly to my PI. Simply because I think that if it is not mandatory to extend the workflow with Wifi it is better to avoid it. As I can see Wifi is not really reliable. Correct me if I am wrong, I am not so experienced in this topic.
@Attila,
you need gateway compatible with MySensors library either you connect nrf to raspberry pi and make it gateway or your build one yourself with wifi or wired. all sensors (nodes) communicate with gateway and then controller (like PiHome) talk to the gateway for in coming messages and out going messages.
once you let me know what you need you can pay through paypal.
I know, and I take it. 😀 Could you please send my how much do 3 temp sensor and a gateway cost? Thank you
@Attlia,
just sent you email. need your address for shipping.
What’s up, yes this piece of writing is truly nice and I have learned lot of things from it
on the topic of blogging. thanks.
Hello!
I am interested in building what I can and buying what I can’t. Do the temperature sensors hang out of the bottom of the box? If not, is there enough heat given off to affect the temperature? Can the DHT11 be used to provide humidity instead of the probe listed?
Thank you for writing this up. I am looking forward to learning and building!
Hi drnate,
temperature sensors does not hang out of sensor box, it stay inside and box have enough perforation for air to flow through it. for details images see this link https://www.pihome.eu/product/wireless-ds18b20-room-temperature-sensor-battery-powered/
there isn’t enough room in that box for DHT11 sensor.
Is the battery holder board available? Or do I understand correctly that you built this?
Yes battery holders aren’t built by me they are widely available in any online electronic market.
Sorry to be so needy. Where does the bottom circuit board of your transmitter come from? It seems to hold the battery, an LED, power switch, and serves as the mounting spot for the microcontroller and the NRF24L01+.
that pcb is designed by myself
Hello Admin. I had to abandon my fully wired project on PiHome due to not finding a way to make the temp sensors work over long in-situ wires. I see there is now the new MaxAir project and would like to know if your wireless thermostats can work directly with RPi without the need for a seperate gateway? (My relays are direct GPIO wired).
Many thanks.
Hi Ian,
i m working on all in one solution but its not finished, if you have wireless network problem then use LoRa radio to really good performance.
Hi @Admin, I have 3 of your battery powered temp sensors broadcasting to your wifi relay box, but its becoming unworkable system as the batteries seem to last only 2 or 3 weeks – at most a month.
Of course I have tried brand new long life batteries and no difference.
I have your unit powered by 3 AAA batteries — which seems different than pictures and comments above on this thread. Thye have “rev 0.37 sketch 0.34” printed on the pcb.
I’d like to experiment and see if I can improve performance/lifetime myself by updating the sketch… I have used platformio with off the shelf arduino kits in the past but I’ not clear what I would need to do to connect to your unit and reprogram (and go back to the original sketch in case of no progress) — is it possible you could help a little to get me started?
Hi Robin, you can download sketch from github, there isnt anything in special in sensor sketch but important thing is sleep time for sensor.
I can connect arduino IDE to your temperature sensors and I get a load of output dumped to the serial monitor, including the MySensors splash screen… this suggests its not running the latest 0.35 sketch as that has the “#define MY_DEBUG” line commented, I would assume to disable all that output.
I’ve tried compiling (fine) and uploading your version 0.35 BUT I get errors like:
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x26
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xd8
Could you give me the settings for the IDE (like board and processor) so i can double check them.
Also, is there anything special required for a serial-usb cable to connect to the sensor? I’m using a “Fermion: FTDI Basic Breakout” from piHut.
Hi Robin, you can check what chip model you have, it could be PB or PU, you can install MiniCore in your Arduino IDE https://github.com/MCUdude/MiniCore