💬 Easy/Newbie PCB for MySensors
-
@sundberg84 I have now a node running with the BAT link removed, the REG link attached and I have used the Arduino_Vcc library.
The battery report are consistent with the battery voltage measured with a digital volt meter.
EDIT: Code below had a bug in it, I have fixed the bug and updated the code. The bug affected the temperature readings
So, to run the RFM69 board on two AA batteries I have done the following:- Removed regulator and led from Arduino
- Burned a new bootloader with a 1.7 volt BOD
- Put a link in REG position
- Solder radio to board
- Solder antenna to board.
- Solder BME280 to power and A5, A6
And that's it.
Here is my code:
/** * The MySensors Arduino library handles the wireless radio link and protocol * between your home built sensors/actuators and HA controller of choice. * The sensors forms a self healing radio network with optional repeaters. Each * repeater and gateway builds a routing tables in EEPROM which keeps track of the * network topology allowing messages to be routed to nodes. * * Created by Henrik Ekblad <henrik.ekblad@mysensors.org> * Copyright (C) 2013-2015 Sensnology AB * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors * * Documentation: http://www.mysensors.org * Support Forum: http://forum.mysensors.org * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 as published by the Free Software Foundation. * ******************************* * * DESCRIPTION * * This is a sketch I use to measure temperature, battery level and signal level on * my Easy/Newbie PCB for MySensors (rev 9) * Hardware used: * Easy/Newbie PCB for MySensors * BME280 (I only use temperature and humidity, all code for barometic pressure removed) * */ // Enable debug prints to serial monitor //#define MY_DEBUG #define MY_SPLASH_SCREEN_DISABLED // This saves a couple of bytes // Enable and select radio type attached #define MY_RADIO_RFM69 #define MY_IS_RFM69HW #define MY_RFM69_NEW_DRIVER #define MY_RFM69_FREQUENCY RFM69_868MHZ // #define MY_RFM69_ENABLE_ENCRYPTION #include <MySensors.h> #include <Wire.h> // Enables the Wire communication protocol. // Bosch BME280 Embedded Adventures MOD-1022 weather multi-sensor Arduino code, // written originally by Embedded Adventures. // https://github.com/embeddedadventures/BME280 #include <BME280_MOD-1022.h> // Internal battery measurement https://github.com/Yveaux/arduino_vcc #include <Vcc.h> #define SKETCH_NAME "Test-4" #define SKETCH_VERSION "1.10" // Battery measurements const float VccMin = 2.0*1.0; // Min Vcc level, in Volts. Example for 2xAA Alkaline. const float VccMax = 2.0*1.5; // Max Vcc level, in Volts. Example for 2xAA Alkaline. const float VccCorrection = 3.02/3.12; // Measured Vcc by multimeter divided by reported Vcc Vcc vcc(VccCorrection); // VARIABLES YOU CAN CHANGE // Send temperature only if it has changed? 1 = Yes 0 = No. #define COMPARE_TEMP 0 // Set this value to the minimum change in temperature to measure. // BME280 has +-0.5 degrees precision, so it really doesn't matter that much. float tempThreshold = 0.5; // Send temperature only if changed? 1 = Yes 0 = No. #define COMPARE_HUM 0 // Set this value to the minimum change in humidity to measure. // BME280 has +-3% relative humidity precision, so it really doesn't matter that much. float humThreshold = 0.5; #define TEMP_CHILD_ID 1 #define HUM_CHILD_ID 2 #define VOLTAGE_CHILD_ID 3 float lastTemperature = -1; // Store previous measurement float lastHumidity = -1; // Stores the previous measurement int sendBattery = 6; // report battery level only after 6 loops = 6*4 mintes = 24 minutes int batteryLoop = 0; // Placeholder for batteryloop unsigned long FOUR_MINUTE_SEND_FREQUENCY = 4 * 60000; // Time between send (in milliseconds). // MYSENSORS COMMUNICATION VARIABLES MyMessage temperatureMsg(TEMP_CHILD_ID, V_TEMP); MyMessage humidityMsg(HUM_CHILD_ID, V_HUM); MyMessage voltageMsg(VOLTAGE_CHILD_ID, V_VOLTAGE); void setup() { #ifdef MY_DEBUG Serial.begin(115200); #endif Wire.begin(); // For the BME280 sensor #ifdef MY_DEBUG Serial.println(F("Starting ...")); #endif } void presentation() { // Send the sketch version information to the gateway and Controller sendSketchInfo(SKETCH_NAME, SKETCH_VERSION); // Present the sensors to the gateway and controller present(TEMP_CHILD_ID, S_TEMP, "Temperature Test-4"); present(HUM_CHILD_ID, S_HUM, "Relative humidity Test-4"); present(VOLTAGE_CHILD_ID, S_MULTIMETER, "Battery Test-4" ); } void loop() { #ifdef MY_DEBUG Serial.println(F("Read BME280 and report it's values.")); #endif GetTemperatureHumidity(); // Get temperature and humidity if(batteryLoop > sendBattery) { // Is the batteryLoop higher than sendBattery? #ifdef MY_DEBUG Serial.println(F("Read the battery voltage and report it.")); #endif MeasureBattery(); // Measure and report battery level batteryLoop = 0; // Reset batteryLoop count } #ifdef MY_DEBUG Serial.print(F("Go to sleep for: ")); Serial.print(FOUR_MINUTE_SEND_FREQUENCY / 60000); Serial.println(F(" minutes.")); #endif batteryLoop++; sleep(FOUR_MINUTE_SEND_FREQUENCY); // Sleep for 4 minutes } void GetTemperatureHumidity() { #ifdef MY_DEBUG Serial.println(""); Serial.println(F("BME280 - Requesting new data from sensor module.")); #endif BME280.readCompensationParams(); // Need to read the NVM compensation parameters. // Normal mode for regular automatic samples BME280.writeStandbyTime(tsb_0p5ms); // tsb = 0.5ms BME280.writeFilterCoefficient(fc_16); // IIR Filter coefficient 16 BME280.writeOversamplingPressure(os16x); // pressure x16 BME280.writeOversamplingTemperature(os8x); // temperature x8 BME280.writeOversamplingHumidity(os8x); // humidity x8 BME280.writeMode(smNormal); #ifdef MY_DEBUG Serial.println(F("Getting new values")); #endif while (BME280.isMeasuring()) { // Wait for BME280 to fininsh reading data #ifdef MY_DEBUG Serial.println(F("Measuring...")); #endif delay(50); } Serial.println(F("Done!")); // Read out the data - must do this before calling the getxxxxx routines BME280.readMeasurements(); float temperature = BME280.getTemperatureMostAccurate(); // Get the temperature first. float humidity = BME280.getHumidityMostAccurate(); // Get the humidity. #ifdef MY_DEBUG Serial.print(F("BME280 - Temperature = ")); Serial.print(temperature); Serial.println(" °C"); Serial.print(F("BME280 - Humidity = ")); Serial.print(humidity); Serial.println(F(" %")); #endif // Now, let's send the measurements to the gateway. // Send temperature if the temperature difference bigger than the threshold if (COMPARE_TEMP == 1 && abs(temperature - lastTemperature) < tempThreshold) { #ifdef MY_DEBUG Serial.print(temperature - lastTemperature); Serial.println(F(" Temperature difference too small, don't send it to gateway.")); #endif } else { #ifdef MY_DEBUG Serial.println(F("Sending new temperature to the gateway.")); #endif send(temperatureMsg.set(temperature, 1)); lastTemperature = temperature; // Save temperatures for compare in the next round. } // Send humidity if the humidity difference is bigger than the threshold. if (COMPARE_TEMP == 1 && abs(humidity - lastHumidity) < humThreshold) { #ifdef MY_DEBUG Serial.print(humidity - lastHumidity); Serial.println(F(" Humidity difference too small, don't send it to the gateway.")); #endif } else { #ifdef MY_DEBUG Serial.println(F("BME280 - Sending the new humidity to the gateway.")); #endif send(humidityMsg.set(humidity, 1)); lastHumidity = humidity; // Save new humidity to be able to compare in the next round. } #ifdef MY_DEBUG Serial.println(F("BME280 - Measurement complete. Putting sensor to sleep.")); #endif BME280.writeMode(smSleep); // set the BME280to sleep mode, save battery } // GetTemperatureHumidity /* * * MeasureBattery * * */ void MeasureBattery() //The battery calculations { float Vbat = vcc.Read_Volts(); int batteryPercent = static_cast<int>(vcc.Read_Perc(VccMin, VccMax)); #ifdef MY_DEBUG Serial.print(F("Battery percent: ")); Serial.print(batteryPercent); Serial.println(" %"); Serial.print(F("Battery Voltage: ")); Serial.print(Vbat); Serial.println(F(" Volts")); #endif sendBatteryLevel(batteryPercent); send(voltageMsg.set(Vbat,2)); //send battery in Volt 2 decimal places }@mickecarlsson - nice work! Let us know how it turns out :)
Any pictures of this you can share?I did see you put VccMin to 1,2V and this might calculate so the battery will be @ 30% when the BOD hits you. I would put this to 2.0v if you are using a internal 8mhz bootloader. https://forum.mysensors.org/topic/7296/how-to-burn-fuses-so-that-pro-mini-3-3v-would-go-down-to-1-8v-solved/15
-
@sundberg84 Hi, I soldered a board holding a humidity and temperature sensor. That is working fine and reporting to may gateway (mqtt). Only thing which I do not get working ok is the battery level measurement. As I already posted in an other topic here.
Here are some pictures of my board. The bat jumper is connected with a wire on the bottom. And the code I use on it right now.
I already changed the pro mini for a fresh soldered one but still getting the the same result. Just ones giving the volt and % and after that only giving 0 volt as output.
tried to include delay(500) in the sketch but that did not help. So how to solve this?#define MY_NODE_ID 2 #define MY_PARENT_NODE_ID 0 #define MY_PARENT_NODE_IS_STATIC // Enable debug prints #define MY_DEBUG // Enable and select radio type attached #define MY_RADIO_NRF24 //#define MY_RADIO_RFM69 //#define MY_RS485 #include <SparkFunHTU21D.h> #include <MySensors.h> #include <Wire.h> #include <SPI.h> // Force sending an update of the temperature after n sensor reads, so a controller showing the // timestamp of the last update doesn't show something like 3 hours in the unlikely case, that // the value didn't change since; // i.e. the sensor would force sending an update every UPDATE_INTERVAL*FORCE_UPDATE_N_READS [ms] //static const uint8_t FORCE_UPDATE_N_READS = 10; #define CHILD_ID_HUM 0 #define CHILD_ID_TEMP 1 #define CHILD_ID_BATTERY 2 //#define CHILD_ID_VOLT 2 #define CHILD_ID_PRCNT 3 float lastTemp; float lastHum; uint8_t nNoUpdatesTemp; uint8_t nNoUpdatesHum; boolean metric = true; void presentation() { // Send the Sketch Version Information to the Gateway sendSketchInfo("Humidity", "2.0"); // Register all sensors to gw (they will be created as child devices) present(CHILD_ID_HUM, S_HUM); present(CHILD_ID_TEMP, S_TEMP); present(CHILD_ID_BATTERY, S_MULTIMETER); //metric = getControllerConfig().isMetric; } int BATTERY_SENSE_PIN = A0; // select the input pin for the battery sense point unsigned long SLEEP_TIME = 60000; // Sleep time between reads (in milliseconds) static int oldBatteryPcnt = 0; //Create an instance of the object HTU21D myHumidity; MyMessage msgHum(CHILD_ID_HUM, V_HUM); MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP); MyMessage msgBattery(CHILD_ID_BATTERY, V_VOLTAGE); //MyMessage msgBattery(CHILD_ID_BATTERY, V_PRCNT); void setup() { myHumidity.begin(); // use the 1.1 V internal reference #if defined(__AVR_ATmega2560__) analogReference(INTERNAL1V1); #else analogReference(INTERNAL); #endif } void loop() { float temperature = myHumidity.readTemperature(); //if (!metric) { // temperature = (temperature * 1.8) + 32.0; //} send(msgTemp.set(temperature, 1)); Serial.print("T: "); Serial.println(temperature); float humidity = myHumidity.readHumidity(); send(msgHum.set(humidity, 1)); Serial.print("H: "); Serial.println(humidity); // get the battery Voltage int sensorValue = analogRead(BATTERY_SENSE_PIN); delay(500); #ifdef MY_DEBUG Serial.println(sensorValue); #endif // 1M, 470K divider across battery and using internal ADC ref of 1.1V // Sense point is bypassed with 0.1 uF cap to reduce noise at that point // ((1e6+470e3)/470e3)*1.1 = Vmax = 3.44 Volts // 3.44/1023 = Volts per bit = 0.003363075 int batteryPcnt = sensorValue / 10; #ifdef MY_DEBUG float batteryV = sensorValue * 0.003363075; Serial.print("Child ID "); Serial.print(CHILD_ID_BATTERY); Serial.print("Battery Voltage: "); Serial.print(batteryV); Serial.println(" V"); Serial.print("Battery Percent: "); Serial.print(batteryPcnt); Serial.println(" %"); #endif if (oldBatteryPcnt != batteryPcnt) { // Power up radio after sleep sendBatteryLevel(batteryPcnt); oldBatteryPcnt = batteryPcnt; } sleep(SLEEP_TIME); //sleep a bit }

-
@sundberg84 Hi, I soldered a board holding a humidity and temperature sensor. That is working fine and reporting to may gateway (mqtt). Only thing which I do not get working ok is the battery level measurement. As I already posted in an other topic here.
Here are some pictures of my board. The bat jumper is connected with a wire on the bottom. And the code I use on it right now.
I already changed the pro mini for a fresh soldered one but still getting the the same result. Just ones giving the volt and % and after that only giving 0 volt as output.
tried to include delay(500) in the sketch but that did not help. So how to solve this?#define MY_NODE_ID 2 #define MY_PARENT_NODE_ID 0 #define MY_PARENT_NODE_IS_STATIC // Enable debug prints #define MY_DEBUG // Enable and select radio type attached #define MY_RADIO_NRF24 //#define MY_RADIO_RFM69 //#define MY_RS485 #include <SparkFunHTU21D.h> #include <MySensors.h> #include <Wire.h> #include <SPI.h> // Force sending an update of the temperature after n sensor reads, so a controller showing the // timestamp of the last update doesn't show something like 3 hours in the unlikely case, that // the value didn't change since; // i.e. the sensor would force sending an update every UPDATE_INTERVAL*FORCE_UPDATE_N_READS [ms] //static const uint8_t FORCE_UPDATE_N_READS = 10; #define CHILD_ID_HUM 0 #define CHILD_ID_TEMP 1 #define CHILD_ID_BATTERY 2 //#define CHILD_ID_VOLT 2 #define CHILD_ID_PRCNT 3 float lastTemp; float lastHum; uint8_t nNoUpdatesTemp; uint8_t nNoUpdatesHum; boolean metric = true; void presentation() { // Send the Sketch Version Information to the Gateway sendSketchInfo("Humidity", "2.0"); // Register all sensors to gw (they will be created as child devices) present(CHILD_ID_HUM, S_HUM); present(CHILD_ID_TEMP, S_TEMP); present(CHILD_ID_BATTERY, S_MULTIMETER); //metric = getControllerConfig().isMetric; } int BATTERY_SENSE_PIN = A0; // select the input pin for the battery sense point unsigned long SLEEP_TIME = 60000; // Sleep time between reads (in milliseconds) static int oldBatteryPcnt = 0; //Create an instance of the object HTU21D myHumidity; MyMessage msgHum(CHILD_ID_HUM, V_HUM); MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP); MyMessage msgBattery(CHILD_ID_BATTERY, V_VOLTAGE); //MyMessage msgBattery(CHILD_ID_BATTERY, V_PRCNT); void setup() { myHumidity.begin(); // use the 1.1 V internal reference #if defined(__AVR_ATmega2560__) analogReference(INTERNAL1V1); #else analogReference(INTERNAL); #endif } void loop() { float temperature = myHumidity.readTemperature(); //if (!metric) { // temperature = (temperature * 1.8) + 32.0; //} send(msgTemp.set(temperature, 1)); Serial.print("T: "); Serial.println(temperature); float humidity = myHumidity.readHumidity(); send(msgHum.set(humidity, 1)); Serial.print("H: "); Serial.println(humidity); // get the battery Voltage int sensorValue = analogRead(BATTERY_SENSE_PIN); delay(500); #ifdef MY_DEBUG Serial.println(sensorValue); #endif // 1M, 470K divider across battery and using internal ADC ref of 1.1V // Sense point is bypassed with 0.1 uF cap to reduce noise at that point // ((1e6+470e3)/470e3)*1.1 = Vmax = 3.44 Volts // 3.44/1023 = Volts per bit = 0.003363075 int batteryPcnt = sensorValue / 10; #ifdef MY_DEBUG float batteryV = sensorValue * 0.003363075; Serial.print("Child ID "); Serial.print(CHILD_ID_BATTERY); Serial.print("Battery Voltage: "); Serial.print(batteryV); Serial.println(" V"); Serial.print("Battery Percent: "); Serial.print(batteryPcnt); Serial.println(" %"); #endif if (oldBatteryPcnt != batteryPcnt) { // Power up radio after sleep sendBatteryLevel(batteryPcnt); oldBatteryPcnt = batteryPcnt; } sleep(SLEEP_TIME); //sleep a bit }

@mr_sensor - I can not see any errors on the pictures you posted.
Can you measure the voltage on Booster-Vout and also on this pad.
-
@mr_sensor - I can not see any errors on the pictures you posted.
Can you measure the voltage on Booster-Vout and also on this pad.
@sundberg84 said in 💬 Easy/Newbie PCB for MySensors:
@mr_sensor - I can not see any errors on the pictures you posted.
Can you measure the voltage on Booster-Vout and also on this pad.
I did measure the parts you mentioned. Booster is 3,36 v and the other pad is 0,00 the input strait from the batteries is 2,80 v
Also, Just for my info, does it matter how the resistors or capacitors are soldered on the board? My biggest problem is always determine the right resistors value and the right way to solder them (+ -). On the pcb some of them are coded (very handy for me as a beginner) with a G but not all of them?
So my worry was that I maybe have soldered the "battery measurer" ones in the wring direction? Could that be the problem here? -
Resistors can be soldered either way, but if you read 0v on that capacitor pin it mean you have a problem between the battery and the capacitor, so you have to backtrack the connection that is missing
@gohan said in 💬 Easy/Newbie PCB for MySensors:
Resistors can be soldered either way, but if you read 0v on that capacitor pin it mean you have a problem between the battery and the capacitor, so you have to backtrack the connection that is missing
I measured the capacitor again and get a 0,10 output.
-
Capacitor value does not change the voltage. The resistors does... I would double check that you use the right resistors. For example it's easy to use a resistor marked 1k instead of 1M. With 3.3v you should have around 1v on the capacitor.
-
@gohan said in 💬 Easy/Newbie PCB for MySensors:
you are also missing the capacitor on the booster output for better stability
Ok, I assumed it was not needed when using a battery. Which one to use there?
@mr_sensor a advice is to measure the resistance again over the resistors.
-
@mr_sensor a advice is to measure the resistance again over the resistors.
@sundberg84 Well I tried that but did not get the measurement straight from the pcb si I decided t solder a new board using the right capacitor this time (0,1uf instead of 1uf) made sure using the right resistors as well and adding a capacitor after the booster. Than with the same mini pro from the other board tested again and wow it is working as intended.
Child ID 2Battery Voltage: 3.44 V Battery Percent: 102 % 2930 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=0,pt=1,l=1,sg=0,ft=0,st=OK:102 2938 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255 2945 TSF:TDI:TSL 2947 MCO:SLP:WUP=-1 2949 TSF:TRI:TSB 3065 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:998.0 T: 998.00 3178 TSF:MSG:SEND,2-2-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:998.0 H: 998.00 957 Child ID 2Battery Voltage: 3.22 V Battery Percent: 95 % 3690 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=0,pt=1,l=1,sg=0,ft=0,st=OK:95 3698 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255 3704 TSF:TDI:TSL 3706 MCO:SLP:WUP=-1 3708 TSF:TRI:TSB 3815 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:998.0 T: 998.00 3932 TSF:MSG:SEND,2-2-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:998.0 H: 998.00 955 Child ID 2Battery Voltage: 3.21 V Battery Percent: 95 % 4442 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255 4452 TSF:TDI:TSL 4454 MCO:SLP:WUP=-1 4456 TSF:TRI:TSB 4560 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:998.0 T: 998.00 4673 TSF:MSG:SEND,2-2-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:998.0 H: 998.00 953 Child ID 2Battery Voltage: 3.21 V Battery Percent: 95 % 5185 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255 5193 TSF:TDI:TSL 5195 MCO:SLP:WUP=-1 5197 TSF:TRI:TSB 5304 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:998.0 T: 998.00 5416 TSF:MSG:SEND,2-2-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:998.0 H: 998.00 952 Child ID 2Battery Voltage: 3.20 V Battery Percent: 95 % 5926 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255 5935 TSF:TDI:TSL 5939 MCO:SLP:WUP=-1 5941 TSF:TRI:TSB 6045 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:998.0 T: 998.00 6158 TSF:MSG:SEND,2-2-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:998.0 H: 998.00 952 Child ID 2Battery Voltage: 3.20 V Battery Percent: 95 % 6670 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255 6678 TSF:TDI:TSL 6680 MCO:SLP:WUP=-1 6682 TSF:TRI:TSB 6789 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:998.0 T: 998.00 6901 TSF:MSG:SEND,2-2-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:998.0 H: 998.00 952 Child ID 2Battery Voltage: 3.20 V Battery Percent: 95 % 7411 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255 7419 TSF:TDI:TSL 7424 MCO:SLP:WUP=-1 7426 TSF:TRI:TSB 7530 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:998.0 T: 998.00 7643 TSF:MSG:SEND,2-2-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:998.0 H: 998.00 952 Child ID 2Battery Voltage: 3.20 V Battery Percent: 95 % 8155 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255 8163 TSF:TDI:TSL 8165 MCO:SLP:WUP=-1 8167 TSF:TRI:TSB 8273 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:998.0 T: 998.00 8388 TSF:MSG:SEND,2-2-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:998.0 H: 998.00 955 Child ID 2Battery Voltage: 3.21 V Battery Percent: 95 % 8898 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255 8908 TSF:TDI:TSL 8910 MCO:SLP:WUP=-1 8912 TSF:TRI:TSB 9021 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:998.0 T: 998.00 9132 TSF:MSG:SEND,2-2-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:998.0 H: 998.00 948 Child ID 2Battery Voltage: 3.19 V Battery Percent: 94 % 9646 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=0,pt=1,l=1,sg=0,ft=0,st=OK:94 9654 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255 9660 TSF:TDI:TSL 9662 MCO:SLP:WUP=-1 9664 TSF:TRI:TSB 9771 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:998.0 T: 998.00 9881 TSF:MSG:SEND,2-2-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:998.0 H: 998.00 952 Child ID 2Battery Voltage: 3.20 V Battery Percent: 95 % 10395 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=0,pt=1,l=1,sg=0,ft=0,st=OK:95 10403 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255 10409 TSF:TDI:TSL 10412 MCO:SLP:WUP=-1 10414 TSF:TRI:TSB 10520 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:998.0 T: 998.00 10635 TSF:MSG:SEND,2-2-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:998.0 H: 998.00 953 Child ID 2Battery Voltage: 3.21 V Battery Percent: 95 % 11147 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255 11155 TSF:TDI:TSLNow in mqtt I can see the percentage as:
95 qos : 0, retain : false, cmd : publish, dup : false, topic : **mygateway1-out/2/255/3/0/0**, messageId : , length : 30, Raw payload : 5753``` But not the voltage? -
@sundberg84 Well I tried that but did not get the measurement straight from the pcb si I decided t solder a new board using the right capacitor this time (0,1uf instead of 1uf) made sure using the right resistors as well and adding a capacitor after the booster. Than with the same mini pro from the other board tested again and wow it is working as intended.
Child ID 2Battery Voltage: 3.44 V Battery Percent: 102 % 2930 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=0,pt=1,l=1,sg=0,ft=0,st=OK:102 2938 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255 2945 TSF:TDI:TSL 2947 MCO:SLP:WUP=-1 2949 TSF:TRI:TSB 3065 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:998.0 T: 998.00 3178 TSF:MSG:SEND,2-2-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:998.0 H: 998.00 957 Child ID 2Battery Voltage: 3.22 V Battery Percent: 95 % 3690 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=0,pt=1,l=1,sg=0,ft=0,st=OK:95 3698 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255 3704 TSF:TDI:TSL 3706 MCO:SLP:WUP=-1 3708 TSF:TRI:TSB 3815 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:998.0 T: 998.00 3932 TSF:MSG:SEND,2-2-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:998.0 H: 998.00 955 Child ID 2Battery Voltage: 3.21 V Battery Percent: 95 % 4442 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255 4452 TSF:TDI:TSL 4454 MCO:SLP:WUP=-1 4456 TSF:TRI:TSB 4560 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:998.0 T: 998.00 4673 TSF:MSG:SEND,2-2-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:998.0 H: 998.00 953 Child ID 2Battery Voltage: 3.21 V Battery Percent: 95 % 5185 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255 5193 TSF:TDI:TSL 5195 MCO:SLP:WUP=-1 5197 TSF:TRI:TSB 5304 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:998.0 T: 998.00 5416 TSF:MSG:SEND,2-2-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:998.0 H: 998.00 952 Child ID 2Battery Voltage: 3.20 V Battery Percent: 95 % 5926 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255 5935 TSF:TDI:TSL 5939 MCO:SLP:WUP=-1 5941 TSF:TRI:TSB 6045 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:998.0 T: 998.00 6158 TSF:MSG:SEND,2-2-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:998.0 H: 998.00 952 Child ID 2Battery Voltage: 3.20 V Battery Percent: 95 % 6670 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255 6678 TSF:TDI:TSL 6680 MCO:SLP:WUP=-1 6682 TSF:TRI:TSB 6789 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:998.0 T: 998.00 6901 TSF:MSG:SEND,2-2-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:998.0 H: 998.00 952 Child ID 2Battery Voltage: 3.20 V Battery Percent: 95 % 7411 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255 7419 TSF:TDI:TSL 7424 MCO:SLP:WUP=-1 7426 TSF:TRI:TSB 7530 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:998.0 T: 998.00 7643 TSF:MSG:SEND,2-2-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:998.0 H: 998.00 952 Child ID 2Battery Voltage: 3.20 V Battery Percent: 95 % 8155 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255 8163 TSF:TDI:TSL 8165 MCO:SLP:WUP=-1 8167 TSF:TRI:TSB 8273 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:998.0 T: 998.00 8388 TSF:MSG:SEND,2-2-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:998.0 H: 998.00 955 Child ID 2Battery Voltage: 3.21 V Battery Percent: 95 % 8898 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255 8908 TSF:TDI:TSL 8910 MCO:SLP:WUP=-1 8912 TSF:TRI:TSB 9021 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:998.0 T: 998.00 9132 TSF:MSG:SEND,2-2-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:998.0 H: 998.00 948 Child ID 2Battery Voltage: 3.19 V Battery Percent: 94 % 9646 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=0,pt=1,l=1,sg=0,ft=0,st=OK:94 9654 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255 9660 TSF:TDI:TSL 9662 MCO:SLP:WUP=-1 9664 TSF:TRI:TSB 9771 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:998.0 T: 998.00 9881 TSF:MSG:SEND,2-2-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:998.0 H: 998.00 952 Child ID 2Battery Voltage: 3.20 V Battery Percent: 95 % 10395 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=0,pt=1,l=1,sg=0,ft=0,st=OK:95 10403 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255 10409 TSF:TDI:TSL 10412 MCO:SLP:WUP=-1 10414 TSF:TRI:TSB 10520 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:998.0 T: 998.00 10635 TSF:MSG:SEND,2-2-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:998.0 H: 998.00 953 Child ID 2Battery Voltage: 3.21 V Battery Percent: 95 % 11147 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255 11155 TSF:TDI:TSLNow in mqtt I can see the percentage as:
95 qos : 0, retain : false, cmd : publish, dup : false, topic : **mygateway1-out/2/255/3/0/0**, messageId : , length : 30, Raw payload : 5753``` But not the voltage?@mr_sensor good to hear its working.
It looks like you are only sending the % and not the voltage? -
@Mr_sensor It happened to me once that capacitor was just shortening the circuit, it was a smd, but when I removed it and tested it it was constantly making shortage, thus the circuit was never working and luckily my power supply had a low enough protection.
I examined cap very closely, all looked fine, but internally it was not working fine.Since most of us (well, me at least) are buying cheap components I made it a habit now to always measure every passive component before installation, partly eliminates one variable
-
A short sneak-peak on the upcoming revision...
Still a long way to go...
Rev 10 - Nrf24l01+ ed.
- Completley redesigned in KiCad.
- MysX location changed to accept more MysX boards and align like RFM version.
- Optional signing added
- Optional SPI flash added.
- Extra pins aligned to 2.45 vertical & horisontal
- Relocated Extra + Bat Measurer some to allow more space to booster
- Changed pull-up resistor from D3 to D5 to have one more pin for Interrupt
- Relocated D5 pullup, MysX and IRQ jumper some.
- Changed footprint (silk-screen) on capacitor to easier show Gnd/Pos side.
Need to change footprint on voltage regulator on both nrf and rfm edition back to a square and not a liniar one. (rev 9 change). Not intended to revert back.
Also a bit worried the 4,7uF cap os to far away from radio.
-
A short sneak-peak on the upcoming revision...
Still a long way to go...
Rev 10 - Nrf24l01+ ed.
- Completley redesigned in KiCad.
- MysX location changed to accept more MysX boards and align like RFM version.
- Optional signing added
- Optional SPI flash added.
- Extra pins aligned to 2.45 vertical & horisontal
- Relocated Extra + Bat Measurer some to allow more space to booster
- Changed pull-up resistor from D3 to D5 to have one more pin for Interrupt
- Relocated D5 pullup, MysX and IRQ jumper some.
- Changed footprint (silk-screen) on capacitor to easier show Gnd/Pos side.
Need to change footprint on voltage regulator on both nrf and rfm edition back to a square and not a liniar one. (rev 9 change). Not intended to revert back.
Also a bit worried the 4,7uF cap os to far away from radio.
@sundberg84 said in 💬 Easy/Newbie PCB for MySensors:
Also a bit worried the 4,7uF cap os to far away from radio.
Putting it underneath the nrf24 module? I know it is not a "clean solution" but there would be still be unused space under the radio module