RFM69HW temp-humidity node


  • Hero Member

    Thanks, I just ordered Hakko 0.2mm (curved) and 0.5mm (straight conical) tips from amazon. Both got good reviews. Hopefully one of them is a good match for the task, but if not, it's good to know that 0.8mm will do the business.


  • Hero Member

    I received the board from post #1 in the mail today. I'm planning to mount the atmega328p DIP chip using machine pin female headers. It certainly can do that, but I'm thinking that on the next iteratioin it might be preferable to have the entire machine pin--not just the thinner leader part--go through the PCB, because then the plastic part of the header can be flush with the PCB (as would be the case if more typical female headers were used). Anyone tried doing that? Any reason not to do that?


  • Hero Member

    So, to clarify, what I mean by a female machine pin header (also known as a Swiss machine pin header) is this:

    alt text

    Unfortunately, the only dimensioning I've been able to find is this:
    alt text
    which lacks the dimension I want to know, which is diameter of the larger pin body that's just above the 0.51mm diameter part of the leader pin that's meant to be pushed through the through-hole.

    Purely eyeballing it, it looks like it's maybe, what, twice as wide? Anyone happen to know what that dimension is?


  • Hero Member

    I've one of these at home. I could take a measurement, but maybe someone has a better idea. ☺


  • Hero Member

    1.35 Millimeters!


  • Hero Member

    @TimO
    Thanks! That exactly matches what my micrometer says also, so I'll go with that.

    So now the question is: what diameter hole should I have drilled for that? Is there a rule of thumb? e.g. Would 1.45 be too snug? Too loose?


  • Hero Member

    To keep things rolling I just sent in to be fabricated a test board with 1.45mm holes . It cost just 30 cents. If anyone has an idea for a better diameter to try, let me know and I'll send in one of those as well.

    0_1475705885671_1p45mmHoles.png


  • Hero Member

    I assembled the FTDI adapter board yesterday. I should have spaced the pads further apart on the switch (well, at least for the switch I'm using) and also on the through-hole resistors. Anyhow, I only need one, so I don't think I'll be updating it.


  • Hero Member

    I assembled the first node from post #1 today, but it didn't work. Upon investigation, I found that one of the required traces was not there! I had generated the trace layout using diptraces auto-router, and it didn't indicate a failure. Most likely I over-constrained the problem by making the PCB board size smaller than I should have. However, if I had known that the auto-routing had failed, I could have relaxed that enough for it to succeed.


  • Hero Member

    So, I was able to make the board work by soldering on a single "oops" wire to compensate for the missing trace. I guess I'll be redoing this board so that's not required on future builds. The FTDI adapter board also had an oops that I fixed without much difficulty. Using the adapter board I've verified I can upload new sketches to the node from post #1. The reset button also works as intended. So, the adapter board feasibility is now proven.


  • Hero Member

    I took a shot at soldering the smaller board with the much tinier atmega328p, but for now I've concluded that hand soldering such a small chip is simply more work than it's worth. Perhaps with a reflow oven....

    I'm still waiting for the interstitial board to arrive.


  • Hero Member

    Soldering an atmega328 smt is easy:
    https://www.youtube.com/watch?v=UeCZ9AMG3Vo
    according to that guy, anyway. Maybe the longer pads makes it so?


  • Hero Member

    This has a lot of detail about soldering the atmega328 surface mount:
    https://www.youtube.com/watch?v=-yc3zEe0RA0
    So, though it's obviously doable, I still wouldn't say it's "easy."


  • Hero Member

    I finally had success using the Dave Jones tack and reflow method. The hardest part is just ensuring that the chip is properly aligned after the tack. From that point on, iit goes relatively easy.


  • Hero Member

    So, LED is blinking like it should, and I can download sketches to it. I plugged in an si7021 board, and that's working too:

    Humidity: 44.42 Temperature: 22.22
    Humidity: 44.40 Temperature: 22.22
    Humidity: 44.43 Temperature: 22.23
    Humidity: 44.42 Temperature: 22.22
    Humidity: 44.43 Temperature: 22.21
    Humidity: 44.43 Temperature: 22.22
    Humidity: 44.44 Temperature: 22.22

    Looks as though a BME280 board, which has the same pinout as the si7021 board, should work also.
    alt text
    I tried the adafruit library on such a BME280, but it says it can't find the sensor. So, I tried the sparkfun library instead, and it is outputing false information:

    Temperature: 0.00 degrees C
    Temperature: 32.00 degrees F
    Pressure: 0.00 Pa
    Altitude: 45846.20m
    Altitude: 150414.04ft
    %RH: 0.00 %

    Looking at the back of the BME280 board , it looks like it may have a voltage regulator and/or level converter on it (?)..
    alt text
    Since I'm feeding it 3.3v, not 5v, then perhaps that's the problem.

    The part is 662K, and sure enough, it's a voltage regulator:
    alt text

    If I remove that and short Vin to the 3v3 lead, maybe it will work....

    So, to see if it works at all, I hooked up the BME280 board to an arduino uno at 5v, and... still no joy. Apparently, I received a defective BME280. 😞 Murphy's Law strikes again. Therefore, I'll exchange it for another one. Meanwhile, I'll use the si7021.


  • Hardware Contributor

    Hello, I had a problem with BME280 too. Both Adafruit and Sparkfun use 0x77 as default address, but I have the same breakout board than you and the i2c address is 0x76.
    Voltage regulator is not a problem it's a XC6206 and it's drawing close to nothing when you feed it with low voltage, and for battery voltage (3v down to 2V) the drop out voltage should be around 0.1V.

    You can pass the address of the sensor in the begin method, it defaults to the one defined in the h file which is 0x77

    #define BME280_ADDRESS                (0x77)
    
     bool  begin(uint8_t addr = BME280_ADDRESS);
    

    (I use the sparkfun library at the moment as it's easier to set the running mode of the sensor to switch it to sleep mode after measurement. Else it's using too much power for battery operation)


  • Hardware Contributor

    @NeverDie
    Nice. Could you please open your design? -> www.openhardware.io


  • Hero Member

    @Nca78
    Thank you! I changed the I2C address to 0x76, and now I get the correct readings (in this case, using Sparkfun library):

    Temperature: 22.77 degrees C
    Temperature: 73.00 degrees F
    Pressure: 99002.00 Pa
    Altitude: 202.13m
    Altitude: 663.15ft
    %RH: 47.00 %

    Fantastic! It works after all. Thank you again.


  • Hero Member

    I designed the miniature board in the earlier post for the temp-RH sensor to hover over the atmega328p.
    alt text
    Maybe it doesn't matter all that much, but after assembling one that way, I'm realizing it would be better to have it hover over the radio instead because the radio antenna means that the radio side is more likely to be facing up and the atmega328p is flat enough that it can be sat upon on the bottom with the radio on top without complaint. As it stands, the temp-RH sensor could still be installed on the radio side of the PCB, but it would be facing outward (resulting in a larger footprint) rather than inward, hovering over the radio. Since the point of this node is to be small, the status quo somewhat defeats the purpose. So, I'll likely be revising the PCB layout to make that change. Also, I'll be eliminating those RFM69 pads that don't actually need to be soldered, as that will reduce that soldering/assembly time.


  • Hero Member

    Here's the node from post #1 fully assembled, and with a BME280 instead of an si7021:
    0_1476121957739_temp-RH node.jpg

    I'm starting to toy with the idea of having the radio also be a detachable module. The BME280 is the most expensive part on the board, and it's detachable. The atmega328p is detachable. If the radio were also detachable, it might speed up the assembly and test process. Also, if the radio were to go bad for some reason, one could just pop in a new one. Modularizing like that might make the whole thing easier to repair and troubleshoot, because you could always swap in "known good" modules to see if it fixes a particular problem. Anyhow, just an idea I'm kicking around. What do you all think? Make it more modular, or keep as is?


  • Hardware Contributor

    @NeverDie

    And making also the radio a detachable board would save you some board-space, thus reducing the cost again.


  • Hero Member

    @GertSanders
    Good point. I'd probably want to move the temp-rh sensor to the other side of the board as well so that it would be on the same side as the detachable radio.. In that case, it wouldn't need to sit so high, because it wouldn't need the clearance to get above the atmega328p. So, it would save on thickness that way. Overall thickness might be a wash, and it would be shorter too, so that sounds like a potential win. I think it's worth exploring.

    Not sure if there are 2mm pitch machine pins (?), but that might help save on thickness, and if so so that might be the best way to mount the RFM69.

    I think I'll switch to an SMD LED after all and use the through-hole real estate occupied by the existing through-hole LED for dedicated wires soldered on to connect to batteries. Or perhaps I should consider some other kind of battery connector? It could be powered as is through dupont connectors on the ftdi header, but to me dupont connectors seem a bit loosey-goosey for a permanent battery connection--not sure how corrosion might affect a dupont connection over time.


  • Hero Member

    Here's the assembled small Temp-RH node:
    0_1476139061767_small temp-RH.jpg
    I suddenly realized that if I flipped the si7021 "upside down", then I could install it on the other size of the board from what I had originally intended, all while still using the existing pinout. -I'd prefer to have the actual sensor element facing up, but it works.

    So, as you can see, the entire thing is barely much bigger than the RFM69HW itself. On the opposite side is the SMD atmega328p-au , an SMD LED, an SMD resistor, and an SMD capacitor. That's it. I can reset the board and upload sketches to it using my FTDI adapter board, as I wrote about earlier in this thread.


  • Hero Member

    Here's another board, but this time I simply soldered everything directly to the PCB:
    0_1476151112835_soldered_directly.jpg
    As you would expect, it's a bit thinner than the version where modules plug-in, but not by so much that I think it would make any meaningful difference in most instances.

    FYI, this particular si7021 comes with a protective cover on it. You can get them either with or without the protective cover, but I think it makes more sense to get it with the cover because it helps mitigate against possible contaminants.


  • Hero Member

    I just now tested out the RFM69HW radios, and they all appear to be functioning just fine. I even put one inside a closed refrigerator, since that is one of the applications, and I received a strong signal.

    So, as far as I'm concerned, proof of concept is now completed for these two different board designs. It will be a good baseline to compare against as I make optimizations going forward.


  • Hero Member

    This photo illustrates one of the original objectives, which was to have a node that's appropriately sized to be powered by two AA cells:
    0_1476161676927_sized_right.jpg
    I think either one meets that goal.


  • Hardware Contributor

    Nice work !
    For the "big" board, as you're constrained by the size of the 2 AA, I would use a pro mini instead of the bare atmega (more flat), and put the sensor on the side of the radio. It would also leave a bit of space for extra sensor (light for example) and maybe atsha for signing ?

    For the small one I would make another board of similar size with a coin cell holder and a big (100-220µF) ceramic capacitor, and use pins to bring power to the "IC" board and do the spacing at the same time.
    As it's a shame to have such a small board and such a huge power supply 😉


  • Hardware Contributor

    @NeverDie

    It seems the collection of small MySensor nodes is growing 🙂
    Nice work !


  • Hero Member

    @Nca78 said:

    Nice work !
    For the "big" board, as you're constrained by the size of the 2 AA, I would use a pro mini instead of the bare atmega (more flat), and put the sensor on the side of the radio. It would also leave a bit of space for extra sensor (light for example) and maybe atsha for signing ?

    For the small one I would make another board of similar size with a coin cell holder and a big (100-220µF) ceramic capacitor, and use pins to bring power to the "IC" board and do the spacing at the same time.
    As it's a shame to have such a small board and such a huge power supply 😉

    Actually, they're really just proof-of-concept boards to confirm that the radio would work OK on such boards. Both nodes may have a fatal design flaw, which is that the sensor breakout boards may be running 24/7 even if the atmega328p is sleeping. Anyone know if the boards (not just the sensor chip) can be slept at <1uA current? If that's not possible, then I'll need to run them from a pin (or possibly some kind of load switch chip if their max current draw is ever greater than 20ma). I guess I'll need to measure it unless someone already has. Have you?


  • Hardware Contributor

    @NeverDie I have measured a board based on pro mini with BME280 (put in sleep mode, that's why I use the Sparkfun library) and a BH1750 (also in sleep mode between measurements) and my meter was giving me 17-18µA which is beginning to be too much for a CR battery. But still after running 3 weeks on a chinese CR2032 I see no drop in voltage. BME280 is not so good IMHO for very low power as it's a bit long to make the measurements, and drawing up to a few hundreds of µA while doing so.
    I'm also running a board based on pro mini with a SHT21 breakout board (same than yours, with the film as without it will get dirty and lose accuracy quickly). Pro mini + radio alone consume a few µA only (sleep mode of MySensors library) and extra consumption from SHT21 (connected to Vcc) is invisible. I tried to measure with my multimeter the consumption of the SHT21 breakout board alone and it just can't measure anything. Even during measurement my multimeter sees nothing as it's extremely quick.
    I did a sketch without sleeps between consecutive sendings (very bad for coin cell), sending every minute (and even if temp/hum don't change it's sending battery voltage), flashing a led after each sending. And with power from 2 cheap chinese LR41 (capacity 25mAh) it's on the way to last 2 months...


  • Hero Member

    @Nca78
    I just now measured the si7021 and BME280 breakout boards using the Dave Jones Microcurrent device. I did nothing more than power them from a battery pack (2x AA Alkaline batteries) using Vin and GND, but the si7021 measured 8.4uA, and the BME280uA measured 8.1uA. Not bad at all, assuming that represents quiescent current.

    I suspect the easiest thing will be to power them from a pin on the atmega328p. That way they can be switched off when not in use. When time permits I'll do that and measure the current with a scope trace just to make sure any inrush current doesn't exceed 20ma (which is the max current an atmega328p pin is rated for).

    When both the atmega328p and RFM69HW are sleeping just by themselves, the current draw can be as low as 250na (yes, nanoamps) with the right configuration.


  • Hardware Contributor

    @NeverDie it's quite common to power them with a pin and never heard about a damage, I don't think you can have inrush current over 20mA. Max starting current for si7021 is 4mA for a maximum duration of 5ms, if we believe the datasheet.
    No info about that in the BME280 datasheet but I see very low power consumption in sleep mode (below 1µA) so maybe removing the regulator is not a bad idea...
    A problem I have with BME280 also is that sometimes the first measurement (after for example a reset of the node) is off, I'm not sure why, if you have an idea I'm interested 🙂 But if you have the same problem powering with a pin could be annoying.

    For the consumption of the board I cannot tell exactly how low I can go as I don't have a microcurrent device to test but my meter says 2µA or a bit below. With a temperature/humidity measurement you have to use the watchdog timer to wake up regularly so whatever you configure you won't get below 5µA I believe ?


  • Hero Member

    @Nca78 said:

    @NeverDie
    A problem I have with BME280 also is that sometimes the first measurement (after for example a reset of the node) is off, I'm not sure why, if you have an idea I'm interested 🙂

    Here's my guess: it uses a sample and hold ADC when taking the measurement, and the capacitors aren't fully charged up when it takes the first sample. i.e. it might be similar to the problem in the atmega328p when it comes to measuring its own voltage source.

    For the consumption of the board I cannot tell exactly how low I can go as I don't have a microcurrent device to test but my meter says 2µA or a bit below. With a temperature/humidity measurement you have to use the watchdog timer to wake up regularly so whatever you configure you won't get below 5µA I believe ?

    There's a trick for doing it using the RFM69HW to act as a wakeup timer, and it costs no extra current to do so. That's a whole topic into itself. Beyond that, you need both BOD and watchdog disabled on the atmega328p in order to get it down to the nanocurrent level while sleeping. In addition, you'll also want to use the internal resonator, not an external resonator or crystal in order to minimize time (and current) wasted during the wakeup phase. Doing that you can reduce the wakeup time for the atmega to <4uSec, which in itself is a huge savings.

    So, getting back to throwing out the first sensor reading: the first thing you do after waking up the atmega328p is to initiate the first sensor reading. Then put the atmega back to sleep but wakeup when the first sensor reading is ready. Then simply ignore that sensor reading and initiate the second sensor reading (or however many it takes to get an accurate reading), and sleep the atemega while it's being taken. That's the magic of a <4uSec wakeup time. You can't do anything about the sensor requiring more than one reading in order to get an accurate measurement, but you don't need to waste power on the atmega or the radio while you wait.


  • Hero Member

    I just now tried powering the si7021 off of pin 8, but for some reason it isn't working. Same with the BME280. Not sure why. I even tried doing it with a 5v arduino uno, but same result. If I go back to powering it from Vin (either 3v3 or 5v), then everything works again. I also tried powering from pin 4 with the same result. Just powering the breakout board itself doesn't appear to be a problem, but when I hookup SDA and/or SCL, the mcu appears to lock up. Very puzzling. I'm doing this on a breadboard with dupont wires. Maybe there's noise on the wires that hangs it up? Anyhow, at the moment I'm not sure what to make of it.

    Looking at the si7021 datasheet, I notice it does contain a heater, and that the heater current can be as high as 94ma. So, if that's enabled by the adafruit library, then that might explain the failure. I'm not sure it's that though.


  • Hero Member

    I'm not sure why powering it from a pin is fundamentally different than powering it from the battery, unless the current max is exceeded, which it doesn't appear to be. Tis a mystery.


  • Hero Member

    So, I removed the voltage regulator on the si7021 and shorted Vin to Vout on the pads where it used to be. The above anomaly persists.

    I then re-ran the current consumption test that I did at earlier, again using the Dave Jones Microcurrent . This time it's showing just 57nA consumed with power to the si7021 breakout board and with no SDA or SCL datalines connected. So, virtually all of the previous current that was measured was being consumed by the voltage regulator, which isn't needed when everything is powered from just two AA batteries.


  • Hero Member

    According to the si7021 datasheet, a typical standby current is 60nA, which is very close to what I measured on the si7021 breakout board in the post directly above.

    60nA is not significant. Therefore, there is no need to switch the si7021 on and off using either a digital pin or a load switch. It can simply be on all the time, as it is in the current pcb board layout.


  • Hero Member

    I changed the orientation of the sensor plug-in so that the sensor element will be facing up on the small board design. I also cleaned up some smaller details and sent the revised design to the fab last night.


  • Hero Member

    @NeverDie said:

    So now the question is: what diameter hole should I have drilled for that? Is there a rule of thumb? e.g. Would 1.45 be too snug? Too loose?

    Answering my own question, standard pin clearance on a thru-hole is apparently anywhere from 0.15mm to 0.8mm: http://electronics.stackexchange.com/questions/110959/how-much-clearance-should-you-include-in-through-hole-component-holes

    So, I think I'll go for somewhere in the middle, say 0.25mm added to the pin diameter for the thru-hole diameter that's to be drilled.

    A typical header pin is 0.65mm. So, the thru-hole diameter should be 0.65+0.25 = 0.9mm

    From a routing perspective, smaller diameter pads are preferable, because they leave more room for routing traces. Pad diameter is going to be hole diameter plus some fixed incremental amount.


  • Hero Member

    @NeverDie said:

    I changed the orientation of the sensor plug-in so that the sensor element will be facing up on the small board design. I also cleaned up some smaller details and sent the revised design to the fab last night.

    As it turns out, there may be a good reason to have the sensor element face down after all: dust is less likely to settle on the cover/sensor-opening if it's facing down rather than up, simply due to gravity.


  • Hero Member

    I assembled a node based on the interstitial design, but net net I don't see it as advantageous as compared to the other two, so I'll probably drop that approach. I've come up with a fourth design though and I've sent that to the fab, so presently three different designs are in queue for PCB fabrication.


  • Hero Member

    Here's a photo of a TH node based on a Pro Mini with an interstitial board:
    0_1476660795087_proMini.jpg


  • Hero Member

    @NeverDie said:

    I'm starting to toy with the idea of having the radio also be a detachable module. The BME280 is the most expensive part on the board, and it's detachable. The atmega328p is detachable. If the radio were also detachable, it might speed up the assembly and test process. Also, if the radio were to go bad for some reason, one could just pop in a new one. Modularizing like that might make the whole thing easier to repair and troubleshoot, because you could always swap in "known good" modules to see if it fixes a particular problem. Anyhow, just an idea I'm kicking around. What do you all think? Make it more modular, or keep as is?

    I'm more and more liking the idea of detachable parts, especially as I continue to evolve the designs. That way if I move to a new PCB design, I can job pop the parts off the old PCB and pop them onto the new one without having to desolder things.


  • Hero Member

    @NeverDie said:

    To keep things rolling I just sent in to be fabricated a test board with 1.45mm holes . It cost just 30 cents. If anyone has an idea for a better diameter to try, let me know and I'll send in one of those as well.

    0_1475705885671_1p45mmHoles.png

    Today I received the test board from the fab and tried it out:
    0_1476838716705_clearance.jpg

    As you can see from the photo (sorry that it's out of focus), it works in the sense that the female machine pin header now sits flush against the board. It's a snug fit though. For a female header that's longer and with more pins in it, I think the holes are going to need greater clearance or it will likely be too tight a fit. Just a wild guess, but I think 1.6mm diameter holes are what I should try next, and with a 14 pin female machine pin header.


  • Hero Member

    @NeverDie said:

    Here's a photo of a TH node based on a Pro Mini with an interstitial board:

    Where can I order this board?
    Do you have a location where one could see all the boards you have developed?


  • Hero Member

    @korttoma
    I'm continuing to evolve them, based in part on the new realization that it's best to start with a particular enclosure in mind and then optimize the board for that particular enclosure.


  • Hero Member

    I'd say that so far this is the easiest one to assemble while still being moderately compact:
    0_1478010549689_easy.jpg
    It's also a bit more modular in the sense that the radio and the TH sensor can be plugged in or easily removed. Also nice is that all the atmega328p pins are exposed for easy access.

    This one is smaller and more specialized:
    0_1478010573725_compact.jpg

    I'm improving both of them though to use machine pins on the TH sensor to reduce the overall height. I've already sent the machine pin smaller version to the fab.


  • Hero Member

    @korttoma said:

    @NeverDie said:

    Here's a photo of a TH node based on a Pro Mini with an interstitial board:

    Where can I order this board?
    Do you have a location where one could see all the boards you have developed?

    On the other hand, if you really do want it, I could post it. I'm willing to accommodate Hero members much more than those who are all take and no give.


  • Hero Member

    I'm removing the voltage regulator from the BME280, because even though it appears to work fine with it installed even when fed a voltage of 3.3v, at some point it's going to be in the way if being run from even lower voltages. After removing the voltage regulator, I bridge across it using a bit of solid core copper wire and some solder, thusly:
    0_1479239802279_BME280_noVreg.jpg
    I'm not applying any flux, because I don't want to contaminant the BME280 sensor, either from the flux or from a flux remover afterward.


  • Hero Member

    With the BME280 voltage regulator removed, I powered it stand-alone using a 3.3V bench power supply. Using Dave Jones's uCurrent in conjunction with a Fluke 87V multimeter, I measure the standby current at a mere 155 nanoamps. I had planned to power it from pins on the atmega328p and then powering it down between measurements, but at 155na I'm not sure it even matters, provided it's being powered from a battery. 😄 On the other hand, if the entire mote is being powered from a capacitor that's charged from solar energy that's harvested from only weak ambient indoor light.... I guess in that scenario it might depend on the relative leakage rate of the capacitor that's used for the mote's energy storage as to whether or not it's worth fussing about.


Log in to reply
 

Suggested Topics

  • 8
  • 1
  • 1
  • 7
  • 90
  • 3

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts