๐Ÿ’ฌ NModule

  • Hero Member


    I'll give the hot air gun a try. Thanks for the suggestion!

    I hadn't realized that the PCB for this project is as big as it is until I went to order one from Osh Park just now. They want $18.85 for three. Maybe you can post a version with just the core pro mini shield but with the battery related part and the antenna silkscreen amputated? That would reduce the PCB cost by a lot. I haven't delved into it, so sorry in advance if perhaps the question is overly simplistic. I'm guessing there may be others like me who want to try it and who have alternate ways of powering it.

  • Hardware Contributor

    @NeverDie yes that's how it was not so long ago, that's why it's small like that on the pictures I didn't have the battery/power part nor antenna support.
    I'm more used to Seeed, DirtyPCB, Elecrow and PCBWay so size doesn't matter if you stay below 55cm or 1010cm.

    I added the small part below antenna because with previous version I had a case when I unsoldered the radio module during manipulation. But I get the point it's not worth it if you pay board per surface.
    It's easy to make so I'll add NModule_Core.xxx gerber files ASAP.

  • Hardware Contributor

    I just updated the page with the links to the sensor shields.

    @NeverDie I also uploaded some NModule_Core files (.brd and gerber files) to get PCBs from PCBs.io or OSH Park.
    PCBs.io is US$3.87 and OSH Park US$4.80.

  • Hero Member

    Thanks! I just now ordered it:
    0_1496242365812_nmodule_top.png 0_1496242388235_nmodule_bottom.png
    $4.80 is a lot better than $18.85. ๐Ÿ™‚

  • Hardware Contributor

    @NeverDie said in ๐Ÿ’ฌ NModule:

    $4.80 is a lot better than $18.85. ๐Ÿ™‚

    But $18.85 was still very cheap for such a great board ๐Ÿ˜„ ๐Ÿ˜„ ๐Ÿ˜„

  • Hardware Contributor

    Christmas in June ! ๐Ÿ˜„


  • Hardware Contributor

    NModule works with 3.3V power from header/programmer, and with a coin cell on the "power" board attached to it (tested with CR2025 and 220ยตF electrolytic capacitor).
    I'll continue the tests tomorrow.


  • Hero Member

    Not a big deal, but the silkscreen printing is jumbled together, making it hard to read:

    Not sure if you're seeing it on your boards that way or not, but that's how OSH PARK did it.

  • Hero Member

    Also, there are a number of "Pro Mini" type boards on the marketplace, and not all of them are 100% pin compatible. Which did you choose as your model? Is it the Sparkfun Pro Mini (which, if I'm not mistaken, was the first and the root of it all)? You may want to show a photo of the pro mini you're assuming along with a caption reading "your pro mini should look like this" just to avoid confusion.

  • Hardware Contributor

    I think you're the first to ever have a board made by myself in your hands. Congratulations ๐Ÿ˜„

    For the PCB it's probably due to a mistake from me when modifying the board to make the "core" Gerber version or when exporting files. I will have a look and fix asap.

    For the ProMini I mainly use "The Simple" version from AliExpress, but my local seller has some "Sparkfun" branded clones and they are fine too.

    You should only solder the connectors on the long sides and A4+A5. If it's not clear enough when reading assembly process please tell me.
    Both types of ProMinis have the same layout for side pins and A4/A5, only the programming header and A6/A7 pins are different so it has no importance for NModule.

  • I have used Seeed PCB service a few times in the past. They are not quite the cheapest but still excellent value, and for that little bit extra they do a better job than most.

  • Hardware Contributor

    @Ximper well at US$4.90 for 10 boards up to 10*10cm they are the cheapest now ๐Ÿ˜‰

  • @Nca78 Oh yes, it's $4.9 now. My last order was in March this year, it was $9.9 at at time, thank you for the correction ๐Ÿ‘

  • Hero Member

    Wow. $4.90 sounds great. What's their total turnaround time, including delivery? Actual delivery time, not just advertised delivery time, I mean.

  • Hardware Contributor

    @NeverDie they take 5 opening days to make the boards.
    Than the shipping depends on what option you choose, but cheapest shipping is US$11 with HK Post (no tracking), it seems to take around 2 weeks to arrive in the US.

  • for best battery life it is advisable to burn bootloader mentioned in the text.
    How much would a battery lifetime be, for example one single temp sensor reading every 5min?
    When using custom bootloader, then over the air updates cannot be used? Or could the MYSBootloader be configured to take most of the cr2025 battery?

  • Hardware Contributor

    Hello @dakipro,

    what is necessary is to remove the default BOD limit, it is set at 2.7V and that is too high :

    • even if CRxxxx cells were running like alkaline cells, this would waste a big share of the capacity, around 30% I think
    • CRxxxx are not like alkaline cells, they have a high internal resistance and can supply only a limited amount of current, else the voltage drops. Meaning that in fact you will reach this 2.7V much faster if you have several RX/TX in a row

    That is the main limit. I also advise to change the frequency to 1MHz and use internal oscillator if you have no calculation to do: door sensor, all basic I2C sensors etc etc because at 1MHz the power consumption is significantly lower. With NRF24 and I2C sensors it will not slow the "on" time much, data sent to/from radio and sensors takes very little time to transfer and main time is for waiting for radio reply or data from sensor: not affected by frequency so better have consumption as little as possible.

    For battery lifetime if you remove leds and regulators with si7021 it will be way over 1 year. I have not tested those sensors for long enough, but I've had some round "puck" sensors with si7021 running for a few months on chinese CR2032 and I have not seen any voltage drop. Interval time is set to 1mn, it's not sending 5x more than 5mn interval (because often in one minute temp/hum don't change) but probably 2-3 times more, and with that I have no doubt the batteries will last way over a year.

    My entrance door sensors is my oldest sensor, also running on pro mini (and still have it's TX led) and chinese CR2032, it uses the normally opened + normally closed reed swich and after 14-15 months of use is still at 85% of battery.

    You can check that on battery life calculators anyway :

    • with WDT disabled (= when you are not waking up periodically) consumption of board is below 2uA
    • with WDT enabled and si7021 I measured it below 6uA
    • when on with radio enabled for transmit/receive, at 1MHz power consumption is around 15mA when battery is new, a bit lower

    This is a worse case scenario with battery capacity lowered to account for chinese battery (brand name is 220), and long wake up time with radio considered always on, sending data every 5 mns.
    In reality radio is switched on only when data must be sent so time for reading voltage and sensor value is done consuming around 1mA at 1MHz.

  • thanks for detailed explanation, I was always a bit skeptical towards those small batteries, but your module (and documentation) clears all doubts ๐Ÿ™‚
    Do you have any experience with OTA updates? I understand that it also needs custom boot-loader (sorry still not having enough understanding about all the things that are involved in making one node, a lot of new terms for me ๐Ÿ™‚ )

  • Hardware Contributor

    @dakipro no sorry I'm not (yet) using OTA.
    But yes you need a specific bootloader that will download the new code from the controller and update flash memory of the atmega. There are 2 solutions for this (sorry forgot the names of bootloaders but check the documentation):

    • a bootloader that needs an external flash chip to store the downloaded code. It's a constraint, but it allows the sensor to continue running during download and it will be "offline" only for a short time during memory copy & reboot
    • a bootloader that will copy directly the new code to the flash memory. It means as soon as the sketch started to download your node is offline until all the sketch is downloaded. And if update fails, your old sketch is still gone

    OTA also need some specific code to check for the updates.

  • Thanks ๐Ÿ™‚
    Then I guess all that is left is to motivate you to start OTA and improve it (finetune) it to nmodule ๐Ÿ™‚
    I used it for regular modules and it is really practical, but I never had much luck with optimizing modules for battery performance. I would get a half year/year with 2 AA batteries, which is not that good comparing with your tweaks for CR battery.

    Keep us updated on other modules, people are waiting for your tests to start ordering ๐Ÿ™‚

  • Hardware Contributor

    @dakipro for OTA I don't think there's much to do with batteries & OTA' Either the batteries allow continuous load (CR123, AAA, li-ion etc) or you just can't do it.

    For battery life it's pretty simple but people keep choosing the wrong options and end up with poor battery life/instability etc etc. That's the reason I created the NModule: cheap and sure way to get a good battery life. Then I got a bit wild with the "shields" but that's another story ๐Ÿ˜„

    For other shields I'm making (slow) progress but I hope to take NModule, TH, Light/SSR, dual touch button, MiLight bridge and PWM boards out of the "work in progress" status during the next 2 weeks.


  • Hey @Nca78 I received the boards and components (yay!)
    But... I connected three modules, and none of them works ๐Ÿ˜ž
    They all have transport (radio?) fail like

    32 TSM:INIT
    49 TSF:WUR:MS=0
    98 TSM:FAIL:CNT=1
    114 TSM:FAIL:PDT

    I tried connecting radios from two different batches, I tried connecting only the radio and arduino, I tried powering it from separate powersupply and only debug via serial. I tried provided sketch and also tried dummy sketch from the examples. I tried using the CR battery, node works fine except that the radio doesn't start communicating.
    I do measure 3V on the radio pins. I tried with and without radio cap.

    I am using chinese silicon mat to solder components on, I read somewhere that you use something similar *(not that I am spying on you ๐Ÿ™‚ ) but could it be that I am frying all the radios with static electricity?
    I have used the mat before and it works fine with regular radios, nothing fried so far, but there is something preventing nodes from working ๐Ÿ˜ž

    Do you have any suggestions on how I can debug them and see what seems to be the problem?

  • Hardware Contributor

    Hello, @dakipro, can you show a picture of one of the board ?
    Did you short the jumpers (JPOWER and JRDIO) if you're not using any regulators ?

    Yes I use a cheap silicon mat because it's so convenient, and I never had any problems with it all my radio worked.

  • Hero Member

    I get the impression that not all radio modules use the same pinouts. You may want to confirm that yours are the same as @Nca78's in that regard.

  • Hardware Contributor

    @NeverDie is right. Some modules like those from CDEByte are different from the classic SMD modules from AliExpress and must be soldered on the "pa/lna" pinout (the one closest to the edge of the board).

  • Hero Member

    Looks as though the PA/LNA part of the silkscreen warning got largely obliterated by the solder pads.

  • Must I have a radio cap?
    I connected the jumpers now quickly for a test (missed the part that I need them), but still same error

    49 TSF:WUR:MS=0
    98 TSM:FAIL:CNT=1
    114 TSM:FAIL:PDT
    10158 TSM:FAIL:RE-INIT
    10174 TSM:INIT
    10207 !TSM:INIT:TSP FAIL
    10240 TSM:FAIL:CNT=2
    10256 TSM:FAIL:PDT

    Here is the photo of the board (a bit blurry, I can take it again if it helps)

    I am missing the radio cap as I was testing lest night without them, but I can solder them in a few hours and test again if you think it will help.

    I connect power to the vcc pin of the "connection pins" right?

    Radio is the one linked in the BOM from aliexpress

  • I put the radio cap back (4.7uf the largest I have in smd), but still same error ๐Ÿ˜ž

  • Hero Member


    Your photo seems to show some hair-like filaments. Don't know if they're conductive, but, if so, maybe they're bridging some of your solder pads? Have you checked with a continuity meter?

  • checked between the pins, no radio pins are touching each other. Those hairs er most likely from the cat, got them cleaned after the photo.
    I will try to make one more module in a few days and test.

    But to confirm, for the simplest module I need >4.7uF cap, pro mini and the radio, two jumpers (jpower and jrdio) and some mock sketch, and it should all work?
    Have I missed some other jumper or resistor or some other component maybe?

  • Hardware Contributor

    @dakipro no you're not missing anything now.
    Cap is not even necessary at the moment don't worry about it.

    Problem is connection with radio so you have to make sure :

    • VCC and GND pins of radio are correctly connected (seems it's done)
    • SPI pins are correctly connected to the radio, check the "connecting the radio" page for the pinout on the pro mini, and radio module pinout. Then check continuity from radio connector to matching pin on radio side, you might have a soldering problem.

  • Hardware Contributor

    @dakipro you can also check the continuity between adjacents pins of the radio modules, it should be in MOmhs, if lower that could be a reason for failing communication too.

  • Hardware Contributor

    @Nca78 said in ๐Ÿ’ฌ NModule:

    @dakipro you can also check the continuity between adjacents pins of the radio modules, it should be in MOmhs, if lower that could be a reason for failing communication too.

    Just reading on computer instead of phone and I see you did it already, so except a connection problem with the SPI pins I don't see any reason for failure...

  • Hardware Contributor

    @dakipro said in ๐Ÿ’ฌ NModule:

    Thanks ๐Ÿ™‚
    Then I guess all that is left is to motivate you to start OTA and improve it (finetune) it to nmodule ๐Ÿ™‚

    Just did OTA on a main powered NModule with MYSBootloader and it worked like a charm.
    I will test with a battery (CR123) module at 1MHz now, and post a tutorial later.

  • Hero Member

    @Nca78 said in ๐Ÿ’ฌ NModule:

    post a tutorial

    That would be awesome.

  • IT WORKS!! Life is worth living again...
    I've assembled now fourth module and it works, only different thing I did is that I have soldered the radio and power jumpers before connecting the module together. It could be that without jumpers essential component of all electronics (white smoke) gets out of the radio, not sure what happened. But it works!

    I was struggling a bit to figure out all components needed and all the steps, it might be helpful to have a "short guide", this is for my own reference of what I did in order to get CR2032 module for using with TempHumDoor shield:

    Components needed [nModule]: pro mini, radio, nmodule board, 1 capacitor for radio larger then 4.7uf (I har only 10uf, I have ordered 47uf for future modules).

    Assembling process

    • Burn 1mhz bootloader on pro mini
    • solder two jumpers for jpower and jrdio
    • solder the radio to the board
    • Control that there is no connection between the radio pins, resistance is at least above 200Kohm (don't skip this part thinking it cannot happen to you, it will happen)
    • Solder >4.7uf (f.eks. 10ud) smd.
    • Solder all legs to arduino (except last two RXI and TX0, you will see them missing when you align nModule)
    • Take off the plastic from the legs, before you solder it to the radio (do this BEFORE you solder it to the board)
    • Solder arduino to nModule board
    • Since the capacitor is very small, just check if there is no short between plus and minus (vcc and gnd) pins, as somehow I managed to short them on one module, it turned out that one of the caps was shorting it, probably by overhitting or something.

    Upload mockMySensors sketch and check that node works properly (spare yourself a trouble, no point continuing further if this doesn't work) By this point you should have node looking like (better then) this:

    0_1506632551397_THD nModule 3 - IMG_0730_1024.jpg

    TempHumidityLightDoor shield components: SMD SI7021 for temperature and humidity and a MAX44009 for light, two capacitors larger then 100uf (I used two of 100uf, waiting for 220 to come). And the work so far.

    You basically solder these three/four components and the battery holder as described on the shield here https://www.openhardware.io/view/398/NModule-Temperature-Humidity-Light-Door-sensor-shield
    I didn't yet solder LEDs, but they are accessible after assembling the module.
    Then it looks like this:

    0_1506633186422_THD nModule 4 - IMG_0725_1024.jpg

    0_1506633204869_THD nModule 1 - IMG_0720_1024.jpg

    Now that nModule #1 is completed, you continue with other modules

    0_1506633280285_THD nModule 2 - IMG_0722_1024.jpg

  • It is great to hear that OTA update is coming soon @Nca78 looking forward to the tutorial ๐Ÿ™‚

  • If the "power" board is used, shall I keep the voltage regulator on Arduino? Without it, i think powering the board from RAW pin will not work.

  • Hardware Contributor

    @Haozhi-Wang it will depend how you connect things on the "power" board and/or what regulators you use on the NModule board.
    There are 2 reasons to remove the regulator :

    • save energy if you are running on battery, it's not a big waste so if you are using CR123 or AAA you can keep it so it's possible for you to power from RAW with a higher voltage
    • when powering from main, allow higher RAW voltage with a better voltage regulator on the NModule or the "power" board (on promini clones usually the maximum voltage is usually 9V)

    There is a connection between the RAW pin of the promini (on the long side) and the RAW on the "power board", so whether it will work if you use a regulator on the "power" board and remove regulator on the promini will depend on the promini you use, if there is a track betwenn the 2 RAW pins or if it goes through the regulator.

    I hope it answers your question, if not please describe more clearly what sensor you are building, with what power source and why you want to power it from RAW.

  • Guys, pls. have in mind that Ebyte short NON pa+lna module uses pa+lna pinout.
    Took me some time to figure it out

  • Hardware Contributor

    I love those shields... to bad they dont use MysX connector ๐Ÿ˜‰ Any thoughts about 2.0 rev?

  • Hardware Contributor

    @sundberg84 I'm working on it ๐Ÿ™‚

  • @Nca78 Thanks you for you detailed answer.
    The power source i am going to use is a CR2032. My bad, I overlooked the three RAW, VCC and GND connectors (yellow) on the power board site.
    For my case, i think shout circuit of JPOWER will be a even better solution

  • Hardware Contributor

    @Haozhi-Wang said in ๐Ÿ’ฌ NModule:

    @Nca78 Thanks you for you detailed answer.
    The power source i am going to use is a CR2032.
    Yes, for that case you need to short JPOWER and JBRD.
    And don't forget to double check your USB adapter every time you connect it to your computer, to make sure you have selected 3.3V, else you will fry your radio with 5V.

  • Hi there!
    I've ordered 10 PCBs from iTEAD, so now... I'm plenty of them to do some tests.
    Can you confirm these Minis are ok?

    Btw, I have some battery boosters, I have used them already with success on breadboard. Have you got any experience about it? Do you think the PCB is hackable to integrate it?



  • Hardware Contributor

    @ghiglie said in ๐Ÿ’ฌ NModule:

    Can you confirm these Minis are ok?

    Yes they are ok, they seem to use the Sparkfun layout if I believe the reset button and the position of the A6/A7 pins. I use the boards with a smaller, rectangular reset button on my NModule PCB. The only problem I ever had with "different" ProMini board was the connection between the vcc of the programming header was cut when removing the voltage regulator so board was not powered anymore when using FTDI adapter.

    Btw, I have some battery boosters, I have used them already with success on breadboard. Have you got any experience about it? Do you think the PCB is hackable to integrate it?

    No, if you use a booster you need some extra caps for filtering the output, and a voltage divider to measure battery voltage, there's no space for that on NModule. I made NModule to have a compact "all included" board, so it's made to use low power sensors, that can run at low voltage so you don't need a booster.
    If you really want to use a booster try EasyPCB.

  • Thanks @Nca78 ! I'll order some a lot of 10. Just in case...

    @nca78 said in ๐Ÿ’ฌ NModule:


    You'r right. Thanks for this clarification - really don't need to use the boosters or have battery measurements, so I'll keep the sensors small as you designed.

  • Hardware Contributor

    @ghiglie said in ๐Ÿ’ฌ NModule:

    or have battery measurements

    You will have battery measurement, because you will power the atmega with the battery directly so it's possible to read Vcc.
    When you use a booster Vcc is always the same so you need a voltage divider on the battery to know it's voltage.

  • @nca78 said in ๐Ÿ’ฌ NModule:

    @ghiglie said in ๐Ÿ’ฌ NModule:

    or have battery measurements

    You will have battery measurement, because you will power the atmega with the battery directly so it's possible to read Vcc.
    When you use a booster Vcc is always the same so you need a voltage divider on the battery to know it's voltage.

    Sorry, n00b here! ๐Ÿ˜ž Thanks again, nca!

  • Hardware Contributor

    @ghiglie no use to be sorry, we were all beginners at some point in time ๐Ÿ™‚