I will try tomorrow to do it without any voltage regulators together with a sensebender micro. I have the bigger pir sensor though, but I dont think its much difference on thoose. We will see.
Fredrik Carlsson
Posts
-
Stable battery PIR Sensor -
Stable battery PIR Sensor@m26872 Hello, have you not used any voltage regultator for the pir sensor? You just give it direct connection to the batterypack?
-
Heatpump controllerHello
It would be nice to make it run on batteries, maybe with 10 seconds sleep, and then wake up only to check with gateway if there is a new command and then sleep again.I am building a pir sensor now based on 3*aa batteris running on 4,5 volt.I will ust use an LE33 step down directly after the battery pack to provide power to both sensebender+radio+pir. Dont know if that is the optimal way to do it but it should work
-
Heatpump controller@ToniA
Hey, thanks for all the work you have put down. I have had some other projects going the last year so have not really put down more time on this.How is it working with the sensebender? Are you using it on batteries?
Any ide about battery usage? -
Stable battery PIR SensorWonderful!
Maybe I will try this design then. But I dont need them so small so will probably use the bigger PIR sensor in mine.
I will revert when I'm done -
Stable battery PIR SensorHello
I am busy building an burglar alarm for my home.
Because of this its important its a wireless system (to not go down during electrical failure in the house).I wonder is there any stable good PIR sensor that works with battery?
I have sourced the forum but not really found anything. I have a couple of Sensebender micro boads lying around that I would prefer to use for this.Its off course also important that there is no false triggers, because then it would be a very unreliable system.
-
Measuring currentYes i am. but there is mistake in the picture the R3 is connected between Pin 3 and VCC, not ground (pull up resistor).
Then that leaves me hanging a bit because that is way more than I will be comfortable with in terms off battery changes.
Any suggestion what to do? -
Measuring current#include <MySensor.h> #include <DHT.h> #define CHILD_ID_HUM 0 #define CHILD_ID_TEMP 1 #define CHILD_ID_SWITCH 2 #define BUTTON_PIN 3 #define HUMIDITY_SENSOR_DIGITAL_PIN 4 #define VBAT_PER_BITS 0.003363075 //(1mohm / 470 kohm) Calculated volts per bit from the used battery montoring voltage divider. Internal_ref=1.1V, res=10bit=2^10-1=1023, Eg for 3V (2AA): Vin/Vb=R1/(R1+R2)=470e3/(1e6+470e3), Vlim=Vb/Vin*1.1=3.44V, Volts per bit = Vlim/1023= 0.003363075 #define VMIN 1.9 // Battery monitor lower level. Vmin_radio=1.9V #define VMAX 3.3 // " " " high level. Vmin<Vmax<=3.44 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) MySensor gw; DHT dht; float lastTemp; float lastHum; boolean metric = true; int oldBatteryPcnt = 0; MyMessage msg(CHILD_ID_SWITCH,V_TRIPPED); MyMessage msgHum(CHILD_ID_HUM, V_HUM); MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP); void setup() { analogReference(INTERNAL); gw.begin(); dht.setup(HUMIDITY_SENSOR_DIGITAL_PIN); // Send the Sketch Version Information to the Gateway gw.sendSketchInfo("Humidity", "1.0"); // Setup the button pinMode(BUTTON_PIN,INPUT); // Activate internal pull-up digitalWrite(BUTTON_PIN,HIGH); // Register all sensors to gw (they will be created as child devices) gw.present(CHILD_ID_SWITCH, S_DOOR); gw.present(CHILD_ID_HUM, S_HUM); gw.present(CHILD_ID_TEMP, S_TEMP); metric = gw.getConfig().isMetric; } void loop() { // Get the update value int value = digitalRead(BUTTON_PIN); // Send in the new value gw.send(msg.set(value==HIGH ? 1 : 0)); delay(dht.getMinimumSamplingPeriod()); float temperature = dht.getTemperature(); if (isnan(temperature)) { Serial.println("Failed reading temperature from DHT"); } else if (temperature != lastTemp) { lastTemp = temperature; if (!metric) { temperature = dht.toFahrenheit(temperature); } gw.send(msgTemp.set(temperature, 1)); Serial.print("T: "); Serial.println(temperature); } float humidity = dht.getHumidity(); if (isnan(humidity)) { Serial.println("Failed reading humidity from DHT"); } else if (humidity != lastHum) { lastHum = humidity; gw.send(msgHum.set(humidity, 1)); Serial.print("H: "); Serial.println(humidity); } int sensorValue = analogRead(BATTERY_SENSE_PIN); // Battery monitoring reading // Serial.println(sensorValue); float Vbat = sensorValue * VBAT_PER_BITS; // Serial.print("Battery Voltage: "); Serial.print(Vbat); Serial.println(" V"); //int batteryPcnt = sensorValue / 10; int batteryPcnt = static_cast<int>(((Vbat-VMIN)/(VMAX-VMIN))*100.); // Serial.print("Battery percent: "); Serial.print(batteryPcnt); Serial.println(" %"); if (oldBatteryPcnt != batteryPcnt) { gw.sendBatteryLevel(batteryPcnt); oldBatteryPcnt = batteryPcnt; } gw.sleep(BUTTON_PIN-2, CHANGE, SLEEP_TIME); } -
Measuring currentHello again.
I just got some new 470k resistors today so i changed out the 10k/4,7k resistors on the battery circuit to 1mohm/470k
The current draw is now 0,63mA when sleeping and 17,6mA when sending.
Especially the sleeping current seem very high. Any ideas to why? -
Problems with powermeter pulse sensorhmm think i solved the problem. I tried with an arduino uno instead and now the sketch works fine. Very strange :(
-
Problems with powermeter pulse sensorHello
I have installed a 3 phase meter for my waterheater.
It is on 3 kw and is also equipped with a ledpulse.
I have made a sensor and flashed it with the standard sketch. I have only changed the pulse/whr to 800 as that is what my meter says.But I get this very strange watt values. I get in the serial log printed watt: around 42000
the meter says 2994 +- which is also correct because its a 3000 w heater.
I did a manual test and clocked 20 pulses looking at the meter and divided by 20.then i got 1,465 ms which calculates to around 3090 watt so the optical out on the sensor is working good. I have also tried putting a 10k resistor between ground and D3 pin without success.
The arduino is a arduino nano clone bought on ebay. I have also tried with another one but with same problem (arduino nano clone also). Could it be that the timing is corrupt on theese clones? Or do you have any other suggestions?
-
Windows GUI/Controller for MySensorsYes I tried now again an now it works. Maybe something temporary with Dropbox yesterday
-
Windows GUI/Controller for MySensors@tekka Hey, it seems like the downloadlink is broken. Can you check?
-
Measuring current@AWI Hello, yes I was aware of that. So it could be possible that configuration no 2 is working, just that it is not possible to measure. .. I will try when I come home. And yes the led is detached. I will also change resistors for the measurement circuit. Just need to order some 470k resistors
-
Measuring currentAha, that could probably be the cause then
I have now tried with the following 2 scenarios:
Using internal pullup, then i get the current draw 2,85 mA in sleep, which is quite high?I tried to deactivate the internal pullup and used a 1Mohm resistor as external pullup instead but then the sketch doesnt even start.
As referenced to this thread: http://forum.mysensors.org/topic/1287/door-window-sensor-consuming-more-power-when-closed/3**Or is the cause the fact that I am using 10k/4,7k resistors for battery measurment instead of 1m/470K ? **
So this one is working

And this one is not working

-
Measuring currentHello
A somewhat stupid question
I have a arduino 3,3 volt without step up or anything. Driven by 2 1,5V batteries.
All positive lines (DHT22 +battery + battery measuring circuit) is connected on Vin pin and all ground cables on ground pin. So fairly simple circuit. Isnt it just to put in the multimeter somewhere in the circuit? Then i read around 4-5mA but the arduino restarts all the time, dont really know why?How to correctly read current on an arduino circuit?
-
pimatic-mysensors controller plugin@funky81
Hello. I have had a hard time testing this. Is the future for the pulsesensor implemented in 0.8.17 official plugin?If not, how get the latest commit in to pimatic? Have tried to git clone the plugin and then npm install inside the folder, but then none of the sensors shows up in pimatic (the plugin is not active)
With official 0.8.17 the arduino sketch just come in to an endless loop where it wants the latest pulsecount = no answer from pimatic
-
pimatic-mysensors controller pluginHello
haven't had the opportunity to test yet.
will try to find time tomorrow -
pimatic-mysensors controller pluginYes saw it on github, very interesting. Will try as soon as I am home again
-
pimatic-mysensors controller plugin@Dheeraj I wait patiently then :)
Yes the more im digging in to pimatic the more i like it and feel that it fits my needs perfectly