@ben999 You need flyback diodes across relay coils, this is not optional.

Posts made by skywatch
-
RE: Microwave oven (no kidding :D)
-
RE: Weird voltage output - MQ2 sensor
Some of the MQ senors require a 24hour+ burn in before they stabilise.
Also, check all wires for continuity and check all soldered joints for 'dry' joints, cracks or blobs. A photo of the project might help. REflow any solder joints to ensure good contact.
-
RE: Reliability of Serial vs. Ethernet GW on Vera
@elsereno I would investigate why the router goes down and fix that, unless your GW is the only thing using that router...
-
RE: which unit of measurement to use for V_RAINRATE?
You can't do what you want using that sensor - The sensor is just a simple on/off type sensor that tells you if the sensor plate is wet or not, it does not measure how much rain is falling. Even if you timed how long it was activated how would you know between heavy rain and a light shower?
You need a 'tipping bucket' type sensor to give you an estimate of how much rain there has been, but even then you need to do some work with experimentation to get reasonable accuracy.
-
RE: Help! Is there *any* way to squelch either robocalls or India call center telephone attacks to my phone?
If you have not already seen it, "scammer payback" on you tube is fun to watch.
I used to get a lot of calls from China. Each time I'd block the number and report them. Eventually I have a dual system now where I don't answer calls that are not already in my phone book along with asking people who do accidently get through if they can't get a proper job or if their grandparents know how they make a living.
Last week I got the washing machine scam. She said my cover needed to be renewed. I told her I didn't know the company she claimed to be calling from and didn't have insurance with them.
She insisted I did and read my name and address again as if this was some sort of proof.
I told here to send me the renewall in the post with start and end dates of the existing contract, method of payment on the original contract and the make and model of my washing machine that is alledgedly insured with them.
I don't expect it will ever arrive......
-
RE: Wait() in setup question.
@mfalkvidd Thank you for confirming that is how it works - so my next question is that if receive() is being called and functioning, but loop() is not - what happens to the messages with state change for a node child?
Clearly nothing within the loop() is updated (as it is not running) so messages received will be ignored until such time as loop() is able to process incoming messages? Or the state changes get lost?
To elaborate on my use, the issues is 'synching' LED lights with the controller after an unexpected power cut.
I have the nodes remember in eeprom their last state, but can't send that when the power comes back on as it takes a while for the controller and pi to boot and be running. If the nodes send it straight away the controller won't be available.
So a wait() in setup seems a way to do this, but with receive() running and loop() not then I am wondering what problems might occur if someone changes the lights state during this wait() period......
The nodes have IR senders for light control and IR receivers so that even if the manufacturers remote for the lights is used, then this is sensed by the node and the controller gets updated. This means that any method of changing the lights can be used and the controller always knows the status.
I suppose I could put the delay in loop() and only have it for the first run of loop() or I could add a before().... I have to give this some more thought!
-
Wait() in setup question.
So I can't figure this out -
If I use a wait() in setup(), will this delay running loop() and all other functions (like Receive() ) until after the wait() has timed out?
Will receive() still function even if a wait() is running in setup()?
Having a bad brain day it seems!
-
RE: smart sleep inconsistent?
@CrankyCoder How far apart are the node and gateway? What is between them? Can you post any photos of of each with the wiring?
-
RE: smart sleep inconsistent?
@CrankyCoder Do the data drop outs have any correlation to the solenoid valve operating and does the valave use the same power supply as the node MCU?
-
RE: smart sleep inconsistent?
@CrankyCoder I have similar issue with a couple of nodes. Sometimes it looses signal for hours at a time...
It might be external interference from other devices like wifi, bluetooth or microwave oven.
It can also be connection issues especially with the push-on dupont connectors as when the temperature/humidity/air pressure change then the connectors can move slightly. Also they might be badly crimped in the first place.
So check all connections are good and can't move (soldering is best here), and then look for sources that might be an issue.
It could also be another node closer to the GW is sending at the exact same time as the problem node and masking the signal.
Batteries are susceptable to variations due to temperature too, they are a chemical reaction. So try a better source of power for testing too.
Looking at the code, send_status_message only ever sends 1 - is this what you want? It seems to never send anything else (like 0)....
Also you are using sleep but have a receive function - what happens to messages when the node is asleep?
You are sending battery level every second? That is too often. How long will the batteries last? This wastes battery power a lot. I check betteries once a day on my security sensors, they don't change for weeks at a time....
Have you modified the pro mini as per the battery page on this site? Have you added capacitors to the radio module?
directionControl seems like it will always turn off both digital pins regardless of the message as //disable are the last statements to be actioned?
You can try changing
#define MY_RADIO_RF24
to.....
#define MY_RADIO_RF24
#define MY_RF24_PA_LEVEL RF24_PA_HIGHoptions for power are MIN, LOW, HIGH, MAX. - it might help.
-
RE: Question with regards to NRF24 antenna folding
@naruse GO through every bit inside and make sure that all grounds are connected to each other. A faulty grounding can have effects like this too....
-
RE: Question with regards to NRF24 antenna folding
@naruse There is a thin co-ax cable in the antenna that folds, maybe it is damaged and contact is only made in the folded position and not when straightened out. Try another antenna if possible.
Also, antennas are polarised. So rotating it might help as would small changes in position as reflections and absorbtion at 2.4GHz will be something that might affect the signal, just like with wifi (same frequency block).
As for touching it - you are either acting as a passive conductor for the rf since you might be in a place with better signal strength either that or the additional capacitance of your body is improving the resonance of the antenna. Difficult to tell which, but my guess would be the former.....
-
RE: Best 3d printers
@vomaxa If you look at my post at the top of this thread (second posting) then all that still really applies. You need to list your requirements and then research until you find a compromise you believe to be the right one for your needs.
I also added a creality ender 5 plus a couple of years ago. This has a bigger build volume and is very upgradeable with new control boards from creality and third party vendors as well as having many common components to other printers in the range.
Whatever you decide it is a leraning curve and more frustrating than the promotional videos would have you believe. Still it is rewarding to make things that previously you couldn't at home.....
-
RE: nrf24+ module with stick antenna
@ben999 said in nrf24+ module with stick antenna:
@skywatch oh great
thanks for that !
by removing the smd then the signal becomes "compatible" with a 2.4ghz stick antenna ?
It completely removes the strip antenna on the pcb as well as the matching stub. The component is likely a zero ohm resistor. So you will be taking the RF from the point before the antenna and it should work.
or shall i go with wire and adjust length ?
That is up to you! You could always try both and see what works best for you. It's only a few minutes work. Don't forget to post your findings for others to learn from...
-
RE: nrf24+ module with stick antenna
@ben999 You may not gain much by doing this and things could even get worse.
But if you want to try then I suggest removing the component to the left of the blue arrow and then attaching some micro co-ax centre conductor to the left hand pad where the component has been removed (as we see it in the photo) and the screen going to the closest ground point.
-
RE: Most reliable "best" radio
@Larson A bit late as the dry weather has me doing outdoors work and I'm knackered!
But yes, I agree with your thoughts and method as a good solid starting point. I would clamp the modules in place so they cannot move at all and do first test, then solder wire to one module in situ and do test 2, then finally solder wire to second module and do test 3.
This way you get to cover all possibilities in the shortest steps and time with minimal messing.
-
RE: Most reliable "best" radio
@NeverDie I know what you mean, but "half a wavelength apart would have them in very close proximity with risk of interference. Better if the were 300mm+half a wavelenght apart. But can mysensors cope with 2 gateways on the same frequency? I didn't think that would be possible... Or were you thinking one gateway node with 2x RF modules? Now that would be interesting!
-
RE: Most reliable "best" radio
@Larson Will be interested in your results!!
-
RE: Most reliable "best" radio
@NeverDie said in Most reliable "best" radio:
Regarding the antenna extensions, you raise some good points. The people who posted them seem like they thought it genuinely helped, but maybe I was gullible and was wrong to post the links. If so, I'm sorry.
We are all here to share and learn and help each other out - I was only adding my thoughts on the matter for all to consider.
On the other hand, it might take only 5 minutes to try them out and see whether or not they work. A simple trial experiment would maybe settle it one way or the other pretty quickly.
Yes it would, but positioning needs to be carefully maintained to avoid false results.
@skywatch said in Most reliable "best" radio:
Thanks. What was it you were wanting me to notice about the e32 library? If it was about the FHSS, that was an e34 module in the youtube video.Oh darn it! - I got it mixed up - I am sorry for posting the wrong lib!
-
RE: Most reliable "best" radio
@NeverDie That 'antenna modification' just looks crazy to me, but I have not tried it. However the designers will have spent some time on getting the pcb stripline antenna to be matched to the transmitters impedance. Adding a random bit of wire on the end will screw this up royally.. You never see this on TV antennas or anywhere else for that matter (maybe some nutter with a car aerial made from a coat hanger).
Also I would expect that the design is to be as wide band as possible but centered on the mid frequency in the range available. So the further you move away from 'centre' frequency (Ch63) then the worse the antenna is likely to perform. But at the power levels used here the effects might be marginal. I have always found moving the RF board a cm or two can make a big difference in link quality.
Here is the link to the E32 arduino library..... https://www.arduino.cc/reference/en/libraries/ebyte-lora-e32-library/
-
RE: Most reliable "best" radio
@NeverDie It has an on-board frequency synthesiser so maybe during tx the temp rises on the substrate and this affects tx frequency stability? So it could be the FS rather than the PLL. Again just guessing here....
-
RE: Most reliable "best" radio
@NeverDie I suspect that in 'open loop' (i.e. no feedback as I understand that to mean) then frequency stability over a longer period might be questionable. So to be safe they recommend a limit across which frequency drift won't be noticable. But as always, I could be completely wrong!
-
RE: Most reliable "best" radio
@NeverDie I have not tried them for this particular application, but have used them for SMPSU and the larger clamp on styles for SDR and other RF devices.
They used to be quite cheap so trying a size that fits snuggly over the wires you are using should help.
I see that guy in the video you posted twisting the ground wire with the data wires. This could simply be adding capacitance to the circuit or acting as a common mode rejection against transient interference. I wonder why he didn't try different value pull-up resistors on the data lines to see if that would help.
-
RE: Most reliable "best" radio
@NeverDie You probably already considered this but using a co-ax cable for the power would offer some sheilding and also after watching the video you linked maybe some of those tiny ferrite beads on the data and power at the radio might be of help.
I had to chuckle when the guy in the video showed how he connected an external antenna without first removing the link to the PCB one!
If I can I will try one of the cdebyte modules on 3.6V and see if they are still good... Remind me in a week if I don't get it done!
-
RE: Most reliable "best" radio
@Larson Thanks- they are a LOT more expensive here, but cheaper versions are available - sorry for diverting the thread a little.
-
RE: Most reliable "best" radio
@NeverDie Maybe just ripple on the DC? Did you scope it to see? Maybe try with 10n , 100n and 470uF caps across the DC power line? - Or if there is an onboard regulator on the RF module, then maybe that gets more noisey as the voltage drop across it increases?
-
RE: Most reliable "best" radio
@Larson Do you have any links to this please? I found next doors 2 new cats killing 2 young birds they had paicked out of the tree and onto my lawn. The owners are un-cooperative on the issue and the cats have been using my garden as their own litter tray..... Garlic, chilli powder and vinegar have had no effect so I need to up the game!
-
RE: Newbie: Sensors do not connect
@mariusl You don't need a separate nrf library - it is all built into the mysensors library. Remove the other libraries from your code, clear eeprom and re-flash using just mysensors.
-
RE: Most reliable "best" radio
@NeverDie said in Most reliable "best" radio:
Is there a battery chemistry other than Energizer lithium primary cells that you think might be the best overall choice?
I don't know enough about battery chemistry to make an informed contribution.
I have some lithium cells with 2040 date on, but not using them yet (probably in the next few weeks)....
Also, in the US, the FCC allows for the legal use of higher transmit power if using spread spectrum or frequency hopping (though there do still exist restrictions relating to dwell time and duty cycle). I'm no lawyer, but I get the impression LoRa counts as spread spectrum as far as the FCC is concerned. Without either spread spectrum or frequency hopping, the allowed transmit power is pretty low--more or less reliable only if the receiver is both nearby and line-of-sight with the transmitter. In my book that's not very practical. An example of that would be a plain vanilla Nordic nRF24L01, or the first generation z-wave, both of which had a max transmit power of just 0dBm.
The NRF24L01+ has frequency hopping capability - I tried it by modifying the tmrh library before I came to mysensors. I only made a slow hop rate (4 hops/sec) but it seemed to work nicely. It would be cool if my sensors supported this, but there is probably a good reason why it doesn't.
-
RE: Most reliable "best" radio
@NeverDie Interesting work and thanks for sharing it - I am sure it will interest many people trying to get the best out of their batteries.
The one thing I suggest is to also take measurements across the expected working temperature range. I don't pretend to know how much affect, but battery life is extended by storing them cool whilst in use a warmer temperature will allow more energy to be 'mined' from the battery (due to the chemical reaction).....
-
RE: MyS blocking i2c PCF8574
@JeeLet I am seeing the same issue for log in, so it is not just you, it is the site.
-
RE: Ebyte nRF24L01P Wireless rf Transceiver E01-2G4M27D 27dBm SPI 2.4GHz Transmitter
@epierre Capacitor advice is on mysensors pages.
@sindrome73 Has shown you very good advice and for the higher powered modules like this one I would replace the 4.7uF with a 47uF if you can. It will help stabilise voltage levels during transmit cycles.
Good quality stable power supply with good solid connections (properly soldered would be best) and capacitor - then try again.
What 5V1A power supplies are you using? Where do you get the 3.3V from?
Photo or drawing with more info on the parts you are using might save you a lot of time while we are all guessing at the moment.....
-
RE: Ebyte nRF24L01P Wireless rf Transceiver E01-2G4M27D 27dBm SPI 2.4GHz Transmitter
@epierre Did you read the user manual? - https://www.passion-radio.fr/index.php?controller=attachment&id_attachment=559
Have you added a capacitor as recommended?
What are you using to power the whole thing? My bet is that it is the power supply that is causing issues here. Can you post a photo or sketch of how it is all connected up?
-
RE: about Arduino + NRF24L01 need help please.
@llasking Have a look on the arduino forum or github - I still use the older tmrh library for point-to-point on things made before I changed over to mysensors. There is also a nrf24-lite library as well, but I have never used it.
-
RE: Connecting the Dallas DS18B20 temperature sensor.
@Feliw05 You have left and right transposed. Looks like the left should go to Vcc and the right should go to ground....or are you looking at it from a different angle?
-
RE: Sensor reboot with Ebyte NRF
@tutur19 Either use a battery with a higher mAH rating or put 2 or 3 batteries in parallel to give more power.
-
RE: How can I choose a controller?
Choosing a controller can be a headache, especially if you are new to all this.
@mfalkvidd gave some sound advice which I would like to add to.....
Do you want a paid or free controller?
How easy is it to install and update?
Do you need graphs or guages?
How do you want it to look (all controllers have some restrictions on how data is displayed).
What hardware do you want the controller to run on?
Do you want your data private or do you trust cloud services to hold your data?
How is data going to be sent to/from the controller?
How easy is it to add sensors, timers, rules, srcipts etc?Hope you get a good decision soon!
-
RE: No more batteries....
What started this was my research into Dark Matter and Dark Energy discussions with Astronomers and Scientists. I wondered why a simple atom made of one electron around a nucleus of one proton and one neutron could remain stable when the electric charges would mandate an attractive force between the positive nucleus and negative electron. The electron can 'somehow' sustain its distance and therefore gets energy to overcome the attractive force. It can do this for millions of years with no 'conventional' input of external energy.
Right now the world could do with cleaner energy. Here in the UK 18,000 people die every year from avoidable pollution related illness.
I just hope the breakthrough comes in the west because if Russia or China leapfrog us on this tech then we are at a severe disadvantage.
I guess that 'solar power' would have been laughed at 2 generations ago (along with nuclear power, smart phones, space stations etc...)
-
RE: SHT30 on arduino
@yoshi824 Most of us have been where you are now!
I suggest that you try to see the patterns in the code that you have working and try to make the SHT30 work from what you learn.
If it does not work as you want then post here the full code you have and what it is/isn't doing and you should get some help.
-
No more batteries....
It is >10 years since this was published - still not heard of anything available to the public like this despite many patents on similar devices - Anyone here know more about the current state of this technology?
-
RE: Increasing range of 8MHz ATMEGA328P with NRF24L01
@Ethan-Chua In Arduino IDE, go to "Tools" -> "minicore" and select the board you are using from the drop down menu. Then underneath 'Tools' menu you will see all options for the bootloader. You should select these values to match your requirements.
-
RE: Merging 2 or 3 sketches to one (relays & binary buttons)
@Roschkovsky said in Merging 2 or 3 sketches to one (relays & binary buttons):
if (!initialValueSent)
This is always false as there is nothing I can see to set it true.
Also, there is a LOT going on in the receive section - try to move the prints and logic to the main loop and just pass values from receive, it might save a lot of headaches...
-
RE: fun project: entertaining doorbell
@NeverDie Here are some you might consider - but if you possibly can try them first or make sure you can send them back if they do not perform as you expect.
https://www.ebay.com/itm/324974489634?epid=94228626&hash=item4ba9fd3022:g:RjIAAOSwFpFh0zNV
https://www.ebay.com/itm/234211692000?hash=item36881acde0:g:KEcAAOSwB7Zhlan1
https://www.ebay.com/itm/333089455334?epid=10023280376&hash=item4d8dadbce6:g:mS4AAOSwkhxccXWc
-
RE: fun project: entertaining doorbell
@NeverDie I looked into those modules for a door announcement module, but on Arduino forum there were a lot of people having all sorts of issues with them.
-
RE: fun project: entertaining doorbell
@NeverDie You could use a mp3 player board (there are some with built in amplifiers) so that is one option. See the usual sellers online for info on them.
The other would be a pi zero and a small dac/amp combo. If it is outdoors don't forget that the speaker needs to 'tropicalised' to resist moisture or it won't last long with fog or humidity around. -
RE: Mesh network
@chey Yes it would be a good start - have as few repeaters as you can and don't sleep them or run them on batteries unless it's the only way you can do it. Also worth making small movements of the NRF module to see if it will improve range as a move of 10-50mm can make quite a difference to the quality of the signal.
-
RE: Mesh network
@chey As far as I understand this is alrady possible to make all nodes 'repeater; nodes. But the downside is that this will generate more RF 'network' traffice ans could be counter productive.
Better to try out the 'tree' network first and make repeaters where they are the only other option.
-
Quinetic 'micro energy' generators - anyone know what they are?
Seems like a nice thing to have for simple things like this - not good for my sensors as that needs a lot longer to set up and transmit, but interesting all the same - I wonder if it is one or more magnet/coil arrangements that generate the power? Still, nice to have light switches that don't need any mains or battery power.
-
Merry Christmas and a Happy New Year !!!
Just to wish those who celebrate it a Happy Christmas and of course a Happy New Year to you all!
Lets hope 2022 is better than 2021
-
RE: AM312 with no delay
@halipte The microwave 'radar' modules seem to trigger pretty fast - With PIR it depends a lot on ambient temperature of the area the pir is 'looking' at and the temperature of the moving object.
-
RE: My rPi gateway suddenly stopped working, no idea what else to try...
@frapell neg board should have been reg board (as in the regulator to go from 5 to 3.3V - When I did this a lot of issues I had went away. Take the 5V supply from the power supply input to the raspberry pi board. This means any current surge will be provided by the power supply and not from the pi itselff. I hope that makes sense.
-
RE: My rPi gateway suddenly stopped working, no idea what else to try...
@frapell If you can, get some small coax cable for wifi use and use that instead of the track on the PCB- Make sure it is grounded at the sending end - As for the power, I strongly suggest making a 5v to 3.3V regulator as the pi 3.3v can be quite 'noisey' - a buck regulater will help reduve this a lot. Don't forget capacitors on the input and output of the neg board. I did this for my pi set up too as it has the advantage of the radio getting power from the psu and not cia the pi. A linear regulator like the AMS1117 will do the trick.
-
RE: My rPi gateway suddenly stopped working, no idea what else to try...
@frapell I have the same network/phone cable tester as in the phto!- Hahaha.....
Back to the probem it does sound as if something is changing over time, that is why I suspect power supply, cables or connections. I guess you checked for dry joints on the pcb, vut it would be worth checking ecery pin has a firm connection with a multimeter and a spare dupont pin. Temperature difference can make a bigger difference then most people think.
Is the radion module connected to 5V on pi or 3.3V? this is another possible area to look at but I need to know this first...
finally, with good dupont cables, remove your pcb from the pi and connect it again using dupont wires 150mm or more away from the pi and try that. I am wondering if the RF path to the antenna being close to the gpio and cpu might perhaps be possible culprit. Is there any screening on the back of the pcb ?
-
RE: My rPi gateway suddenly stopped working, no idea what else to try...
I would look at 2 things here -
One, test all dupont connecters at both ends for a secure connection - I spent a loooong time chasing my tail due to dupont cables that were loose. Crimp them up with pliers if you have to.
Two, what power supply are you using? 'how are you powering the gateway and pi? What voltages do you get and are there any fluctuations when the GW radio is transmitting?
-
RE: Sporadic issues finding parent gateway
@Ethan-Chua Some photos of the wiring and set up would be of help here along with a link tothe radio modules you are using. Maybe try moving them further apart, counter-intuitive I know but it might be receiving module being swamped with the power of the TX one. You could also try a different channel (use nrf doctor to find where there are 'quiet' areas) and see if that helps.
Do you have a lot of bluetooth/wifi in the building? anything else in the 2.4GHz band like cameras, keyboard,mouse etc?
-
RE: HELP WITH MYSENSOR PROJECT
I remember that here (UK) they recommend that to balance a radiator you need to aim for 12C difference between flow and return pipes on the radiator. A couple od DS18B20s should do the trick. I have monitored flow and return to the gas boiler for many years now in this way.
-
RE: Relay node does not follow UI switch state.
@kacper_zet Try moving this code from receive to void loop and add a check to see if the status has changed from it's last state. Maybe then it will work for you.
digitalWrite(message.getSensor()-1+RELAY_PIN, message.getBool()?RELAY_ON:RELAY_OFF); // Store state in eeprom //saveState(message.getSensor(), message.getBool()); // Write some debug info Serial.print("Incoming change for sensor:"); Serial.print(message.getSensor()); Serial.print(", New status: "); Serial.println(message.getBool());
If not then it might be HA relsted and I can't help with that.
-
RE: HELP WITH MYSENSOR PROJECT
@topgun78 2 things to consider...
-
printing in PLA may not be a good idea for this as heating pipes can get to <70C and will softern the material and make it more brittle.
-
Use a stepper motor so that you can control it in microsteps to get 0-100% as sometimes it needs to be on at a lower level all the time. If just using open/closed you will get cycles of hot and colder room, not ideal.
-
-
RE: 2021 EU customs regulatory changes — where should I buy now?
@benhub When the UK left EU they immediately made aliexpress and others charge 20% VAT on top of the prices. AT about that time free shipping stopped being the norm and prices from China have been climbing in recent years.
It all adds up to more expensive hobby and me ordering fewer parts than I used to.
Ebay or similar sites might be an option as small sellers are not required to collect tax unless registered to do so.
Considering the chances of fake or 'failed test' components being sold makes it even more of a risk than when things were much cheaper.
I'd hate to caoculate how much I have had from China over the years that went quickly to recycling or landfill.
I guess in the end you could buy less from reuptable EU companies, at least you should get genuine items that way.
-
RE: Is this the end of nrf24l01?
@benhub Sad news - I must get some more nrf24l01+'s - Also has anyone seen a PA/LNA version of NRF5? IF it is bluetooth device then I suspect not as it would be out of spec for that usage.
-
RE: Radio stops working
@jlb said in Radio stops working:
How to make the node detect this radio problem ?
I don't think there is a function to do this, but maybe someone else can help with that.
How do I get my sketch to do a cold restart of the radio ?
It would be good to see how you wired this all up - a hand drawn sketch or fritzing would do. I suspect that by modifying the way power is applied may need arjusting and come capacitors may need adding - You can reboot by using a hardware watchdog circuit (web search for it).
-
RE: 💬 Relay
@TheoL Sound like a good time to update to the latest version. it is the best yet and very stable.
-
RE: MySensorsTracker - a simple logger for MySensors MQTT messages
@canyouhearmenow That looks practical and useful - well done!
-
RE: Why is the output of ACS712 current measurement module unchanged?
I think you need to post a clear drawing or photos of the setup and the code you are using.
I donlt know what you mean by "connecting the current in series" nor what "AC regulator" you are using or what "thermal serial currenr" is.
-
RE: Cannot find parent when USB plugged in, Works when NOT plugged in!
@Njwyborn I guess you checked that all the grounds are conneted. A photo of the setup you have might help. What are you using as a 'USB supply"?
-
RE: Cannot find parent when USB plugged in, Works when NOT plugged in!
@Njwyborn I think it is either that the USB cannot supply enough current and the voltage is dropping when the radio starts to transmit, or it is a noisy USB power port that needs more filtering (chokes, capacitors) to smooth it out.
If you are able to get a good quality 5v stable power supply from a reputable electronics supplier it may well solve the issue for you
Also wortha try is setting minimum transmit power and moving the node and gateway further apart. It may be that the gateway is saturating...
-
RE: Solar/battery powering
@zboblamont said in Solar/battery powering:
@rejoe2 Anti-freeze.
But then the hot water would not be suitable to shower/cleaning/pool etc and you then have to go to a heat exchange tank, somewhere to put it and insulate it and pipe to it. I am sure is can be done, but the fact that it is not 'standard' hints at it being costlly or impractical or both.
@rejoe2 Agreed! - But it's not OT as you could mysensors the hell out of such an installation!
-
RE: Solar/battery powering
@rejoe2 Thanks - i did not know about those. I still think that in Northern areas where frost and snow are common it is more of a risk, but it doesn't matter much as I do not consider going down that path!
-
RE: Solar/battery powering
I wonder why on commercial products we don't see any kind of heatsinks mounted beneath the cells to help wick away the heat?
Heat rises so they would probably not make a lot of difference except in the huge increase in weight on the roof timbers.
But yes - I always wondered why they didn't water cool the panels and use that hot water for the house hot water system or swimming pool. I suppose that would increase production and installation costs and complexity significantly as well as add more points of failure.
-
RE: Novice user with serial gateway issues!
@mrmuszynski This might help....
https://www.mysensors.org/about/network
Sensors connect to nodes, nodes connect to the radio to send/receive sensor data via the gateway to the controller. Sometimes data flows the other way to control things like leds, relays, motors etc,
A node can have up to 254 children I believe, but that would be a bit much I think. As to how you have a lot of children, well, you could attach 7 switches to digital pins 2-8 and then have them as child ids 0-7 like this....
#define CHILD_ID_DOOR1 0 //D2 physical pin
#define CHILD_ID_DOOR2 1 //D3
#define CHILD_ID_DOOR3 2 //D4and so on.........
Just make sure each child_id has a unique name and number or rhe presentation won't go too well......
-
RE: Novice user with serial gateway issues!
@mrmuszynski I believe that it comes down to the fact that when mysensors include is 'run' it needs to already know the parameters it is running with. It can't start and then add things afterwards or it wouldn't know where to start.....For example, if it doesn't know what radio you are using it can't initialise it! ..... It's a bit like making a blueprint before building a house
Also of note is that you can use the same child_id on both nodes if you wish. It will not be a problem.
-
RE: Novice user with serial gateway issues!
@mrmuszynski OK - I see 2 possible issues here.....
-
Your '#define' statements for your nodes and children need to be before the line #include<MySensors.h>.... This is most likely the issue here....if not...
-
remove the #debug from the gateway as this may be writing to the serial port and causing an issue, but I am sure it is the first thing above..
So node 1 shoule start like this.....
// Enable debug prints #define MY_DEBUG // Enable and select radio type attached #define MY_RADIO_RF24 #define MY_NODE_ID 1 #define MY_PARENT_NODE_ID 0 #define MY_PARENT_NODE_IS_STATIC #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 #include <MySensors.h> uint32_t SLEEP_TIME = 1000; // Sleep time between reports (in milliseconds) // Initialize motion message MyMessage msg(CHILD_ID, V_TRIPPED);
Change node 2 similarly and try again....
-
-
RE: Solar/battery powering
@NeverDie The other thing to remember when putting anything over a solar cell or panel is that they do not rely solely on vivible light to function. Many will give power from IR waves on cloudy days and some will increase power with UV light. So best to get the data for the panel (or try different materials under controlled artificial conditions).
Another consideration is that sealing against glass will increas panel temperature as the heat is trapped. This will increase internal resistance of the cell and reduce power output. My panels are all 10W or less and work best on cold winter days with bright sky and sunshine.... I have not yet tried flexible panels to see if they are more robust against temperature variations, but would like to try one at some point. -
RE: Increase VAR limit
@NielBierman Why are you using VARs when there are already moisture and temperature categories available to you?
Just give each temp and moisture sensor a unique CHILD_ID (simply by adding 1-8 in the name) and you are done! -
RE: Novice user with serial gateway issues!
@mrmuszynski CHILD_IDs are assigned by you in your sketch for the node. They are not assigned by the gateway or controller. As for the node ID I would strongly recommend setting that manually in your sketch as well. This will make it a static ID across reboots/reconnects and saves time working out where any future issues are in the system.
#define MY_NODE_ID 193 ......This is what you need to assign static node id just change number for each node.... Numbers 1-253 are allowed I think..
You can also add.....
#define MY_PARENT_NODE_ID 0
#define MY_PARENT_NODE_IS_STATICThis will ensure static routing if you want.
If you still have probelms then post the sketch for each node to get help....
-
RE: Solar/battery powering
@NeverDie I have seen all those things you mention as well as temperature related dry joints on panels. You get what you pay for generally and panels suited to winter temps below -10C and summer temps above +30C with rain, wind vibrations and UV degredation are expensive..... I always avoid the epoxy ones and have found better alternatives for 'window' use. I power a roller blind from one and it's been urnning without a hitch for 7 weeks now, but I know in the winter even a 10W oanel will not be enough.... I guess that for low power sensors it is an attrative option, but as you said, make sure it is 'tropicalised'!
-
RE: Corrupted serial debug output
@Max-Kurilov If using 3.3V hen max serial speed is 38400 - Try setting that in your serial monitor, it should do the trick (unless you set serial speed differently in your sketch, but we don't know as you didn't post your sketch).
-
RE: Detecting a sudden change
@รอเร-อ It all depends on what sensor you are using.
I am using 2 different sensors and I can tell you that there is a wide variation throught the day. If I shower in the en-suite shower the bedroom sensor shows this. If I use a wok to stir fry then all the 'dust' sensors pick up the tine droplets of hot oil that circulate in the air.
Background levels here are under 60uG/m3 on the first floor, about 90ug/M3 on ground floor and 0-9 ppm of ppm25 and 0-6ppm of ppm10.
For your use a better suited sensor would be worth finding as optical sensors will react to moisture as well as dust. Perhaps in the end you will need a combination of sensors? I hope this helps you think of a solution.
As for detecting a sudden change then you just need to remember the last reading and compare it to the new reading. If the difference is more than your chosen value then you have an alert state!
-
RE: Will serial gateway work with 3.3 V Arduino Pro Mini?
@Thomas433 I have used uno and now pro mini (5v) for gateway. I tried 3.3V bu ran into problems with that set up which forced me to go down the route to 5V modules.
For UNO you should only need to put the gateway serial sketch on it and plug it into the pi usb port and then tell your controller to connect to that usb port. I am running with 2 x pro mini gateways, one for security detection devices and the other for everything else.
-
RE: Best 3d printers
@Alex-Miller If you have a 'maker' space near you it might be better to get him some lessons before buying a printer - That way he will know if he is going to be able to use it for what he wants and get all his questions answered by people who know about 3D printing..... Just a thought.....
-
RE: pH mètre connected to domoticz
@Diazovitch69 Converting to mysensors is not difficult for this one reading you want to use - but whether or not domoticz will be happy I don't know as I don't use it.
Best to go to the 'build' page (see top of this page) and look at the door/window sensor. This is fairly basic and should give you a clue to start experimenting with.
First add my sensors to the code, then a message construct, then presentation function and then send message in code. Sounds worse that it is. Try it and post your code if it doesn't work.....
-
RE: HTU21D Humidity/Temperature Sensor
@maddhin Any version 2 sketch with HTU21D should work as slim node is atmgea328 based. I use adafruit lib for mine and it works well. To conserve battery energy follow all the steps on the battery power page in here and send data as infrequently as you can for your needs.
here is the code I use to test with - you can safely remove all the "force n updates" to reduce memory use ( I always do). It also only send if the temp or hum has changed since last reading to further reduce battery consumption....
/** * 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: Andrew Sutcliffe * * DESCRIPTION * This sketch provides an example of how to implement a humidity/temperature * sensor using a HTU21DF Sensor. * * For more information, please visit: * http://www.mysensors.org/build/humidity * * Connect Vin to 3-5VDC * Connect GND to ground * Connect SCL to I2C clock pin (A5 on UNO) * Connect SDA to I2C data pin (A4 on UNO) * */ // Enable debug prints #define MY_DEBUG // Enable and select radio type attached #define MY_RADIO_NRF24 //#define MY_RADIO_RFM69 //#define MY_RS485 #include <MySensors.h> #include <Wire.h> #include "Adafruit_HTU21DF.h" Adafruit_HTU21DF htu = Adafruit_HTU21DF(); // Set this offset if the sensor has a permanent small offset to the real temperatures #define SENSOR_TEMP_OFFSET 0 // Sleep time between sensor updates (in milliseconds) static const uint64_t UPDATE_INTERVAL = 15*60000; // 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 float lastTemp; float lastHum; uint8_t nNoUpdatesTemp; uint8_t nNoUpdatesHum; bool metric = true; MyMessage msgHum(CHILD_ID_HUM, V_HUM); MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP); void presentation() { // Send the sketch version information to the gateway sendSketchInfo("HTU21DF-TemperatureAndHumidity", "1.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); } void setup() { Serial.begin(9600); Serial.println("HTU21D-F test"); if (!htu.begin()) { Serial.println("Couldn't find sensor!"); while (1); } } void loop(){ // Get temperature from HTU21DF library float temperature = (htu.readTemperature()); if (temperature != lastTemp || nNoUpdatesTemp == FORCE_UPDATE_N_READS) { // Only send temperature if it changed since the last measurement or if we didn't send an update for n times lastTemp = temperature; // Reset no updates counter nNoUpdatesTemp = 0; temperature += SENSOR_TEMP_OFFSET; send(msgTemp.set(temperature, 1)); #ifdef MY_DEBUG Serial.print("T: "); Serial.println(temperature); #endif } else { // Increase no update counter if the temperature stayed the same nNoUpdatesTemp++; } // Get humidity from HTU21DF library float humidity = (htu.readHumidity()); if (humidity != lastHum || nNoUpdatesHum == FORCE_UPDATE_N_READS) { // Only send humidity if it changed since the last measurement or if we didn't send an update for n times lastHum = humidity; // Reset no updates counter nNoUpdatesHum = 0; send(msgHum.set(humidity, 1)); #ifdef MY_DEBUG Serial.print("H: "); Serial.println(humidity); #endif } else { // Increase no update counter if the humidity stayed the same nNoUpdatesHum++; } // Sleep for a while to save energy sleep(UPDATE_INTERVAL); }
Hope it helps you get up and running.
-
RE: while (!sensor.begin()) error
@maddhin FWIW I always use the adafruit library for htu21D and it has a similar test in setup that does not give me any errors - might be worth a try?
-
RE: Battery-powered irrigation controller
@chamroeun-ou If you need to reverse polarity then a H bridge would be good - I would aim for 12V (maybe a lead acid battery with solar panel and small charge controler). This assumes a coil pules reversal to change over the relay, if it is dual coil relay then it will be different, but we don't have that info. Also note the coil resistance and therefore current needed. A 6681FNG H bridge would be good as it is rated up to 15V and handles 1A with ease...
-
RE: transmission and reception problems with stm32f103c8 and nrf24 library
@Croma-Nnon You know this forum is for MySensors right?
-
RE: Feather m0 (SAMD) sleep and interrupt
@Alpoy Well done! - That is interesting! - I never used a SAMD, but at least you have a way to make it work! Maybe I should try one someday....
-
RE: Feather m0 (SAMD) sleep and interrupt
@Alpoy void presentation() is empty - That could have an effect as the node is probably going round and round in circles trying to find the gateway. We will only know if you would post your debg output to see what is really going on here.
-
RE: Poor RSSI on RFM69 with RaspberryPi SPI
@alexelite said in RSSI value variations on RPi 3 Gateway with RFM69:
I was trying to use a Python library and found a note about RFM69 H version that it should not be powered from the 3.3V pin. This should only matter for transmitting not for receiving,
Finding a warning in the library and then ignoring it is asking for trouble - that note is there for a reason! - What makes you think it only has an effect on Tx and not Rx? It ay well be due to noise on the 3.3V power pin.
Have you any capacitors on the 3.3V near or on the rfm? It might have a positive effect.I changed the board and powered it from 5V with a dedicated 3.3V regulator and RSSI increased a bit.
This would also point to noise on the pi 3.3V having a detrimental effect.
This pin can only support low power mode. Use different supply if you want to use the RFM69HCW in high power mode.
Another important hint!
-
RE: Multi-sensor home module (With batteries)
@jamozu Wow! - You have put a lot of thought into not only your project but in documentation as well. Thanks for kindly sharing your project, I am sure many people will find this useful!
-
RE: Best password manager?
FWIW I tend to agree - I have been using KeePass on win 10 laptop for years and for android I use Bitwarden. They both work as expected and are simple to install and set up . KeePass has an add-on for Firefox as well which makes things even easier.
-
RE: New simply node sensor project - please some advise
@DenisJ Depending on how often you intend to send data, it looks OK to me.
The capacitor you linked to is good too (if you put them in parallel the capacitance will add - like putting resistors in series adds). So you can always add another across the first if you find you need more - you just have to try it out.
-
RE: New simply node sensor project - please some advise
@DenisJ I can give 2 piexes of advice....
- Measure the current drawn by the radio module in transmit. Small batteries may not last long if it is too high (say more than 20-30mA).2,
- Do not use tantalum caps. They can have high ESR and have an ability to fail as a short circuit. Try ceramic SMD caps instead.
In this use case only - think of the cap as a little rechargeable battery that can provide current quickly for a short period of time when needed (during transmission) and then recharge over a short period of time after that.
-
RE: Advisory: put IOT devices on a separate LAN/vLAN for better security
@NeverDie Quite a lot of this thread is very interesting even though it all goes way over my head. Do you think one of these would do?
:}
-
RE: [SOLVED]Atmega 328P reset to start
@barrydou Well done, good job!
When in doubt, read the manual! - Easy in hindsight, isn't it?
-
RE: Which magnetic door/window switch for battery powered projects?
@maddhin You attach the 'large resistor' on the ATmega board from ground to input pin used for interrupt. Then connect the same input pin to 3V via the reed relay switch contacts that are OPEN when the door/window/letterbox is in the untripped (closed) position. If you use the sketch on here you need to reverse the tripped/untripped (open/closed) as the basic sketch is negative triggered and this way it is positive triggered -
I doubt that you will have issues with the cable at such short distance, but if you do just drop down to the next lowest value resistor and try again until you have the desired result. I assume you know about removal of components (or track cutting) and bootloading to get max battery life?
I am sure you will work it out but if not post again and I will always try and help you!
-
RE: Which magnetic door/window switch for battery powered projects?
@maddhin I am running with 2xAAA and so far so good - been 8 weeks and still at or above 3V.
As for the relays, you could put them in any small plastic tube (ballpoint pen or similar) or even in a white plastic drinking straw, cut to length and seal the ends with silicone. Maybe add some plastic or wood (toothpicks glued together) for strength....Just a suggestion to keep costs down.....If you have access to a 3D printer then you can custom make something......