My Ideal sensor node PCB


  • Hero Member

    I am not yet ready to design a PCB, tho maybe sometime I'll have a free weekend to tackle the learning curve.

    But I thought I'd put out my concepts, just in case they suit somebody else who might design it first.

    5cm x 5cm or slightly less to fit in the cheap Chinese $1/ea board limits.

    Support 5V or 3.3V Arduino Pro Micro; support the two common layouts for A4-A7. Make use of the space underneath the APM.

    Space for 3.3V regulator and caps, or can be solder bridged when using 3.3v APM. Easy to connect to APM's VCC or to VRAW.

    Socket for nRF24L01+,with antenna hanging over the edge.

    Designed to easily cut traces and connect onboard sensors or radio to alternate pins.

    Voltage divider (2 R + c) for measuring VRAW.

    Space for DHT-11 Temp + Humidity (on edge of breadboard space described below)

    Breadboard space (grid of holes) for adding sensors, chips, components, with access to power & ground. It seems to me that there should be room for this flexibility in a 50x50mm (or 50x46mm) board. This is the key piece which most designs do not have.

    EDIT: I am thnking that it may be worth the space to have an onboard external SPI flash chip, for OTA programming or for local logging. For example, a SOIC-8 footprint for this chip: http://www.digikey.com/product-search/en?mpart=W25Q80BVSNIG&vendor=256 with 1 MByte of flash for 43 cents.

    MAYBE make it fit profile of a cheap waterproof box (eg: http://www.ebay.com/itm//221476893142) including notched corners and perhaps mounting holes.

    I'm not looking for standard sensor connectors - could use 0.1" pins in the breadboard area + dupont, or solder on pigtails for alternate connectors (battery, GROVE, servo, JST).

    I'm not looking (at this time) for boost circuitry - the upcoming MySensors board will handle that niche well.

    I picture using this for battery and wall powered and 12VDC (auto) powered devices. For MySensors and for Xmas light control. For clocks and whatever.

    Anything like this out there? Any interest?



  • Yes, I'm thinking of a similar project. I might have time to hammer out a PCB design tomorrow, we'll see. I will include a booster on the PCB though, the XC9140A331 that I measured and posted on the "Efficiency of Voltage Boosters" thread. I would also like to use either the DHT-22 module (it gets dry here in the desert) or the Dallas, also include a PIR sensor, run off 2xAA Eneloops. I like the waterproof box you found.



  • I've just sent my PCB off for manufacturing. My design spec was pretty close to your requirements. It looks like this:
    multisensor-image.png

    It's 5x3cm. I've panelised it so that I fit 3 across on a 5x10 board. Total cost for 30 boards from itead is $20. It's 5x3 because that's the size of a double AA battery holder. So I'll have two options: either hot-glue it onto the top of the battery holder, or mount it beside a battery holder (making a total footprint of 5x6) which will half the height to fit into most plastic cases.

    It supports the 3.3v and 5v pro minis, with access to A5 and A6. It uses the space underneath the APM for the 4 resistors on the board (voltage divider plus others).

    It has a socket for the nRF24L01+. It doesn't hang over the edge, it actually hangs over the APM. My spaghetti board prototype showed no problems with this configuration. It makes it much more compact.

    It has space for a DHT-11 and a BMP180 for pressure. It has space for the 3.3v step-up converter. It has a DS1820 onboard and also a photoresistor light cell. It then breaks out several pins for motion, soil moisture and distance sensors. The "generic" breakout exposes Vcc, Gnd, D7, D8 and A2.

    All in all, it provides support for all my standard configurations, which are:

    • All sensors have light, temp and motion on board
    • Configuration A: Humidity (DHT-11)
    • Configuration B: Humidity (DHT-11) and baro pressure (bmp180)
    • Configuration 😄 Door reed switch
    • Configuration 😧 Distance
    • Configuration E: Soil moisture

    Based on the conversations recently about the inefficiency of the step-up converter, I'm yet to decide whether I'll make my own step-up converter board that fits in the same slot on my PCB, or whether I'll create v2 that scraps the step-up and uses the XC9140A331 or something else onboard.



  • Interesting pcb!


  • Contest Winner

    @Bandra Looks good. At some point I am going for a PCB myself, which is not to be interpreted as if I think the other presented designs here are bad, just because it's fun 🙂
    Regarding the light sensor, what type is recommended? I have got myself a LM393 board to play around with, but I am not sure how "smart" it is. I would like a sensor that can filter the daylight, and only go for "bulbs". Not sure the LM393-chipped board can do that without being placed very close to the light (and I have many lamps in the livingroom).
    Anyway, I think I am taking a lightly more generic approach and only expose the IO using pins or holes or a connector of some sorts. Perhaps coupled with a few tiny breakouts where SMT sensors can be placed. But perhaps your board design does the same thing.


  • Mod

    @Anticimex said:

    I would like a sensor that can filter the daylight, and only go for "bulbs"

    That will be hard, especially if you are using regular bulbs. The spectrum they emit is comparable to normal daylight and therefore you won't be able to distinguish daylight from artificial light...
    I experimented with a digital sensor which directly reports intensity in lux. Works fine, but the current drawn by it was a bit too high to my liking (which will probably also be the case with your lm- based board). Batteries would wear out quickly for a wireless sensor node....


  • Contest Winner

    @Yveaux Yes, well, battery powering for the sensors is a must for me ultimately. All my lights nowdays are low-energy, so mainly LED. Should be possible to filter from "white" light. I got a few 1-wire senors previously that were supposed to support this, but I can not get them to work reliably. Well, at least the board I got has a pot, so I can tune it depending on location, so it is a start anyway.
    Smart lights would be the ultimate option, but there is quite a way to go for that in the household still.

    But the concept of generic sensor boards appeals a lot to me. I am following the various topics on the matter with interest, and will probably merge the various focal points (sensor support, battery support, RF support, power measurements) into a board that suits my need the best. And it will of course be Open Hardware, and I will also try to panelize it for cheaper manufacture in "volume".



  • I tried the recommended light sensor from the store. It's very nice, in that it reports quite an accurate lux level. However there's 2 drawbacks with it:

    • It's very expensive when I want one on every board.
    • It draws a lot of battery power.

    So I settled on using just a bog standard photoresistor instead that you can buy very cheaply off ebay. To detect light, you use it in a standard voltage divider configuration (since the cell itself is a resistor). I've got a fixed 1k resistor (under the pro mini) for the other resistor. I went with 1k to give enough headroom in both the light and dark side. It's not as accurate (ie, I couldn't even get close to telling you the actual lux level) but it does a good job of reporting a figure. I've already created a map in my sketches of what constitutes low, medium and high light levels. Good enough for me.


  • Hero Member

    @Bandra
    Have you tried calibrating the LDR voltage divider against the lux sensor? (It's non-linear of course, but maybe you could generate a spreadsheet of correspondences)

    I used a higher resistance LDR and a 10K resistor, to reduce current drain. ADC values range from around 30 to 1000 (sunlight to darkness), so it makes use of the pretty much the full range. I don't currently have a lux-reading sensor to compare with tho, and I was curious if others have tried (loosely) calibrating the LDR + resistor voltage divider approach.

    There are datasheets for the LDR and you can calculate the voltage divider's effect, but it might be just as good to take an empiracal approach with real measurements and a curve or segmented table to approximate with. I don't see a need for high accuracy (eg: 100 vs 120 lux isn't going to be critical).


  • Hero Member

    @therik said:

    I would also like to use either the DHT-22 module (it gets dry here in the desert) or the Dallas, also include a PIR sensor, run off 2xAA Eneloops. I like the waterproof box you found.

    DHT-xx

    I would like the option of using either, as the DHT-22 is better but bigger and more expensive. The DHT-11 is cheap enough to almost always be used unless a DHT-22 is called for. (Substitute AM230x as appropriate here).

    The sheets I have show the DHT-11 with 0.1" pin spacing and a 12x5.5mm footprint.
    What I see for AM2303 (DHT-22ish) is 2mm spacing and 15.1x7.7mm footprint.

    I see two cases: solder the sensor directly on the PCB when the pcb has good air circulation, or use wires to an external unit if the box is sealed or closed off (not enough air flow). No PCB footprint is needed for the latter (off PCB mounting). I estimate that I am somewhat more likely to use a DHT-22 off PCB and a DHT-11 on PCB.

    In the solder-to-PCB case, the DHT-11 could be soldered to the 0.1" hole grid of the prototyping area I mentioned, but the DHT-22 would need custom holes for 2mm spacing as well as a larger footprint. Since I'm more likely to use a DHT-22 where accuracy matters more to me (and because it's larger) I'm more likely to mount it off PCB anyway so I don't need a special place for it on the PCB. I might loosely "reserve" a place in the prototyping area for the DHT-11, with a (cuttable) trace from a digital pin to the DHT-11's data pin. But if I don't need an onboard DHT-11 (because I have an off-board DHT-xx or just don't care to measure humidity) I could use those holes for other functions.

    PIR
    So far my thought has been to mount a PIR externally (eg: on the outside of a box, not on the PCB), so all I need on the PCB is holes for wiring power/ground/data. I haven't been coming up with a use case for mounting the PIR on the PCB directly.


    When I say "wiring up an external sensor" I have two things in mind. One is to solder header pins on the PCB and use Dupont connector jumpers to go to a sensor or actuator (quick and flexible), the other is to solder wires directly (more compact and reliable in the long run). With a 0.1" prototyping grid, I can do either.


  • Hero Member

    @Bandra said:

    I've just sent my PCB off for manufacturing. My design spec was pretty close to your requirements.

    I like your design.

    One newbie question I have (never having done my own boards yet) is about how hard it is to cut apart the PCBs when you panelize them to subunits smaller than the PCB manufacturer separates for you. Do you use shears of some sort, or a band saw, or a dremal saw or what? Seems like you'd need to be very precise to not damage adjacent traces.

    It supports the 3.3v and 5v pro minis, with access to A5 and A6.

    I see holes for A4 and A5. Most APM's also provide A6 and A7 (which are analog in only). I use those for things like the VRAW voltage divider, which will never need to be used as a digital pin.

    One pattern is to place A4+A5 and A6+A7 inside the perimeter pins and offset half a pin, see for example: http://www.ebay.com/itm/191117208428

    Another pattern is to add 4 perimeter pins for A4-A7 at the far end from the serial programming pins, see for example: http://www.ebay.com/itm/271512227109

    I was thinking it would be possible to accommodate either on the sensor board.

    It has a socket for the nRF24L01+. It doesn't hang over the edge, it actually hangs over the APM. My spaghetti board prototype showed no problems with this configuration. It makes it much more compact.

    It does make it more compact so I'd prefer it if is works well, but Nordic's recommendation is not to place the antenna over a ground or power plane or too close. Somebody else posted a reference recently. It may depend on how far above the PCB the nRF24L01+ is mounted. Your milage may vary but it is worth testing on the actual PCB. If we can get solid radio signals without hanging at least the antenna outboard, I'm all for it.


  • Hero Member

    I like the other designs.

    One piece that's different in what I was suggesting is leaving as much room as possible for breadboarding. I am thinking of dedicated spaces for temp/humidity and for VIN voltage divider and of course for the radio. But for other sensors, I'm thinking to devote the rest of the PCB area to a grid of holes where I can solder wires or header pins or connectors or chips or sensors in a flexible way. Some Arduino shields are designed like that - whatever space is not needed for functionality becomes prototyping space. In this case we need extra power and ground holes of course, and a hole next to each processor pin (including the ones going to radio CE/CSN/IRQ or the DHT-xx so these can be repurposed or reassigned if need be, but cutting a trace and jumpering wires). And I'd be open to having some of the prototyping holes connected like strip-board, to be cut apart as needed.

    I see this as a flexible workhorse that can serve many roles and I'm willing to solder a few jumpers for that flexibility.


  • Hero Member

    My thoughts on a standard room sensor:

    This PCB board ($1 or so)
    Arduino Pro Micro ($2.50)
    nRF24L01+ ($1 or so)
    passives and regulator
    Box ($2-3)

    Mounted to the front of the box: PIR motion detector, IR decoder (remote control receier), LDR light sensor. ($1.50 total w/shipping)

    Mounted to the side: DHT-22. ($3 with shipping)

    Other sensors as needed, with room for some expansion.

    My idea is that I can send commands from any room with a handheld IR remote, and the central conrol will know what command comes from which room. So the IR detector (which is very cheap) is also standard.

    If I get too many false hits on the motion detector, I might add an external pet-resistant motion detector from the alarm industry.

    I wasn't aiming for boost, but if it's small and cheap and optional I might change my mind. One option is to use the $5 boost-only board Axilent was proposing, if I only rarely needed boost power. (I don't want to solder any microscopic chips myself tho).

    Garage, attic, crawl space, water meter on the irrigation, etc would differ from this typical indoor room sensor, as would a clock module. I imagine some with wall power, some battery powered. Some boxes would be waterproof (really, just reasonably weather resistant).

    I would have enough pins left over to drive an LCD display if I wanted one; character or graphic.

    And this doesn't count the Christmas light control.

    Some prices above assume buying around 10 or so, some do not. 3.3v APM is a bit more.



  • @Bandra Exactly what I was going to do. Nice!

    Question: Since pin D3 is in great demand (the only available intrupt pin for waking the pro-mini) how did you decide what sensors have access? I think only one sensor can connect to the D3 pin, right? I suppose the door reed switch sensor gets priority, or does distance get the D3 pin?

    Right now I'm leaning to the PIR motion sensor getting the D3 pin. I think it's the only way to run a motion sensor off a 'sleeping' pro-mini, right?

    Here is what I'm currently thinking...

    Model_REV1.jpg

    From the bottom...a 2xAA battery pack, the pro-mini under the PCB in question, and a PIR, temp/humidity, and the radio. I'll break-out the other pins for some other things too, but this is the main function. I could replace the temp/humidity with the Dallas.

    Thoughts?



  • @Zeph I have a DHT-22 and my pin spacing is 0.1".

    I was thinking of connecting the PIR and DHT-22 directly to the PCB and building a case around it. Of course, I could also use wires to remote the DHT-22 or PIR, but I like the option of direct connecting.

    Oh yea, and where are you getting the DHT22 for $3? I need to use these due to the low humidity here in the desert. The DHT11 only goes to 20% and we a lower than that much of the year.



  • @Zeph Oh yea, use a wet tile saw for slicing PCBs like butter, very smooth edge too.



  • @therik
    D3 is an interesting one. As you can see on my board, I've broken it out with a +'ve and -'ve and together called the 3 pins "motion". However, it's dead easy just to use D3 and either the positive or neg for the door switch (depending on whether I want a high or low switch (so it supports both normally open and normally closed).

    The only drawback is, of course, (as you point out) that I can't run motion and door switch on the one sensor node. But that's ok. I've tried really hard to cram as many sensors onto each node, but the door switch sensors will just have to be dedicated. For the price of each node, I'm ok with that.

    I like your layout. I was fearful of making the node too tall, which is why I'll connect my PIR with wires rather than sit it on the board. It should sit inside a plastic case a bit better that way. I'll see if I can take some photos of my prototypes to show you my thoughts.



  • @Zeph
    For cutting the boards I'll be using a really sharp Stanley knife. I live in an apartment with my young family, so containing the dust is a big consideration for me. A Stanley knife is about the "cleanest" way to cut them. It just takes a little more elbow grease.

    I've left about 3mm between each board (since I have 3 x 3cm boards to fit across 10cm). Plenty of room to cut between 🙂

    Yeah, I know that Nordic recommend not to run the antenna over a plane. I plan to solder a 2x4 header onto my PCB and slot the nRF into that. My prototype had pretty decent range when I tried it. I'll see how it works when my PCBs come in. I may need a rev 2 yet 🙂


  • Hero Member

    @therik said:

    @Zeph I have a DHT-22 and my pin spacing is 0.1".

    Cool.

    Oh yea, and where are you getting the DHT22 for $3?

    I understand the desire to go below 20% RH.

    I am using AM2302. Many of the sources for "DHT22" are actually substituting the AM2302 (including the current MySensors store link). Do you have a datasheet for the real DHT-22?

    And I goofed, $3 was based on winning a bid for my first one, they start at $4 w free shipping on eBay for "Buy it Now", tho they can be had for closer to $3 in lots of 5 on AliExpress.

    I got mine before coming to this site; I would now tend to suggest following the links in the MySensors store if you are getting it from eBay - who knows how good the "cheapest offering" on eBay or AliExpress is?


  • Hero Member

    @Bandra said:

    For cutting the boards I'll be using a really sharp Stanley knife.

    Meaning a box cutter knife? So you probably use a straight edge and score the board with the knife (both sides?) Then just break it on the line? That sounds pretty feasible, other than:

    I've left about 3mm between each board (since I have 3 x 3cm boards to fit across 10cm). Plenty of room to cut between 🙂

    Ever since SMT, people have new definitions of "plenty of room" 🙂


  • Hero Member

    My overall thinking is that the breadboard area will allow reasonably simple addition of many types of sensors or actuators, so I am suggesting minimizing the dedicated circuitry and maximizing the breadboard area. However it makes sense to have dedicated space on the PCB for sensors and devices which are likely to be commonly used and especially if they do not fit the 0.1" hole grid. For example, a surface mount LDO regulator for the radio.

    There's another candidate which meets this criterion for me, and I've edited it into the Origional Post - onboard external serial Flash. This could be as easy as a SOIC-8 outline (and traces) for the AT24C series, or other serial Flash memory. Optional of course.



  • Gentlemen,

    For anyone who is interested I have attached a schematic of my proposed "shield". Have a look if you so choose, and if you notice something wrong or incorrect, please let me know. One thing I'm not sure is...does the DHT22 temperature/humidity sensor need an external pull-up resistor?

    Shield_REV1.jpg



  • Oh yea, be nice...it's my first one!


  • Hero Member

    @therik said:

    Very nice. No "mistakes", just some questions.

    For anyone who is interested I have attached a schematic of my proposed "shield". Have a look if you so choose, and if you notice something wrong or incorrect, please let me know.

    This is a base board for the Arduino Pro Mini, right? Are you making use of A6 and A7?

    Why three voltage dividers of this style? Do you anticipate having multiple higher voltages to measure? I would tend to use one for VRAW. I guess you could populate one half with a resistor and jumper the other, then tie something like an LDR between the analog input and VCC or Ground.

    I'm a little unusual, as I want the option to tie the nRF's IRQ to D8 (input capture 1). This is to allow T1 to be used as a high precision timer and capture the time a packet arrives, and I can also use that capture to generate an interrupt based on that - keeping D2 free for INT0.

    I am also using an interrupt driven DHTxx lib, which uses Int0 or Int1 (pin 2 or 3) rather than pin 5.

    Are the PIR and Dallas (one wire) and DHT22 dedicated footprints on the board, or connectors?



  • Indeed, a pro-mini clone. I thought that A6 and A7 might be too much to squeeze in. I'm thinking of a 3x5 cm board.

    Yea, for the voltage dividers, one for measuring the battery level. And two for something else, possibly an IR-based reflective optical sensor. And anything that has a higher output voltage.

    Hmm...haven't heard of using nRF's IRQ to D8, can you still wake a sleeping node with this configuration? I guess I just don't have a full grasp on the concept. I just a beginner, so the more I learn the more dangerous I get!

    Right, the main sensor on this board is the PIR; which is why I want an interrupt pin to that sensor. However I'd like to also use the magnetic-based sensors also as the main sensor and interrupt.

    The PIR, Dallas, DHT22 are separate from the other 'future-proof' region, this should become clear once the layout is complete.

    Anyone have a solid answer on whether the DHT22 needs an external pull-up resistor?


  • Hero Member

    @therik said:

    Indeed, a pro-mini clone. I thought that A6 and A7 might be too much to squeeze in. I'm thinking of a 3x5 cm board.

    OK. I like to use one of them for a dedicated measurement of VRAW, since it cannot be used as an additional digital I/O like A0..A5

    Yea, for the voltage dividers, one for measuring the battery level. And two for something else, possibly an IR-based reflective optical sensor. And anything that has a higher output voltage.

    What IR based sensor are you considering that returns analog above VCC? Are you thinking of having 5V power supply and sensors with 3.3v APM?

    Hmm...haven't heard of using nRF's IRQ to D8, can you still wake a sleeping node with this configuration?

    I believe the answer is "yes, but not in the lowest possible power-down mode".

    Case 1: The nRF is power up and may generate an interrupt. In that case you are using a significant amount of power; you can save battery by nevertheless mostly powering down at ATMega, but keeping timer 1 active so D8 can generate a Input Capture 1 interrupt won't be a big deal.

    Case 2: You want really minimal power - so the nRF is powered down and isn't generating interrrupts. In that case you don't need D2 or D8, and you can go to the lowest power level (including powering off timer 1); the watchdog may be all you leave running (or some other super low power external device).
    At least that's my understanding. I'm still learning too.

    Anyone have a solid answer on whether the DHT22 needs an external pull-up resistor?

    I do not use any pull up resister and I've never seen a circuit which used it.


  • Hero Member

    @Zeph said:

    There's another candidate which meets this criterion for me, and I've edited it into the Origional Post - onboard external serial Flash.

    Have a look at this little fella: http://www.digikey.com/product-search/en?mpart=W25X40CLSNIG&vendor=256

    Isn't anybody willing to create a SOIC-8 home for this cute little chip (with SPI traces of course to keep it happy)?

    512 KBytes of happiness for logging and OTA programming. Unique ID.
    Or you can get twice that memory for 2 cents more.

    (The above is the chip used by the Moteino. The Anarduino uses a heftier 16 MByte chip: http://www.mouser.com/ProductDetail/Spansion/S25FL127SABMFI101/?qs=sGAEpiMZZMtI%2bQ06EiAoG5SEO4xJJ6RlEmMSz7h3HuQ%3D but that too is possible with the same SOIC-8 footprint, I think)

    (The Moteino and Anarduino use different and incompatible radios compared to MySensors, but nevertheless contain possible inspirations for our corner of this exciting little world).



  • Just for completeness, my PCBs came in and I've had a chance to solder them up. The PCBs are really nice. iTead have done a great job. @Zeph, turns out that I didn't need to cut my PCBs because the friendly folk at iTead cut them for me.

    Here's a photo of a few things soldered on:
    photo 1(4).JPG

    Underneath the APM I have a 1M and 470K resistors for the battery voltage check. There's also a 4.7K resistor for the Dallas DS18B20 temp sensor. Finally there's a 4.7K resistor for the LDR divider circuit.

    You can also see the 4x2 header for the radio, the LDR itself, and the 3.3v step-up converter.

    Here's the (almost) finished package:

    photo 2(3).JPG

    You can see all the exposed solder pads for my various sensor configurations (motion, humidity, baro pressure, door reed switch, distance and soil moisture).

    The range on the nRF24 is fine. I put my gateway at one end of the apartment and it easily picked up my sensor at the other end of the apartment (about 10m away through two thick internal walls). So I'm not worried about the nRF24 being parallel to the GND plane.

    I actually took off the 4.7uF cap. It's probably my PCB (don't think the auto-route did a great job of it) but it made the radio flaky. Works just fine without it.

    Now to find a box to put it in...


  • Admin

    Nice @Bandra!


  • Mod

    @Zeph said:

    Have a look at this little fella: http://www.digikey.com/product-search/en?mpart=W25X40CLSNIG&vendor=256

    Interesting but even when I am willing to stock them up (50 pcs) the shipment costs exceed the price of them 😞


  • Hero Member

    @marceltrapman Have you looked at AliExpress? Seems they had a few sellers offering this chip.


  • Mod

    @bjornhallberg said:

    @marceltrapman Have you looked at AliExpress? Seems they had a few sellers offering this chip.

    I never considered them. Took the plunge for a little less then 0,19 EU per piece 🙂


  • Hero Member

    @marceltrapman said:

    @Zeph said:

    Have a look at this little fella: http://www.digikey.com/product-search/en?mpart=W25X40CLSNIG&vendor=256

    Interesting but even when I am willing to stock them up (50 pcs) the shipment costs exceed the price of them 😞

    Sorry. The problem with 4 Mb chip is that it's so cheap one feels bad about the shipping cost! 🙂

    I was also looking at some 128Mb (16 MB) flash memories at $2.78, where the shipping would be a smaller part of the order

    More seriously, I hope the Ali Express order works well.


  • Hero Member

    @Bandra Looks fantastic! I'll take 3 🙂



  • @ServiceXp
    Thanks mate! I've soldered up 3 of the boards now and they're all working fine.

    So far I've made one just with temp and light. One with temp, light and humidity, and one with temp, light, humidity and pressure. I'll make one more tonight that will just have temp and soil moisture.

    I'm not entirely happy with the two caps at the bottom of the board. The auto-route feature of Eagle is good, but I don't think it quite got that right. Seems to run fine without the two caps so the PCBs are not a write-off.

    I've got way more boards than I need. So I'm happy to send 3 off to you. PM me your address.


  • Mod

    @Bandra said:

    I'm not entirely happy with the two caps at the bottom of the board.

    What is it that you are not happy about?

    Trying to learn here because I am still not sure if I will just make my boards myself or keep it with one or two prototypes and use iTead as well...

    Talking about iTead, I saw that they can also check your board, did you decide against that?


  • Hero Member

    @Bandra Thanks, I sent you a PM... I think.. I used the "Chat" system... 😉



  • @marceltrapman
    The auto-route feature in Eagle attempts to make the most efficient board layout it can. To do that, it seems to join the traces where ever it can. When you click on the rats nest button, it will combine any GND traces that it can. Since the cap sits on GND, for example, it assumes it can put it anywhere on a GND trace, and physically dislocates it from the radio pins. I just noticed that on my board, for example, the nRF24 cap doesn't sit directly across + and -.

    So my next go I would manually route those traces first then auto-route the rest.

    It's no big deal, because if I get bad reception then I can always solder the decoupling cap directly onto the radio.

    I did choose the option to check my board. It's my very first PCB (which is why I didn't pick up the problem) so I was expecting for them to find lots of problems. But it turns out that technically my board is correct. It's the "logic" of the board that's wrong, so iTead could not have picked this up.

    Lesson learned!


  • Mod

    @Bandra Aha. Thank you for the explanation.

    I don't use auto-route at all. Sometimes I check it out, when I am tempted to try to avoid my brains doing overtime at finding a new route for yet another trace, but I always undo it.



  • Is anyone with a tested and working sensors PCB willing to share the design files ? This way people can order directly from oshpark, iteed etc. I'm sure these will make a great addition to the mysensors.org website.



  • Hi
    I would also benefit from the sharing on OSHPark or similar sites as I am a total newbie.

    Btw thanks to all the pros for their great work 😉

    Bandra your design is for now the one that gets closer to my desires. Really nice compact and flexible


  • Code Contributor

    @Zeph said:

    Have a look at this little fella: http://www.digikey.com/product-search/en?mpart=W25X40CLSNIG&vendor=256

    Any proposals for DIP-8 flash to use for breadboard testing that are compatible to avoid surprises when switching to the SOT-8 ones later-on? Do all of these SPIflash chips use the same "protocol"?


  • Hero Member

    @ToSa

    Here's a dip version of the next larger brother from adafruit:for $1.95 https://www.adafruit.com/products/1564

    Then digikey has the soic for $0.43
    http://www.digikey.com/product-search/en?x=0&y=0&lang=en&site=us&keywords=W25Q80BV

    (Digikey has listings for the dip version but 0 stock)

    I have not used these so I don't have any first hand recommendation. I cued in on this line because Felix uses the 4Mbit version on the Moteino, so I looked it up and thought it looked good.

    (The Anarduino uses a 128 Mbit spi flash chip from a different line).


  • Code Contributor

    @Zeph
    What I don't like about Flash is the need to erase before writing / the ability to erase only full sectors (4k if I get it right from the WB datasheet). Not a big deal for bootloading or logging where you can erase all upfront but limits the use-cases.
    What I really like is that a lot of the SPI Flash chips and EEPROM chips have the same pinout - which means depending on the specific need you can use a flash or an EEPROM using the same PCB layout (example EEPROM that allows single byte writes without erase: 25LC256 - obviously less memory and higher price but serves different purpose - 256kbit for <1€)

    So I really like the idea of having this added to the PCB layout - especially because it can serve different needs depending on what chip is selected 🙂


  • Hero Member

    @ToSa
    Yes that flexibiity is attractive.

    I don't have the datasheets right here, but...

    Do I recall that there's often a way to test for the type and size of chip (that's actually installed) using SPI?
    Do I recall that some include a unique ID?

    (I might be thinking of the 128 Mbit chip used by anarduino)

    For bootloading one attraction is the possibility of letting application code fill and verify the external Flash using the full normal protocol (at the cost of some space in operational PROGMEM), then having a relatively simple boot-loader to transfer it to PROGMEM The sensor can continue to operate while packets are written to external flash, using high or low portions of the wireless bandwidth. When the application has finished loading and verifying the new firmware in external flash, it would write a "All OK, use this" signature to the external flash and reboot; the bootloader would notice that signature and copy from external flash to application PROGMEM.

    In this case, the bootloader doesn't need to have a radio library or MySensors protocol stack (even trimmed down), and so there's no need to change the bootloader when the OTA protocol changes, eg MySensors 1.3 vs MySensors 1.4 vs RadioHead. Pretty much all the hardware config the bootloader would need is the select pin for the SPI flash. And if you were using a low bandwidth network (eg: 433 Mhz at 38400 bps) you could take as long as it needs to sent out firmware packets mixed with ongoing normal operation, before doing a sudden reboot/bootload.

    That said, not every node is going to have external flash, so I'm happy to have the alternatives of your approach which doesn't require it.


  • Hardware Contributor

    Bandra,

    Any chance we can get the files to order our own?

    If I want to use this with a 5V regulated supply, how hard would it be to add a 5V-3.3V converter for the Radio?

    Edward



  • Thanks for your interest, guys!

    My PCB is getting really close, but I'm not entirely happy with it. I've made up 5 of them and scattered them around my place. For the most part, they're working well. However I have the following issues:

    • The battery voltage varies. I don't think my cap is quite doing the job, so I may need to tweak the PCB to get it closer to the voltage divider. I'm running Domoticz and it does a good job of averaging the battery level out, so it's not completely bad, but I'd really like to fix it in the next version of the PCB.
    • My moisture sensor (the one from the MySensors store) doesn't work very well. It chews the battery (cos the sensor from the store has 2 leds on it, plus it's always "on". I'll pop those off and see how it goes. However I think I can do the moisture sensor better. I'm thinking of including another voltage divider, and run the sensor off the digital pin for power. That way, I can power the sensor down in between samples.

    I think that I can also include my own step up voltage converter. I'm not entirely happy with the chinese step up converter. So far my 2xAA batteries have lasted several weeks, and they're still going strong, but I suspect that I'll only get a few months out of them. I'm aiming for a year.

    I'm designing our new house at the moment, which is taking up a lot of time, but I'll get onto rev 2 shortly. Once I'm happy with it, I'll put the design up here so that you guys can get your own made up.



  • Oh yeah, I'm also scouting around for a nice enclosure that will snugly fit the PCB and 2xAA battery holder side-by-side (around 60mmx 60mm) and with room for the PIR motion sensor sitting on top of those. Haven't found anything yet. I may have to buy a 3d printer to make my own... 🙂



  • @Bandra great we wait patiently!


  • Hero Member

    @Bandra
    Got the boards, they look fantastic, Well done Sir! If all goes well I should have one build up by next week.

    Thanks again!!


  • Hardware Contributor

    @Bandra how are the boards working out?

    Any issues with the Radio over the Arduino in terms of the RF capabilities?
    I'm thinking I would like to change my board layout to have the radio like yours to save some real estate on the board if there are no negative consequences..

    Thanks,
    Edward



  • Hi! I am interested in this sensor PCB. Have you decided on posting the files for others to build these? What iteak build options (size qty etc) did you use, and how much total did it cost? Thanks!



  • I did not know one could design and purchase a PCB for relatively cheap like this, awesome! Although, now I have yet another project on my hands, haha.

    If anyone with a board plans to put their files public, please let me know. I would definitely be interested in purchasing, rather than teaching myself to design one. 🙂 At least for now, while I have 5 million other projects going on.





  • @Bandra said:

    Just for completeness, my PCBs came in and I've had a chance to solder them up. The PCBs are really nice. iTead have done a great job. @Zeph, turns out that I didn't need to cut my PCBs because the friendly folk at iTead cut them for me.

    Here's a photo of a few things soldered on:
    photo 1(4).JPG

    Underneath the APM I have a 1M and 470K resistors for the battery voltage check. There's also a 4.7K resistor for the Dallas DS18B20 temp sensor. Finally there's a 4.7K resistor for the LDR divider circuit.

    You can also see the 4x2 header for the radio, the LDR itself, and the 3.3v step-up converter.

    Here's the (almost) finished package:

    photo 2(3).JPG

    You can see all the exposed solder pads for my various sensor configurations (motion, humidity, baro pressure, door reed switch, distance and soil moisture).

    The range on the nRF24 is fine. I put my gateway at one end of the apartment and it easily picked up my sensor at the other end of the apartment (about 10m away through two thick internal walls). So I'm not worried about the nRF24 being parallel to the GND plane.

    I actually took off the 4.7uF cap. It's probably my PCB (don't think the auto-route did a great job of it) but it made the radio flaky. Works just fine without it.

    Now to find a box to put it in...

    Can you share your board to me,pls? Im newbie. Pls email to me quocanhcgd@gmail.com Thanks



  • I'm also interested on your PCB board design. Can you share it? Thank you.



  • @Tom71 said:

    I'm also interested on your PCB board design. Can you share it? Thank you.

    Same here, is it possible to get this PCB for ordering please?


  • Admin

    FYI, @Bandra hasn't been "online" for over a year.


 

Suggested Topics

311
Online

8.4k
Users

9.3k
Topics

97.9k
Posts