@joaoabs said in My Slim 2AA Battery Node:
Thx! Done!
@joaoabs said in My Slim 2AA Battery Node:
Thx! Done!
@mfalkvidd Don't know if I'm qualified, but I've vague memory (or a wild guess). I think there were some pro-mini models that lost connection to one vcc-pin if you made the cut after the voltage regulator. And btw I never really know why the cutting method was so popular.
@Sven-0
Fun to see this old topic again. And also the coincidence, since my visits here have been rare for a long time.
Anyway, I'm running a few slimnodes since the beginning and have both good and bad experiences. In general, the battery lifetime is your least concern. Instead I have had issues with sensors, sensitivity, switch contact corrosion, mechanical robustness, wifi interference, repaeter, gateway, controller, waf, kids, animals, etc, etc.
Regarding this particular PIR slimnode it's very stable, but it is not universal for every situation due to the limited range and missing sinsitivity adjustment. E.g I can't use it too near my basement windows due to the moving cold air. And in my living room I have sun reflections to deal with.
I suggest you start by building a testnode to check if it works for your conditions.
A recent PIR-slimnode battery life example; My hallway one died last week after 33 months and around 6000 trips/month.
@jan-greis With all respect to the criticism I don't think original part configuration is that bad. I don't build any new of them but I still use a few as frequent reporting nodes. If you already own the parts and you need a frequent awake node -why not?
If I recall the sleep mode should be 90-100uA with this setup. Low power nodes have <10uA.
Troubleshooting method should be the usual. Exchange components, test them one by one, etc. Start with testing the step-up quiscent current, then run test Arduino only in sleep (low power lib not Mysensors-lib), then add DHT, then nRF.
@Mikepara Please elaborate and post your code. Tell us also about power supply, fuse settings (clock speed) and your troubleshooting steps. See debug-faq-and-how-ask-for-help.
@masfak97 Wow. You work hard. Of course we must help you. I'm not familiar with your programming method. So that would be my quick wild first guess. I can't read that you've verified the fuse settings? Have tried different startup times e.g?
Do I understand correctly if you're able to send and recieve commands to the Atmega with your FTDI after it is programmed ?
@masfak97 Have you selected the right board in Arduino IDE? (Installed MiniCore in Board Manager?) Have you tried to use baud 9600 (with corresponding bootloader of course) ?
I doubt that 83uF is too small.
@kotzer Infact I'm actually making a few of my first model too rigth now. I had components left over and despite everyones criticism against the dht22, I find it working very well as long as you deal with the failed readings in the sketch. And, the battery life time was pretty good too. Greets.
@kotzer Thanks for sharing. But (AFAIK) the Arduino DHT22 library has never worked at all at 1MHz. And since dht22 doesn't support <3V there's no need for 1MHz anyway.
I think you should focus on getting these basic Arduino functions working so you're in control of what's going on. Note that I recently added a few updates to the first post of this thread (under The uC - Software). Read the tutorials and use 8MHz internal clock.
When you get everything running, test your door switch again with a simple Arduino sketch.
@masfak97 It's not clear to me whether you've tried to run it a as pure Arduino, without radio module and without MySensors library in your sketch? (I see that you haven't the serial/FTDI pins soldered - do you use ICSP, pogo-pins or whatever to upload and debug?)
I would like to use Domoticz because of its popularity here in the MyS community, but I've given up every time this far. Lately because there seems to be an issue with Eth-Gws for other MyS-systems on the same network(?). And I've also noticed an annoying 2-3s delay from sensor reading to registration. And the UI doesn't feel flexible, lightweight and reliable. Too much like the Vera I used before. Not to mention other controllers "responsive huge white spaces UI style".
So, I'll continue with Fhem. A pain to master as non-German (nor Perl) speaking, but with a good feeling of old proven quality under the hood.
@royson84 Where in Sweden are you? Maybe someone near can help you.
@sineverba Just cut one of the battery wires of the finished assembly. Solder together again when your done measuring.
@Dick Since they are 'static' I think you only need to initialize them with 0 , maybe not even that. I simply dont know. Your problem could be something else too. Sorry.
@Dick I'm no code expert, but I would make the two lastUpdateTime-variables as global ones and initialize them with 0.
I experienced something similiar lately with a few my W5100 modules. It went away when I moved from my breadboard setup to soldered cabels.
@Dick You should use a non-blocking code. Replace your if ( motionsDebouncer.update()) {...}
with an updateMotion(SLEEP_TIME);
which could be something like
void updateMotion(unsigned long blockedMotionTime)
{
static unsigned long lastUpdateTime;
if (millis() - lastUpdateTime >= blockedMotionTime)
{
if ( motionsDebouncer.update()) {
int value = motionsDebouncer.read();
Serial.println( "PIR " + (String)value );
gw.send( msgMOTION.set( value ), true );
lastUpdateTime += blockedMotionTime;
}
}
}
Never use sleep
if you want to listen for incoming messages. wait
is not good either since you expect button press. Buttons could use an interruptpin if needed, but it looks like your not on battery.
@burningstone You probably want to find the root cause to this but, as a quick fix, have you tried software-blocking the false trip with an additional sleep before the interrupt-activating sleep? Something like sleep(3000);
before the last sleep(...)
. I do it with success for my mini-pirs.
@siod said in Slim Node as a Mini 2AA Battery PIR Motion Sensor:
@m26872 said in Slim Node as a Mini 2AA Battery PIR Motion Sensor:
Removing the 7133-regulator did not affect anything significantly due to its very low quiescent current (see datasheet, perhaps useful in some other project?)
ok, does that mean one does not have to remove the voltage regulator and the diode? @AWI is saying one must modify the PIR and now I am irritated...
That was only regarding the power consumption. I don't remember the voltage drops but I guess you'll get to it work with 2AA but for a shorter time. Why wont you remove them?
@robosensor said in Encapsulated transformers instead of traditional switching power supplies like Hi-Link:
Somebody tried to measure no-load current at 230V side of switching PSUs like Hi-Link? And PSU temperature at low loads?
Maybe late to bring up an old thread but I couldn't resist.
I thinks it's a good idea to use the old school transformer-recitifier solution for the safety aspect. I do it in some cases (unless price, space or efficiency requirements). If you want some more reference data, I did a review of one SMPS I use, over here: https://forum.mysensors.org/topic/3428/my-look-at-a-cheap-12v-power-supply
@Komaandy said in My Slim 2AA Battery Node:
How do you manage to reset the tripped "1" in Fhem ?
I don't. I just use the last trip time as it's state and then notify (e.g. light or push message) on trip. I think it should be very simple to make a notify with a timer "at" to reset it after a while, if you wish.
@Komaandy Nice! Thumbs up for 8MHz (and your "dark-style Fhem" - same as I use)
@Komaandy Yes, using 8MHz instead of 1MHz is perhaps a good idea. Stable enough at room temperature, well proven and will e.g. solve a "Serial.print()" interrupt loop issue. Just remember that you'll lose ~25uA if you'll leave BOD enabled.
@siod Thanks for your report. Could you please share some more info. Hw/sw versions, nRF-batches, sensors, configs/settings, sketches etc. @Komaandy could only confirm issues with a PIR eqiupped node, but you have a door-switch so I guess it's a potential generic problem then. Let's hope for other reports as to help us narrow down the search.
I have not yet migrated to MySensors 2.x , but it's hopefully coming soon. My Slim Nodes from the start of this thread (~ 10 pcs) are still in flawless production.
@AWI said in My Slim 2AA Battery Node:
@Komaandy please don't double post. Please continue in the other thread
@Komaandy and @sundberg84 Once again; Please continue in the other thread! Especially since @Komaandy now confirmed that it is this far NOT a generic Slim Node issue. Also, I haven't got any feedback on my reply there, but I assume it didn't work?
@ileneken3 said in Board and hardware failures:
Since this was a plant moisture sensor, I assumed it was because I got some water on it.
I'll bet on (galvanic) corrosion as a root cause. Protect the pcb or use wires between pcb and sensor.
My only precaution is to raise(!) the soldering iron temperature. It allows a fast action with less propagating heat. It sounds foolish, but I actually like it and rarely fail.
@Komaandy said in Slim Node as a Mini 2AA Battery PIR Motion Sensor:
I meant like this (look in code below), but it's just a wild guess.
/** * 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. * ******************************* * * REVISION HISTORY * Version 1.0 - Henrik Ekblad * * DESCRIPTION * Motion Sensor example using HC-SR501 * http://www.mysensors.org/build/motion * */ // Enable debug prints // #define MY_DEBUG // Enable and select radio type attached #define MY_RADIO_NRF24 //#define MY_RADIO_RFM69 #include <MySensors.h> unsigned long SLEEP_TIME = 120000; // Sleep time between reports (in milliseconds) #define DIGITAL_INPUT_SENSOR 3 // The digital input you attached your motion sensor. (Only 2 and 3 generates interrupt!) #define CHILD_ID 1 // Id of the sensor child // Initialize motion message MyMessage msg(CHILD_ID, V_TRIPPED); void setup() { pinMode(DIGITAL_INPUT_SENSOR, INPUT); // sets the motion sensor digital pin as input } void presentation() { // Send the sketch version information to the gateway and Controller sendSketchInfo("Motion Sensor", "1.0"); // Register all sensors to gw (they will be created as child devices) present(CHILD_ID, S_MOTION); } void loop() { // Read digital motion value bool tripped = digitalRead(DIGITAL_INPUT_SENSOR) == HIGH; Serial.println(tripped); send(msg.set(tripped?"1":"0")); // Send tripped value to gw sleep(3000); // Sleep 3s to make sure everything is stable before we start to sleep with interrupts. // Sleep until interrupt comes in on motion sensor. Send update every two minute. sleep(digitalPinToInterrupt(DIGITAL_INPUT_SENSOR), CHANGE, SLEEP_TIME); }```
@Komaandy Have you tried to add a sleep(3000);
before the last sleep(...)
?
@siod said in My Slim 2AA Battery Node:
"Do you have a sniffer or listen-only gateway" -sorry, donΒ΄t know what this is o0 !?
I meant the https://www.mysensors.org/controller/sniffer, but I think it's easier to equip sensors with Radio Traffic LEDs and/or your own heartbeat/error LEDs.
The delay (1000) was initially planned to settle the sensors a bit and gie me abetter Battery reading, but as it is not working as it was intended I will delete it in a future update...
I suggest you start with deleting or replacing this delay. It could be it.
You could also try level interrupt instead of "change" -again, I donΒ΄t know what you are talking about here, hope you can help me out.
I think you had pull-up inputs. Then it's just to replace the CHANGE
with LOW
in your call to sleep()
.
Thanks so far!!
My personal troubleshooting method in cases like these (and too many others) is just exhaustive use of the good old substitution method. Hw, Sw, entire systems or whatever you can do.
@Tim-Abels
1.3uA is nice!
A question about your sketch: Is millis() working because it's an interrupt-only sleep() or have I missed something else? As I recall it millis() stops working when using sleep().
Edit: Haha. @AWI got it before me!
@siod
Gateway issue? Other sensors working or all down at same time? Do you have a sniffer or listen-only gateway, or heartbeat LED attached to each sensor?
What's the purpose of the delay(1000)? It usually safer to use wait() or sleep() and perhaps also to deal with the interrupt results first. You could also try level interrupt instead of "change". You're not using indefinite sleep so it shouldn't be a problem, but try anyway..
Have you desoldered one radio to see if it's back alive again? What's your distance to Gateway? Maybe some filtering or antenna effect by your fingers and breadboard? What if you leave a working radio on the breadboard then just connect it with wires to PCB?
@Reza So. You have also compared v1.x with v2.x ?
@meanmrgreen You should use non-blocking code with millis() and if{}. Look e.g. at
https://forum.mysensors.org/topic/461/motion-sensor
https://forum.mysensors.org/topic/2717/repeater-node-with-sensor/12
@Eawo Sorry for a late reply. Please post your sketch to begin with.
Do you have v2.1 for both gateway and sensors?
"#define MY_BAUD_RATE 9600" should be before the "include MySensors.h" and that should be all regarding baud rate setting. No need to mess with MyConfig.h in v2.x.
A lot of the SlimNode example codes are still in v1.x unfortunately. So please look at more recent post above in this thread instead for v2.x.
To verify the Si7021 you should use a clean Arduino+Si7021 setup with the only hw/sw needed for that, i.e. no radio or MySensors-library. Si7021-example sketches generally comes with the lib.
@wergeld Relative humidity at 100% during night sounds very realistic to me. Are you confusing it with the "absolute humidity"? Or is your concern that the "force transmit" isn't working?
@Eawo Using internal resistors will only give you a few months battery time. One external pull-up for each switch will work and 1M resistors or any arbitrary "high" value is just as good.
@Eawo The example sketch should fit your needs. link Change the pull-ups activation to Low if you use external ones.
I'd expect battery life 5-10 years depending on things such mailbox opening frequency, use of heartbeat signal, battery self discharge and climate.
@sghazagh You have to use sleep with interrupt but you can't use sleep at all with debounce library. Look at this example for how to do it: https://github.com/mysensors/MySensors/blob/development/examples/BinarySwitchSleepSensor/BinarySwitchSleepSensor.ino
(The sleep(5) -debounce delay can be extende a bit in my opinion though.)
My favorite hidden sensor enclosure is @Dwalt's old book solution: https://forum.mysensors.org/topic/949/sensor-for-vallox-digitse-rs485-ventilation-system-with-integration-into-fhem/10.
I can't help, but I'm sure debug prints will be needed.
@dbemowsk Infact that test was ordered by this thread (or another one in the forum, I don't remember exactly). Don't worry about the double post, it's worth mentioning again.
@mikee You would want the MPX5010DP instead to get a 5V analog output for Arduino ADC, but still - to detect increased filter pressure drop I'd say you'll need 10Pa resolution. With MPX5010DP you'll get 10kPa/1024=9.75, i.e. OK. I guess you'd be able to detect something despite the noise, but not an early warning or trending. (You would want a 0..1kPa range sensor or something instead to do that. I don't now which one.)
Give it a try and please report back!
If you search the internet for "arduino MPX2010DP" you'll find a few projects measuring water level.
@ΰΈ£ΰΈΰΉΰΈ£ΰΈ·ΰΈ Thanks a lot! All links are now changed.
@ΰΈ£ΰΈΰΉΰΈ£ΰΈ·ΰΈ Apparently they've moved to a new site. Perhaps you can try this link: http://dev.dirtypcbs.com/store/designer/details/m26872/663/myslim2aabatterynodepcbv2-0panelized
I think you must have a user account and login first. Please report back if it's working or not.
Edit: Wrong link the first time.
It would be interesting if someone with issues also tried older versions of libs for Si7021 and/or MySensors.
@JonnyDev13 Make a new board type by editing "boards.txt". There's an example in the first post.
@Yveaux Isn't the "sleep(3000)" already this blind time? But, sure an increase would be good start.
I haven't looked at 5V, but when buying from Ali I prefer solid metal enclosure psu, for safety and aspects like grounding, shielding and cooling.
https://www.aliexpress.com/item/Transformer-Power-Supply-Adapter-AC110-260V-to-DC12V-24V-10W-100W-Waterproof-ip67-LED-Driver-Outdoor/32693854001.html
@carmelo42 Sorry for a late reply. In short C2 is to reset the avr, C1 and C3 are to decouple the avr. And C4,C5 for the radio as you say. The caps are there as a recommendation, precaution, stability, etc, and all of them are not always necessary when it's supplied by battery.
And yes, the idea of the FTDI-6-pin-header and bootloader is to provide ability to load sketches the normal Auduino way with FTDI and Arduino IDE.
I have a CVD ZnSe (Chemical Vapor Deposited Zinc Selenide) lens I'm planning to experiment with in this kind of use case. It should work in theory. It bought it for my IR camera, but I've understood it's commonly used in laser cutters.
@clempat Make it with external 8MHz then ? Then it should be like a Pro Mini 3.3V.
@filipq Why? Simply promoting a commercial product in an open source community is usually NOT the way to go.
@JonnyDev13 This IS the HC-SR505 (5V Mini PIR). With the voltage regulator and diode removed.
Did you mean that you have the larger HC-SR501 ? In that case I don't know. I only remember that you'll need to remove the v-reg and diode in the same way to make it run on 3.3V. And I think @bjornhallberg reported successful results from longterm use of a batterypowered outdoor one.
@Nicklas-Starkel I've been busy for few months moving to a new house and have had my sensor network offline until now because of this. Node 105 was kept on and handled with care, but I was pretty sure it would be dead when I started my gateway yesterday. BUT, it was ALIVE ?! at 14% battery level. Amazing! 24 months with such poor and simple hardware and software.
Same batteries and only one restart (due to my controller change last year).
One little remark though, it doesn't seem to send temperature och pressure, only humidity and battery level. Maybe an issue of voltage recovery time between transmissions.
@clempat Don't think I can help you. Maybe clock related. What voltages do you use on Nano and Slim respectively? Do you have multiple parts to try with and get the same result? Why do you include and start wire.h, isn't already in Si7021.h ? My guess on "device Id 50" is that it's just a chinese clone reply.
Photos look nice btw.
@clempat Please post your sketch and maybe some hardware photo or diagram too.
@LastSamurai Since I tested it ok down to 1.6V with one AA, I have a feeling that the issue could be voltage stability rather than level. Maybe you could try two CR2032 in parallel ?
@carmelo42
Thanks for your support by ordering. I actually recieved another 50+ share credit transfer from DirtyPCBs today. It'll be donated to MySensors right away.
If you look at post 116 you'll see the I used a 10Mohm pull-up between Vcc and atmega input pin. Reed switch connects between Gnd and input pin.
I don't know about MySensors v2.0.x, I've only used v1.5.x (and v1.4.x for Eth-gateway). Fhem autocreate will work once you've defined a MySensors gateway, activated autocreate and switched on inclusion mode. Creation and readings will be recieved from normal MySensors standard examples (don't know anything about Attiny85 though, only Atmega328p).
Fhem start guide should be enough regarding the Fhem config.
In general, as you can see, the Fhem section of the MySensors forum isn't very energetic. If you speak german you'll find more info and help over at the Fhem-forum.
@Nca78
The docs won't tell you if the process fails. The verbose output will.
I have to agree.
I got this feature implemented a year ago by @Meister_Petz here. Cool but not neccessary and worth the hassle when battery life already is as good as it is.
@jacikaas said:
But I think my HC-SR505 is broken, becose it don't see any movement.
Did you test it with just a simple LED+resistor at the output ? Another option is to just measure the supply current (47uA when idle, 64uA for 10s after trigger).
@Nca78 True. And I suppose you've also double checked the verbose output from that process.
Can't help you further. I would try soft 1MHz instead then, as @scalz suggested.
@jacikaas Ah! Forget about the warning. You error comes from that you haven't put your MySensors-related defines before the "include MySensors.h". Look here link.
@Jason-Brunk said:
Just wondering if there is something in the code I should change to tell it it's running at 1mhz or if that's something that is supposed to just work based on the clock timing
Clock settings are determined by the"fuses". What's your tool for fuses and bootloader programming? Are you sure you programmed the fuses as in your "boards.txt" above?
@jacikaas I'm not very up-to-date on anything in these days , but it looks like a preference is missing from the "boards.txt" in Arduino IDE. Which IDE version do ou use? Can you post the "boards.txt" please?
@Jason-Brunk Also remember to have the cap on battery side if you're starting with some kind of power on.
@Jason-Brunk I would try to put in a delay of the radio startup in the sketch. Maybe there's to much or fast simultaneous power consuption initially with respect to the coincell.
Beautiful design @scalz ! (I've looked before, but closer this time.) Compact, neat, safe and many features. Another AC design reference to get some ideas and inspiration from.
@hugows Yes, C4 is the standard recommended cap on the radio module supply and should be between Vcc and Gnd as near the radio as possible. The chinese clones are known to be very supply noise sensitive. C5 is of low ESR type and there to further increase the filtering. In theory it should be even closer than C4.
A battery supply is stable by nature and you should probably stay fine without some of the caps in other cases as well. The design is intended to provide flexibility and margin in general. It's easy to throw in a few extra parts and then maybe avoid some troubleshooting.
I'll add the C4 and C5 ref-silk to the list of requests for improvements.
"Metal salts" doesn't sound very dangerous unless you're more specific. I prefer some NaCl on my tomatoes.
How about some gold- or silver plated electrodes if you're of the worrying kind?
I make them easy by soldering "breakable female 1x40 pin header" together. Finish with a nice blob of hot glue around the middle. Do you need many?
@TheoL said:
The question is, why is the LD33V stabilizing the circuit. I'd like to know why, so that I can learn from this.
A little late and OT, but I think this makes sense. I'm often in favour of wasting some power as a simple way to gain some PSRR.
@amoarg69 W5100 is also the Arduino standard Ethernet shield and hence works good with the Arduino standard Ethernet lib. Server/client exemples provided through Arduino IDE for the lib.
@amoarg69 AFAIK the Enc28J60 has no stable setup yet. Use the W5100.
We should ping @petewill then.
@csa02221862 How do you deal with voltage drops and I2R power loss if your using these low voltages for a "whole house power supply" ?
Thank you all! I had a great day in geek paradise! Compliments to hek with family for the warm welcoming, deliciuos food and showing of the house, bjacobse for the idea, mfalkvidd for the deep road trip discussions, the core team gurus for letting us witness the final 2.0.0 release preparations and Mrlynx, Briske and bjacobse for project discussions.
You all also know now what my next contribution to openhardware will be.
Isn't that DigitalIO -thing what happens when you forget to disable 'soft SPI' back again after compiling e.g. EthernetGW ?
@Jason-Brunk Since it's your first sensor you better buy some 3.3V pro minis. Later on you'll probably want to learn to deal with bootloader and fuses, then you could have reused your 5V pro minis as 3.3Vs.
@sundberg84 So tell her you have rebooked and the destination will be a surprise.
@dbemowsk Buy a speed controller then MySensorize it.