Please do not get these PCBs, I left this page as information for those who made the PCB before but some people had problems with power on some boards and I don't want you to waste time soldering a non fuctional board and me wasting time doing technical support. Thank you !
My goal with this project was to enable everyone to build complete MySensors nodes including everything necessary (arduino, radio, sensors and also battery) in a compact volume, easy to solder and without any wire or tricky assembly techniques.
NModule PCB transforms a ProMini board into a MySensors "base" node, with only a minimal extra volume. An extra row of pins allows connection to a variety of "shields" to build many different types of sensors (see the table below).
I have decided to use SMD version of the NRF24 module because:
it is the only way to reach my goal of a compact node
SMD version of the NRF24 is a bit more expensive but the quality (stability, range) is higher than the basic modules
it is not that hard to solder, it's even easy !
it is possible to use an amplified version (PA LNA) with ceramic antenna that allows an extended range
The radio is the ONLY non through-hole component that is mandatory to build most NModule-based nodes: those who are confident with SMD components can use them to make more compact nodes, but everytime it was possible I added footprints for through hole components and nearly everything is possible with only basic soldering skills.
**
Don't be afraid by the looooong page, I'm just trying to give as many details as possible. When you have done it once, assembly process is really quick and simple :)**
Source and gerber files
NModule, like all existing shields, was designed with Eagle in free version. I am going to switch to KiCad soon so expect the boards to change format in the coming months.
There are choices for the Gerber files :
"normal" containing a single board
"panelized" containing 2x NModule + Power board and 2x NModule without power board
"core" containing only only the "core" of the NModule without power board and support below antenna. This is a minimized surface version to get PCB from PCBs.io (US$3.87) or OSH Park (US$4.80)
Assembly Instructions
Preparing the Pro Mini
What you need for this step
Arduino Pro Mini Board, I suggest a 3.3V/8MHz version, expect if you really need more power. In that case you will need to solder XC6206 regulator to provide 3.3V to the radio, so make sure you are confident with SMD soldering !
headers for the Pro Mini. For the programming header, you will need either straight or angled headers, check on the page of the shield you are planning to use to know what to choose. If you don't know, use angled headers.
small screwdriver
soldering iron with fine tip
flux to solder the radio module easily
small breadboard to help soldering the headers
Soldering
If you are not familiar with soldering, review some soldering tutorials. It is very important to have good solder joints for battery powered sensors.
cut the two last pins of one of the headers supplied with the pro mini
using the breadboard to help you, solder headers on the sides of the pro mini: from pin 10 to RAW (complete header) and on the other side from pin 9 to RST (with the header you have cut), RX and TX pins do not need to be soldered
remove plastic separators of the headers. You can skip this step, but your sensor will be thicker...
This is an easy step, just be patient and careful. There is a slot at the ends of the plastic separator where you can insert the screw driver without damaging the board. Push the 2 ends of the header a little bit down, just enough to insert the screw driver between plastic separator and the board on the side.
On the side, insert the screwdriver and push a little bit down, move progressively toward the center until plastic separator is moved down on all its length. Repeat until separator reaches the bottom of the pins and remove it carefuly. Remember, always do it millimeter by millimeter so you will not exert too much force on the header and not bend them. Put the bottom of the pins on a hard surface when you push down, this will also limit the mechanical force on the pins
take the 2 pins that you have cut on one of the headers, and solder them on A4/A5 pins. You cannot use the breadboard as they are not aligned, but putting the pro mini on you desk, standing on its pins, should be enough to keep them in place during soldering. Remove plastic headers for the A4/A5 pins too
solder the programming headers
do NOT solder any pins in the holes near the reset buttons (GND, A6, A7)
Battery powered nodes: removing leds and regulator
Then, if you are planning to make a battery powered sensor, you need to remove leds and voltage regulator.
I made a video that is low quality but shows how easy it is to unsolder led and voltage regulator on a pro mini, all you need is a tip that is not too big, clean (not like mine :)), and with a good amount of solder on it
removing the power led is absolutely mandatory
led on pin 13 can stay in place but it's on the side and very easy to remove, so why keep it and let it draw unnecessary current ?
regulator has reverse leaking voltage, it's not stated on the datasheet of the regulator on my pro mini boards so I expect it to be not so good (several ยตA) and I prefer to remove it. If you're not feeling confident, you can keep it but you could have significantly lower battery life for very low power sensors.
Updating bootloader and BOD
From my experience with battery powered sensors using NRF24, you will get a better battery life if your arduino runs at 1MHz. It allows to run at much lower voltage (down to 2V) so you can get all the energy from CR2032 cell. But for that, you need to remove BOD or set it lower at 1.8V, as by default the BOD (Brown Out Detection) will reset your arduino at 2.7V.
There are already some tutorials to explain how to write bootloader on the MySensors forum. Don't bother using a programmer, just use an arduino nano or uno with the ArduinoISP sketch (from the examples in Arduino software) and flash a 1MHz bootloader with 1.8V BOD (or no BOD).
After you have updated bootloader and BOD, connect a led and resistor on pin 13 and test again the blink sketch, check that the interval between blinks is correct. If not you have probably a problem with the frequency of the board selected in Arduino.
Preparing the NModule
Now that your pro mini is ready, you can start to work on NModule PCB.
The NModule PCB is made of 2 main parts :
the NModule itself
the "power" board to allow powering the NModule from batteries or external power. The power board can be cut with scissors (along the red line on the picture above) if you don't need it so that you have a smaller sensor.
NModule board
"BRD" area
This is to manage the power for the full board: Arduino + radio. It contains:
footprint for an AMS1117 regulator (light blue) if your source voltage is too high for Arduino (> 5.5 V or > 3.3V for 8MHz version). AMS1117 can handle up to 15V and 800mA but it consumes a lot of power, so this regulator should be used only for "wired" power (12V, USB, ...) and never with batteries. If you are using only this regulator, the capacitor of the radio should be enough to keep it stable, but if you want to be on the safe side, you can use the capacitor footprints on the other side of the board: C6/C7 for input C8/C9 for output.
a jumper marked JPOWER (dark blue) to connect RAW directly to VCC if you are not using a regulator
"RDIO" area
This is the radio area, it contains :
footprint for a XC6206 regulator (purple color). If you are using a 5V arduino it is mandatory. This is also the best option if you are running your node from a Li-Ion battery as its current consumption is very low. Radio capacitor should be enough to keep it stable, but if yo want you can use the capacitor footprints on the other side of the board: C5 for input C4 for output
a jumper marked JRDIO (pink) to connect VCC directly to the radio if you are not using a regulator
radio capacitor: this should be at least 4.7uF but I advise to use at least 10uF. It's better to use the SMD footprint (yellow) but you can put an electrolytic capacitor on the through hole footprint (cream) if you don't mind the extra volume
NRF24 SMD radio: you can use the "normal" SMD module (white) or the PA LNA version with ceramic antenna (red). DO NOT swap them as the pins are not in the same order on the 2 modules !
JIRQ jumper, this is used to connect the radio IRQ (interrupt) pin to pin 2 of the arduino. Most of the time you will leave this jumper open as the interrupt pin of arduino is needed for sensors
"SIG" area
This is the signing area, it contains footprint for ATSHA ic that manage the signing of the MySensors messages, and a pullup resistor. These components are only necessary if you want to enable the signing of the messages.
Soldering process
You should solder the radio module first, then the radio capacitor, then regulators if you need them.
Soldering the radio module
Don't be afraid of soldering the SMD radio module, it's simple :
use a fine and clean tip
put NModule on a flat surface it will adhere too. I use a small silicon mat from aliexpress, it's great
put solder on the first pad of the connector ((and only the first one), on the NModule PCB
keep your soldering iron in one hand, and with the other align the radio module with it's footprint, just next to the soldering tabs. Melt the solder of the first tab and slide module in place, press a bit to keep it flat on the PCB. Then remove your soldering iron. Your module should be "tacked" on the PCB and not move anymore and of course well aligned. If it's not aligned and/or not perfectly flat on the PCB (you should have no space between radio module and PCB), repeat this step.
Now is the good moment to put some flux, then solder the other tabs one by one. Don't put too much solder, just enough to have a good joint between the PCB and the castellated pin of the radio module. If you put too much solder you take the risk of creating a short.
usually I test the resistance between adjacent pins of the radio module, it should be several MOhms. If you have a low resistance, put some flux, clean your soldering tip of any solder and put it on the joints, moving from module to the connection tab to remove excess solder from between the castellated pins
"Power" board
If you are interested in powering your node with CR2032, CR123 or 2 AAA batteries, keep the "power" board together with the NModule.
For each battery type I put a picture with the outline (that you can cut) and the connection pins for the battery holders. I also give a link for the holder on AliExpress, but you can of course buy from any other shop, just use it as a reference for the holder type/shape.
Then it is possible to use a through hole regulator. I didn't put a footprint for a specific regulator, but connectors for RAW, VCC and GND (yellow) so that you can use the regulator of your choice, usually they are using a TO92 package. Make sure you double check the pinout on the datasheet before you solder to the board !
There are footprint for input capacitors (blue) and output capacitors (pink). Small footprints are for 100nF capacitors (small round ceramic ones), while the others are for electrolytic capacitors and I can't give you the values: you have to check the datasheet of your regulator :)
Solder the ProMini on the NModule, pins are not symetric so you can't be wrong :)
Cut headers. Be careful depending on the sensor shield you are planning to use you need to keep different headers: reset, SPI pins, digital pins, ... Check the page of the sensor shield to check what pins you need to keep
solder the 10 pins connector on the NModule connector
congratulations ! You now own the smallest ProMini-based MySensors board in the world :D
@Nca78 Are you still working on this pcbs? i think it would be great to add a version that supports HiLink 220ac->5dc module on powerboard.
No I'm not working on NModules anymore, I have a few old nodes using atmega/nrf24 but I switched to NRF5 for "basic" nodes now, and to ESP32 for more "advanced" stuff.
NModule was designed for beginner and simple/riskless use, so I don't think adding high voltage option is a great idea, it's better to use an external power supply and connect the output to the powerboard.
zmatokan commented 4 years ago
@Nca78 Are you still working on this pcbs? i think it would be great to add a version that supports HiLink 220ac->5dc module on powerboard.
@Nca78 Thanks man! I managed to make it work. Seems like the problem was with radio modules. Now it works fine!
Happy to hear that, thank you for the feedback !
zmatokan commented 4 years ago
@Nca78 Thanks man! I managed to make it work. Seems like the problem was with radio modules. Now it works fine!
ghiglie commented 4 years ago
Ok, just for record: be very very very very very carefull when desoldering the regulator+led+resistance. Do it before soldering the ping legs on module: I had a pair of nodes, correctly running, beatyfully soldered, legs trimmed... and darn, dunno what I did on tracks, they are not powering up anymore.
Luckily I could desolder the antenna from under the PCB and stick on another (the first I told) and put the other as spare.
Oh, I love DIY when I fix my errors!
{update: one sensor died yesterday. Maybe my Minis are too cheap? }
Haha that's a lot of boards. May I know what the accident was ? There was a case of a nmodule having a shortcut when manipulated, is it something similar ?
Oh, easy! I already had soldered TX/RX pins and the angled ones (towards the atmega). I decide to take them off and reverse the angled... Iron's temperature was quite high... Some tracks got as bright as old 100W bulbs filament!
The radio SPI pins can handle 5V but not it's power supply. So as you have no regulator on radio for these boards, I see 3 choices :
best one = use a programmer running at 3.3V and you can power the board & radio with it. 100% safe. You can do this with the ArduinoISP sketch, a 3.3V pro mini and a ftdi adapter.
if you only have a 5V powered programmer, power the board separately and connect only the SPI pins with the 5V programmer. But this is out of spec as the voltage on SPI pins will be higher than VCC + 0.5V
open the JRDIO jumper so that the radio is not connected to VCC and use 5V programmer for SPI pins + power supply of the board. In that case to respect the datasheet of NRF24 you need to supply separately at least 3V to VCC radio, else you are in the same situation than point 2, but with the radio and that is I think a worse situation so in that case solution 2. is safer.
I'm yet programming it with ArduinoISP on a genuine UNO, so I'm safe. I'll solder the SMD antenna ASAP, the TH one isn't bearable once you see how slim the node gets with your PCB!
Hi there! In these days I got some boards from my drawer - I spare quite a lot, I ordered 10 panelized one, so I have 40 NModules!
4 sensors are yet running on battery (2 on CR2032 and 2 with with 2xAA). The fifth module had an accident and I need to program it via SPI. is it safe to flash it with the antenna still soldered?
Haha that's a lot of boards. May I know what the accident was ? There was a case of a nmodule having a shortcut when manipulated, is it something similar ?
The radio SPI pins can handle 5V but not it's power supply. So as you have no regulator on radio for these boards, I see 3 choices :
best one = use a programmer running at 3.3V and you can power the board & radio with it. 100% safe. You can do this with the ArduinoISP sketch, a 3.3V pro mini and a ftdi adapter.
if you only have a 5V powered programmer, power the board separately and connect only the SPI pins with the 5V programmer. But this is out of spec as the voltage on SPI pins will be higher than VCC + 0.5V
open the JRDIO jumper so that the radio is not connected to VCC and use 5V programmer for SPI pins + power supply of the board. In that case to respect the datasheet of NRF24 you need to supply separately at least 3V to VCC radio, else you are in the same situation than point 2, but with the radio and that is I think a worse situation so in that case solution 2. is safer.
ghiglie commented 5 years ago
Hi there! In these days I got some boards from my drawer - I spare quite a lot, I ordered 10 panelized one, so I have 40 NModules!
4 sensors are yet running on battery (2 on CR2032 and 2 with with 2xAA). The fifth module had an accident and I need to program it via SPI. is it safe to flash it with the antenna still soldered?
Yes. If your sensor can work with the voltage drop of the arduino regulator (I think yes), you can also keep it and leave JPOWER open. Less risky and you might have a "cleaner" power for the motion sensor.
No, with a normal SMD radio the onboard regulator of the promini will be enough to supply power to board + radio + i2C sensors. So keep the arduino regulator, don't add an AMS1117, leave JPOWER opened, solder JRADIO.
A forum thread is automatically created for each project and article in the OpenHardware/MySensors forum. To make comments here, you must have a separate forum user account.
Comment