Sensor board with booster and supervisor
one of my needs is sort of generic node with ultra low power and power management options.
So I started to design my own board. And during my research I have found two different boards which focused my attention.
- one design Anticimex started and shared (I felt in love with some ideas : power rails and jumpers).
- and ulpnode work https://hallard.me/ulpnode-low-power-secret/, not released yet, but soon I think. Very great idea too!
First, Anticimex and Charles (ulpnode), thank you very much for your share. You have inspired me!
Now, I am trying to make these two boards in one.
So here is the schematic, and an overview of what it will look. All is opensource. It is still in dev, so for the moment it is not recommanded to use files (available on my git).
I have made two versions : nrf_dip/rfm69, nrf_smd/rfm69, I removed all trace and gnd plane under nrf antenna to be sure there will be no problem.
The idea for ultra low power:
having the lowest consumption in sleep mode require to disable bod and watchdog. Watchdog needs near 20ua maybe. So we can't use it for waking up.
So, how can we wake it up after a period? With pin change interrupt. The idea is to get a storage capa full, then go to sleep. Supervisor voltage, which is powered by vin, will monitor vcc capa discharge and will enable pin change interrupt at 2V level. At this moment, supervisor is enabling dcboost but for a time. So we need to maintain it by an output of arduino. And we do all the wake up stuff if needed and process sensors, messages....
If nothing needed, we increment counter. As we can know the discharge time from the storage capa we know how many cycles are needed.
Why I choosed Arduino mini instead atmel chip is because : the board can be smaller like this, and I was lazy to reroute atmel. Few small ics, others are 1206.
- check all routing : in progress
- test of different sleep mode: in progress
- if needed, modify bootloader to toggle some pin at startup (to enable dc booster, as supervisor will do it at startup, we must maintain pin level next) : in progress
Thanks for feedback
jesper last edited by
It sounds mega exciting.
What is the status and how much power does it uses?
Sorry for delay.
I am waiting for boards to test it. It will be easier to test as mcp1640 is too small to breadboard for me! I am waiting for uCurrent pcb too.
When I'll have news, I'll post it of course.
just wanted to share my work in progress. So I updated my first post. You can see an overview (I still need to make some cleanings).
And I would like to ask a question to grandmasters of electronics here, lol, as I have a little problem.
Before, just little results, as I am still in the beginning of debugging the board and am happy with what I am seeing. I have not tried dc boosters and supervisors yet. I am actually testing mosfets and sensors. Here my setup for the moment:
- Ucurrent Gold (homemade, but calibration checked with some res)
- arduino with reg and led removed
- power directly from 2x1.5v battery
- mosfet on my schem are not the right ref. I had problems with them : arduino resets at startup. very strange. I changed the diode by 120o res. in case. but same problems. I changed mosfet by BS250 TO92 and it works. I need to figure what was happening.
- Sketch Mysensors, lib 1.4, BH1750. I get between 200-300nA in sleep mode. Wow am I dreaming???
There is lots of tricks I think, if you want to have low power. I will explain more when all will be ok. My problem actually is:
- Sketch starts. I read BH1750 : all is ok.
- Before sleep mode, I power off BH1750 by mosfet. Then I set SDA, SCL output=0 (if I don't do this I have hundred uA consumption). With output=0, I get 220nA
- I wake up from pin interrupt, then power mosfet, wait 10sec to be sure, bh1750.init, but sensor returns 0 value!!!
- In other hand, I have no problems with the radios.
- If I press reset button, my startup reading is ok. I have a problem to restore i2c bus I think. I don't understand as I was wondering BH1750.begin calls Wire.begin which should set registers???
Have you an idea about this??? Do you have some i2c init routine? I will dig in datasheet but in case you know what mistake I am doing
@scalz Can you post the sketch? It might help in finding what is wrong.
@Moshe Livne: thank you. I found my mistake last night (Charles from ulpnode helped me). I needed to stop i2c bus and restore it after woken up in a precise way. I need to clean my code.I will post a sketch soon.
As I am waiting for pcb, I am trying to miniaturize my board. It will be full smd (0805) and smaller size. And 4layers. So if use atmel 328p instead of arduino pro mini clone, I will have less chance to get a bad arduino clone.
Here what I am trying to do. It is 49x23, so I hope to be able to put two boards on a 50x50 to reduce cost.
All described in my first post is integrated except 5v dc booster and one i2c (but is exposed on border, so there is 3 i2cs).
Lazy, I firstly took the moteino and added signing. then i enlarged the board to fit what I need. But I think I will not be able to fit the 5v booster. no enough place for footprint for the moment.
But it is very experimental to see if it fits and it is doable. So now, I don't like the design, it is not beautiful I think and it should be better. I will make a new try from scratch this time. So here my question, if @Anticimex or @tbowmo have some recommandations, I would be very happy:
- do you think MYSConnector would be preferable than how it is? I already imagine your answer ahaha! When you decided the pinout what was your basis? do you have something with atmel rooted to the MYSXconnector 1.5?
- so if I understand right your connector, I need to make the two row, one connector.
- could you show me a screenshot of MYSX1.5 with labels. To be sure...
- as I am using booster, but with a large capa, do you have some recommandations about 4layer trace route? My first 4layer attempt so, I have read lots of articles about this, but if you have good advices...
- finally, I think it will be difficult to have nrf smd and rfm because on the left I will have dc booster and don't want to interfere with nrf, and right I will need some external connectors or additional i2c, power...
See you soon.
Ah, and I know it is Eagle. No time to learn Kicad for the moment. But maybe it will be exportable to kicad next.
I will publish my revised sensor motherboard on the forum this week. It has MYSX 1.5.
Depending on forum feedback, this board might (or might not) evolve to a "official" MySensors board.
The MYSX specification is available here: https://github.com/mysensors-kicad/documentation/blob/master/TheMYSXconnector.pdf
And it comes in various versions to accomodate different types of boards.
My board will also come in various versions. For two different cases and a low-cost 5x5cm edition (from DirtyPCBs).
It is the "second generation" board compared to the board I did which you took inspiration from. But as you know, my first version had a few bugs, which I have resolved but yet not published.
I hope to be able to at least write a forum topic and list the board features this week.
@Anticimex: thank you very much for your reply. So do you think I don't need to spend more time on this board, even if it is ulpnode like, and I would make it smaller (50x23 with MYSX) ?
I looked at MYSXconnector. Just two questions, then I will wait for your great work!
- 20pins ok. but is it first 10 pins on first row? Maybe dumb question as I think it is group of 4x2. So 9-12 first row, and 13-16 scond row, 17-20 first row...
- On MYSX 1.3, I am little confused, pin13 SCL, pin14 SDA but pin 16 is A4???
If what I am trying to do is still actual, I will convert it to Kicad next as I saw it is possible to import eagle project. Just want to share, not compete, I don't care about this.
Anyway, I can't wait to see your board, I'm a big fan of Mysensors Team work
@scalz i am sure our boards will complement each other's. It is not my intention either to "replace" your board in any way.
About the connector, this is not clear from the specification, but the pinout is crossing. So odd numbers on one side and even on the other. For kicad users we have MySensors specific libraries where symbols and footprints are available but the spec should be updated to Nä clarify this. Thanks for pointing this out.
About the signal naming, they are not to be confused with Arduino pin naming. The names are MYSX specific and not to be confused with Arduino at all. So A4 on MYSX has nothing to do with A4 on an Arduino board.
In the future, "offical" boards which have MYSX will have a board header in some form that maps the MYSX names to the Arduino pin it's connected to on that particular board. We are busy in the "core team" discussing how to manage this so it will be easy for everybody to use and to make their own designs.
@Anticimex: ok. I was not thinking about odd/even. it is clear to me now thx.
Maybe this evening I will try to follow your Github Kicad tuto, so I can see correspondance for digital pins and cs pin on connector symbol as I am not sure.
But I'm not ready to use Kicad ahaha! I would have to re-do my learning curve!! and it took me so long time to be friendly with Eagle, and I discover new things every week...
I understand MYSX concept and I agree, harmonization will be useful for projects.
And thx for your kindness, it encourages me
This post is deleted!
Last night I had a long run thinking how to make my proto rev2. Here is how it looks for the moment.
I hope it will be finished routing this week end. I will have optimizations to do but most difficult is done. Now I am routing the MYSX connector. @Anticimex or someone else, if you have time, could you tell me if my MYSX is right please?
1:VIN 2:VCC3 3:VCCIO 4:gnd 5:tx 6:rx 7:a6 8:a7 9:d2 10:d3 11:d5 12:d6 13:scl 14:sda 15:d7 16:d8 17:mosi 18:miso 19:sck 20:d10
Same specs as my prev rev. This version will be better than my previous I think as I have 4layer I can make better and smarter plane (and keep a plane dedicated to gnd). cool . I have added a regulator too. So now I can choose vin_bat/3v dc booster/3v reg 16v max. Jumpers are now smd.
On screenshot, boosters and low power stuff is on the left. in the middle 3 external i2c, rfm and nrf smd are on bottom. Downward are BAT connector, MYSXconnector, AVRSPI.
It is small and if you use nrf it will be a little more higher (maybe 1cm as you can see). maybe I will try to find a little name for fun, MyTinyCamel???
and it is still 0805, so solderable for me. cool!
@scalz looks good. Almost identical to my routing for MYSX
One thing; consider using something different than d10 for SPI CS as I believe most boards uses that pin for radio SPI CS. It would still work of course but you'll end up with a non-default radio configuration.
@Anticimex. cool. thx. for d10 ok. so in fact pin20 is an external cs pin. I thought it was just atmel rerouting so I rerouted radio cs pin. I am too dumb sometimes! Ok I will look at this tonight. Oh, and I can share my files with you if you are curious. For the moment it is not on my git. I am waiting to be sure..
See you soon.
@scalz Correct. The purpose of MYSX_D14_CS is to provide a CS for one SPI slave on the daughterboard (it also doubles as a digital IO called D14). Any digital IO could be used for this but by having a dedicated pin that at least can serve as SPI CS, daughterboards with one SPI device can assume this pin can be used for CS.
just for share. as I am happy.. finally it's all routed, it was some work! maybe I will add an optional led. some check to improve it and I will test dirty or elecrow. I don't know yet..
I modified my pinout for MYSX too.
I like how it looks with rfm69
not bad with nrf smd too
Nice and compact
I added a led on sck (like on pro mini). not sure if it is the best pin (dualoptiboot use default D9 if I remember right). I will see. I am improving silkscreen, some vias and some trace now. and need to add a small osh logo. I think I will be able to order it next week. Can't wait to see this tiny camel
I am feeling holes are big but it is 3.2mm. maybe I should use 2.2mm but it is small.
on MYSX, now pin15=A0, pin20=D7.
@Anticimex: thx. your schematics looks very good. I am not so skilled I missed one or two decoupling capa I think. I will add those and upload my schem this afternoon to show you.
by sharing we can do so better things
@scalz Practice makes perfect What license do you plan to use for your board? Same as me or have you found another OSHW licence that is simpler? I find some aspects of the one I have chosen that I am not too happy with, but I have not found a better one.
@Anticimex: actually I am not very familiar with the license system. I have not taken the time to look at the differences. osh or cc-by-nc-sa??? I need to check what it involves. so for the moment I just paste osh logo to tell it is open source. What aspects don't you like about CERN for example?
@scalz Well, it is a bit cumbersome since it require quite a few documents to be included with the product in question. And it stipulates that this documentation should be copied and maintained by anyone basing their work on said product (so I could go after you if I was a evil bastard ) and for the record, I won't. Because I release my work freely, but I still think it is nice to have some formal document to govern the rights of the authour even if there is no money involved.
But I have not found any other license that makes this easier, and since I already ave inncluded the necessary documentation structure to my git, I don't have to worry about anything else than the changelog from now on, so I will probably stick with it.
@Anticimex: ahahah! ok. What you are saying about CERN and its documentation is exactly what I don't like!!! I do this freely too, so I don't care about all this stuff but if it is needed I do it. and I am very glad each time to say who inspired me.
so you think I should stick to CERN?
But I agree that copyright, licensing needs some rules for respect to the author. I helped my dad few years ago to get a patent. So I understand the problematic.
I think lots of innovation today are often improvement and mix of others existing good things. and then a patent..
@scalz I think my personal stand on this is that I will stick to CERN OHL myself. I do not require anyone to keep CERN OHL even if they copy parts of my work even if the OHL require it (my design, I make my own rules on what I enforce, nobody else will do it for me anyway ).
I just think it is good to have some form of "common" license platform that anyone can use or read that formally grants permissions. I am more interested in the "rights" than the "requierds". To me, the license shows everyone that I am formally granting free use of the design. I will of course not discourage anyone from following the formal CERN OHL rules for copying OHL licensed work, but I won't hunt anyone for it. A simple reference to my board in a changelog or similar is plenty! If you worry about the licence, I can also supply a GPG signed statement you could add to a commit where I relieve the licence requirement in case you want to get rid of the CERN stuff "legally". I am not sure it is "legal" for me to do it, but since it is my design in question, I feel I have the right to do any permission I want. And the signature would tell anyone that it really was me giving the permission. But I cannot see why anybody would really care.
@Anticimex: no problem. I totally agree with you and I am happy that we share same vision.
and here it is my temp schematics https://github.com/scalz/MySensors-HW/blob/development/MyTinyCamel/schematics.pdf
capa near mysx vcc and vccio is needed, isn't it?? My vbat measurement is slightly different as I was a little afraid about draining power to gnd...
As you can see my board is more dedicated to be a pure lowpower sensor node. but there are still some options from you.
and I think this board will really fit well in my future flower power like! with a small daughter board for my homemade ec salinity/humdity sensor.
@scalz Looks good, and yes, my board is more a generic approach with some power saving features, but I have not gone all in. For instance I elected to skip controlling radio power since it also require re-initialization of the radio, and the savings then depend on the usecase. But for sure, to make it ultra low power, that would be a nice feature to have as well as an option. Unfortunately, I am out of IO for a Arduio Pro Mino "host".
There is no formal requirement for decouplers on the rails to MYSX. I put them there just for insurance as it might simplify daughterboard design. By the way, I did notice a typo in the MYSC spec. It says that it is recommended to support 24V on Vraw but the core team has agreed that 12V is more reasonable. So the spec will be updated to 12V.
@Anticimex: I am happy to hear this. Yes I know for 24v but I was thinking 16v was good for my case. I will see for those capa, if I have enough space. can't be bad. thx for all your advice
The only thing which I don't like so much is there is not so much prog space. Maybe I will see in a near future to get some atsam3s1a. but not now, I have enough projects to finish!
so far so good. I have no drc error on any layer. I am still searching for bad looking trace. but I think it will be ok for me I have made minor changes to my schematics too (some capa for dc booster...).
I will certainly send it this week. I need to email dirty and elecrow to see if they are ok if I put 2 boards (4layer) on 5x5 pcb and cut them myself. I am not sure for dirty... I think I will take DHL or EMS! can't wait! Yes I know it's bad I have printed pcb on paper to see, and it is very small. cool!
I have made a small doc too. Much more cool with an overview. Here it is:
I will put my design files on my git in 2-3 days. I think it will need a small child board now
I need to improve the screw holes. could be better I think...
@scalz I think board edge clearance to the holes is a bit on the low side. But the board looks good
boards ordered. bom and source files updated on my git : https://github.com/scalz/MySensors-HW/tree/development/MyTinyCamel
It is experimental. so for the moment please wait before try, so I can test it and will tell you when all will be ok. during this month I will know more. but if you want to pick ideas or some part of schem. I am glad if it can help you. It still needs a little more docs and to clean my first post...
See you soon
Mounting screws use a lot more space than you might think on these small boards. Several of the solder pads look like they may be too close to the holes because the screw head will contact them. Here's a link with all the details.
Very impressive! Particularly that BOM! A lot of money to save by avoiding Mouser in favor of AliExpress. And you didn't even factor in VAT? (at least in Sweden I've never paid VAT on anything from Ebay/Ali, the post office is probably swamped by these packages, which is probably the biggest selling point)
Overall, I'd like to say this is probably the best MySensors board to date. Of course, I'm partial since I like boost regulators, but still. Where can you go from here ... the only thing really is making everything even smaller, perhaps two mounting holes will be enough, and move to 0603 or beyond, QFN for the 328p etc. If it is worth the effort. The board is still pretty small as it is and should be hand solderable for most at this point.
Particularly like the way you've included both the RFM and NRF, and that you've used the the "SMD" version of the NRF. That old module was a real waste of space.
I did not even know of a SMD variant of NRF24! That is a nice touch. If you ever consider using KiCad, you are welcome to contribute new footprints to the MySensors repositories
Also, looking good with the license there I have thought about the hassle with the changelog maintenance it requires, and I think it should be good enough to keep it up to date with releases of the board. That is, not for every single git commit. So that would not mean too much work thankfully.
By the way, I did notice a typo in the MYSC spec. It says that it is recommended to support 24V on Vraw but the core team has agreed that 12V is more reasonable. So the spec will be updated to 12V.
A nominal 12v power input is good, but it would be nice to have some slack, like accepting up to 14v. Some inexpensive 12v sources can put out higher than 12.0v (even over 13V) when lightly loaded; likewise a fully charged lead acid battery. If the caps and regulator of a power user are spec'd to at least 14v, we can relax about these.
However a source should aim for 12v, not for the upper limit of acceptance (eg: 14v).
@Zeph Right, but that should be covered by the component used. Most specs specify a absolute maximum and a nominal value. It is assumed that the designer is using the nominal values in every case, and never the absolute maximum, so if the spec says 12V most components probably have an absolute maximum that exceed that.
Small suggestion - mark pin 1 with a square pad in the next revision.
Also, are the battery terminals close to but not quite 0.1" from the MySX connector? Being clearly separate (like 0.15") could help avoid misplacement of a connector in some case.
Overall, tho, pretty cool!
By the way, do you think this could handle both a RFM69 and a nRF24L01+, or would they interfere too much with each other being so close (ie: choose one)? (Even tho the RF per se is on different bands).
I think @scalz has the same "issue" as I do. We share SPI CS pin for both radios, so they cannot work in parallel.
You are fast responding tonight - I was just noticing that D10 is used for select for both radios and was about to edit or withdraw my question!
I'm still curious whether it could have worked (with different chip selects), but that's an unusual use case so probably nobody else cares.
Hehe, up early morning and doing layouts.
I have considered parallel rf operation but the only reasonable usecase I can come up with is a "universal" relay node (or a "universal" gateway), but the way I see it, it will probably case more problems than it solves. It would also potentially take a heftier current pull on the supply.
@bjornhallberg: thx for your kind comment Same in France, vat is missed in big bag postage. it is good for us! I wanted to see how I could reduce costs on basics components and I was very surprised to see the results..I ordered to these ali sellers to see if they are ok. now waiting..yes I know it could be smaller, but then I could not be able to solder. I could be, but then it is not funny to me I handsolder, I have not a reflow oven yet (but it is on my todo)! And there is already the Sensebender in the field!
@TD22057: thx for your comment. I think I missed to update holes on my overview Now it is 2.2mm and I checked the space for M2 head screws And if I use screws, I would choose nylon.thx for the link, I will read it
@Zeph: thx for feedbacks too. I will check all of this. but I think I will never go up 12v, as I designed this first for my sensors node. I did not do this to be able to handle the two radios. In which usecase do you think it could be useful. As it is for sensors first, I think two radio is useful for a GW maybe.
@Anticimex: thx for having followed and helped me I hope I will have time to learn Kicad.I know it would be so cool to share libs all together. and I would be glad if I can contribute more to Mysensors. I started to learn Eagle for lots of reasons (including for my job) and because at first Sensebender has been done in Eagle I think. So I thought you would use Eagle. But then coreteam moved to Kicad!! Too bad for me! but not for my learning curve, now I need to learn Kicad
I am very happy for all your feedbacks and I hope that all will work as expected...
still for fun...here another board I have received today. The first rev, bigger than mytinycamel, and not looking as good as Anticimex boards, but it will be helpful to me for all sort of things.. Here a screenshot, not soldered yet, with pro mini and rfm to see how it looks.
ordered at Seeed. I can't wait to receive mytinycamel smaller rev. It is already shipped by elecrow and will be red, aaaah too hard to be patient
but I think I will have lot of fun and work this week end
what do you think about this..because I can't stop to look at the things I don't like I have made some change...
I think that sensors we/I need the most are temp, humi, lum, contact and motion. motion is not a low power thing. others yes. And it should be ultra low power as possible, and as small as possible not easy and not big news
so I think my nodes will be like this:
- low power sensors together : coin cell if good results, otherwise 2xaaa for some. must be thin, small, long lasting.
- not very low power like pir motion; alone: 2xaaa. can be a little bigger but not too much.
You will understand why I say this. I have done some change on mytinycamel (the red board in prev post). but it is not updated on my git yet. and I wait to have tested my rev1 before.
- rev 1.1 : I have made minor change, aesthetic like square pad for MYSX connector pin1...
- rev 1.2 : different. not finished but all routed. I will show you soon.
what I have done on rev 1.2 :
I removed the 3xi2c connectors which were on the center of the board (even if it can be useful if you only want to wire, it is too redundant as there is already MYSX ).In place I added enlarged footprints (all optional of course) :
- 10k thermistor for temperature
- SI7021 temp and humidity
- BMP180 pressure
- TSL2561 for luminosity. funny you can read ir measure too. but too bad I hope its library not too big... and it is low power but not as good as BH1750. but it is cheaper. so not easy choice...
- VEML6070 for UV. it could be useful for my rollershutter node in progress...
as there is MYSXconnector it is easy to wire a reed switch too. Like this I will only need a batt and no child board for lots of my nodes need. with no childboard I hope I will keep this thin. I am trying to see how I could add optional coin cell connector to the board.
do you have any remarks about my sensors choice, or others things? I am planning to make a childboard this time, like lipo rider. I will try to make it compatible with @Anticimex board too.
last night tests in progress with nrf, for the moment no big surprise
but please wait for my rev 1.1 release soon, better silkscreen..
a family photo : nodemcu, myTinyCamel, pro mini (poor thing, I burned it when I started to learn arduino ) and a nano.
with nrf smd module
and with rfm module
A small/big update! Tests on my rev 1.0 are done. I need to fix a last minor thing and it will be ok...finally!
Shortly, there was some missings, not big hopefully. I can fix my boards, and the 20's I have in stock are usable, ouf!
Now, those who are following and interested to build it. I would like to have your point of view. I'm eager of your advice
I have two kind of boards. The 1.0 updated/fixed = 1.1 You already know it..
And here the new 1.2, bug fixed of course and now MyTinyCamel carry a little more .
Which one do you prefer???
Note : I won't do any changes now, I am boring with this board. It took much more time than I thought..and i want to tinker. I am still waiting for components for child boards...and some designs I ordered on 3dhub.
So in 1.2, still ultra low power concepts etc.. and major changes are :
- 5V booster removed (was it really useful, do you want I keep it on 1.1???)
- the 3xi2C connectors are removed. Do you think this is a problem? I did this because I wanted to have something overall thinner(in case I don't need an addon child board). And thinner board -> thinner enclosure, more discrete and cheaper (on 3dhub)...
- many optional onboard sensors. Wow : 10K NTC thermistor, SI7021, VEML6070, TSL2561, APDS9960 (with a mosfet to enable/disable internal gesture IR led).
- USB connector. cool only for power as I had no kind of external connector on 1.0, it could be useful. I wanted to add v-usb, in case, but I can't. there is no more place.
- improved routing and silkscreen
I hope I will be able to handsolder these sensors. To help I have enlarged footprints.
Now some pictures :
And bonus : my last enclosure design for this board. I think i will make another one (with a window) if I want to have a small 0.96 i2c oled and power it through usb
This enclosure is a 2xAAA 66mmx30mm and 21mm thin ! Thickness 1.5mm so i will use ABS and postprocess with acetone for great finish..
The text is just for fun, lol, I will remove it! Or maybe Mysensors
As you can see, I don't need screws to unmount everything, there are emplacements for battery springs, some airholes, precut usb, preholes for inwall fixing and for sensors so drill what you need, an emplacement for an acrylic sheet to protect sensors...
Do you see something to improve?
See you soon.
some tinkering in progress...cool
It's my first proto for mini PIR. I have not all my parts yet but it looks like this. 66x30 Height 27mm
I have another cover if I don't user child board with PIR. it will be slimmer. But like this it's not bad near a nodemcu.
Cliff Karlsson last edited by
I love this board, but is there some good way to incorporate a option for a HLK-PM01 so that you could chose between batterypower or "direct" power.
@Cliff-Karlsson : maybe it would need to make a childboard and connect it to MYSXconnector 1.5 but sorry, I am not planning to make a HLK childboard for the moment.