💬 Easy/Newbie PCB for MySensors
-
@Nca78 - Hi, nice to see your white boards !
I see your image, and you have choosen a REG jumper (regulated power supply). How do you power it? Through RAW?
You have missed the voltage regulator with caps for the radio, so at this point it does not get any power at all?If you are using a 3.3v arudino with RAW you can bypass it with a wire.
If you are using a 5v with RAW or Regulated power (PWR) you need a 5 to 3.3v voltage regulator.
-
@sundberg84
@BastienVH said:@sundberg84 said:
If you use the FTDI connector, make sure its the 3.3v and connect it to Gnd/Pwr on the PCB and not Arduino FDTI connector.
You could just exclude those pins and connect a battery directly and use that as power and the FDTI as programmer/serial debug onlyBat or Reg is nessecary!
See this picture for battery use: https://www.openhardware.io/view/4/EasyNewbie-PCB-for-MySensors
https://www.openhardware.io/uploads/568ed84b60aa3f8965fbf095/image/3.jpg
All components in the image is needed (except battery measurment).
If you dont want to use booster you need to bypass that one with a wire/jumper (or set the jumper on REG instead of BAT but that kills the logic).The battery doesnt "need" the 0,1uF but see here:https://www.mysensors.org/build/battery
"The tap point could be bypassed with a 0.1 uF capacitor to keep the noise level low, at this otherwise high impedance point. "Hi. I've been using this board with 5V power from cell chargers and it works great. I'm trying to make my first battery sensor and am a bit confused (again) as to what is necessary. I'm powering using 2 AA batteries. I've cut the right side off the board so I'm obviously not using the measuring portion, but the above bit about the booster leaves me confused. Can someone answer:
- I connect via the PWR and GND pads right?
- Do I jumper BAT or REG?
- Do I need to do anything else to get this to work?
I tried to program using battery in but was using the ground from the ftdi connector. I could not get this to work. I'm thinking that this was a major problem and that I should have used the battery ground. That's the right approach right?
-
@chuckconnors - assuming you are using a Arduino Pro Mini 3.3v it will die when the voltage drops below 3v (about) so it leaves alot of power left in your batteries and also it will die rather quickly.
Thats why I have designed the PCB with a booster for battery operations, and then its not possible to cut the right side of the PCB since the booster is located there. Check the image out: https://www.openhardware.io//uploads/568ed84b60aa3f8965fbf095/image/Rev8 Bat.jpg and you see the booster on the top right corner.
-
Thank you for the tip @sundberg84, it just needed the bypassing of the regulator, and then I can connect my cell battery to the GND and PWR and it runs fine.
@Samuel235 yes you are right I did it and it didn't have Vcc power that's why I asked that question to sundberg84, next time I'll precise it as it could have ended in wasted time...
@chuckconnors this is how you have to connect the jumpers to use directly on battery power (on GND and PWR pins). But as sundberg84 says you will not have a long battery life with AA batteries and without a booster. Even if you update the fuses and bootloader to run at 1MHz and have the BOD at 1.8V there will still be power left (I guess not far from 25% of capacity with 2 batteries) that is wasted. If you keep the defaults settings of the arduino at 8MHz it will run down to 2.4V and around half of the energy in your batteries will be wasted.
-
@sundberg84 is the board ready for Ver 2.0.0 ?
the final version announced yesterday at HERE, anyhow can you share an example of Node sketch ?
-
@Lior-Rubin - the PCB or the hardware has nothing to do with 2.0
It will work fine - 2.0 is only software (what you program it with).
I have been running 2.0 beta (dev) for a long time now without any problems.
-
@sundberg84 I'm aware of it. I just ask to be sure.
Can you upload here an example sketch (v2.0) with battery reporting ?
-
@Lior-Rubin said:
@sundberg84 I'm aware of it. I just ask to be sure.
Can you upload here an example sketch (v2.0) with battery reporting ?You can just check the examples included in the library, I've been using the beta version of MySensors 2 for a long time and started from supplied examples, never had a problem.
This is some code I use to report battery level, it's harder to make it more simple, juste keep your existing code to read the battery level and replace the line sending the value with the sendBatteryLevel() :
int currentBatteryPercent = SystemStatus().getVCCPercent(VccMin, VccMax); if (currentBatteryPercent != LastBatteryPercent) { LastBatteryPercent = currentBatteryPercent; sendBatteryLevel(currentBatteryPercent); }```
-
@Lior-Rubin - If you use a voltage divider and 2xAA use this:
Defines:
//========================= // BATTERY VOLTAGE DIVIDER SETUP // 1M, 470K divider across battery and using internal ADC ref of 1.1V // Sense point is bypassed with 0.1 uF cap to reduce noise at that point // ((1e6+470e3)/470e3)*1.1 = Vmax = 3.44 Volts // 3.44/1023 = Volts per bit = 0.003363075 #define VBAT_PER_BITS 0.003363075 #define VMIN 1.9 // Vmin (radio Min Volt)=1.9V (564v) #define VMAX 3.0 // Vmax = (2xAA bat)=3.0V (892v) int batteryPcnt = 0; // Calc value for battery % int batLoop = 0; // Loop to help calc average int batArray[3]; // Array to store value for average calc. int BATTERY_SENSE_PIN = A0; // select the input pin for the battery sense point //=========================
void batM() //The battery calculations { delay(500); // Battery monitoring reading int sensorValue = analogRead(BATTERY_SENSE_PIN); delay(500); // Calculate the battery in % float Vbat = sensorValue * VBAT_PER_BITS; int batteryPcnt = static_cast<int>(((Vbat-VMIN)/(VMAX-VMIN))*100.); Serial.print("Battery percent: "); Serial.print(batteryPcnt); Serial.println(" %"); // Add it to array so we get an average of 3 (3x20min) batArray[batLoop] = batteryPcnt; if (batLoop > 2) { batteryPcnt = (batArray[0] + batArray[1] + batArray[2] + batArray[3]); batteryPcnt = batteryPcnt / 3; if (batteryPcnt > 100) { batteryPcnt=100; } Serial.print("Battery Average (Send): "); Serial.print(batteryPcnt); Serial.println(" %"); sendBatteryLevel(batteryPcnt); batLoop = 0; } else { batLoop++; } }
Add batM(); in the loop where you want to measure.
This calculates an avarage and sends it every 3rd time. So i sleep my sensors for 20 min, and battery is reported every 1hour.If you want to measure incoming VCC agains ref use @Nca78 but this does not work if you are using a booster (since it will always be 3.3v on incoming).
-
Hello @sundberg84 I have a request for update for your board
Can you remove the trace from the INT pin of the NRF24 to the D2 pin of the pro mini ? As interrupt is not used in MySensors for the NRF24, it's not useful while it creates some side effects.I explain you my problem:
I made a door sensor using a reed switch with both normally open and normally closed pins, and connected them to D2 and D3 (+ ground on the other side connected, as on my last picture above).
In the code I switch the status of the pins in the loop between HIGH/LOW values and set the interrupt on the unconnected pin so the pin is connected to ground only during a very short time (just the time to get out of the sleep mode). I'm supposed to have a very low consumption during deep sleep mode (few microamps). But I have that only when D2 is not connected to ground. If it's connected then it seems I have some current leaking from the INT pin of the NRF24 to the ground through the reed switch, as the board is using 6.5mA.
Without any other change, I made a barbaric cut of the trace near the NRF24 and now the current consumption is around 1.5 µA for both states of the reed switch. For the next boards I will just remove the INT pin of the NRF24, but it would be more simple to have nothing to doJust in case this is my sketch (not final, please be tolerant) but I don't think it's really relevant
// Enable debug prints #define MY_DEBUG // Enable and select radio type attached #define MY_RADIO_NRF24 #include <SPI.h> #include <MyConfig.h> #include <MySensors.h> #include <SystemStatus.h> #define SKETCH_NAME "NCA Door Sensor" #define SKETCH_MAJOR_VER "0" #define SKETCH_MINOR_VER "7" #define PRIMARY_CHILD_ID 30 #define SECONDARY_CHILD_ID 4 #define PRIMARY_BUTTON_PIN 2 // Arduino Digital I/O pin for button/reed switch #define SECONDARY_BUTTON_PIN 3 // Arduino Digital I/O pin for button/reed switch #if (PRIMARY_BUTTON_PIN < 2 || PRIMARY_BUTTON_PIN > 3) #error PRIMARY_BUTTON_PIN must be either 2 or 3 for interrupts to work #endif #if (SECONDARY_BUTTON_PIN < 2 || SECONDARY_BUTTON_PIN > 3) #error SECONDARY_BUTTON_PIN must be either 2 or 3 for interrupts to work #endif #if (PRIMARY_BUTTON_PIN == SECONDARY_BUTTON_PIN) #error PRIMARY_BUTTON_PIN and BUTTON_PIN2 cannot be the same #endif #if (PRIMARY_CHILD_ID == SECONDARY_CHILD_ID) #error PRIMARY_CHILD_ID and SECONDARY_CHILD_ID cannot be the same #endif #define MY_NODE_ID 2 #define MY_PARENT_NODE_ID 0 // Change to V_LIGHT if you use S_LIGHT in presentation below MyMessage msg(PRIMARY_CHILD_ID, V_TRIPPED); //MyMessage msg2(SECONDARY_CHILD_ID, V_TRIPPED); // Parameters for VCC measurement const int VccMin = 2400; // Minimum expected Vcc level, in Volts. If you have updated bootloader&BOD you can change to 1.8V here const int VccMax = 3000; // Maximum expected Vcc level, in Volts. SystemStatus vcc(); int LastBatteryPercent = 200; // so we are sure to send the battery level at first check bool isEven = false; // to check+send battery level only for each open+close cycles // This is the activated pin, on which the interrupt is set byte connectedPin = PRIMARY_BUTTON_PIN; byte connectedPinAtLastSending = 0; // Initialized at 0 so we will always send the first time void setup() { // First thing to do: change clock prescaling to 8 to change from 8MHz to 1MHz // of course not necessary if you already have updated fuses and bootloader... #ifndef MY_DEBUG // only if we are not in debug mode, so we can keep the fast baudrate in debug clock_prescale_set (clock_div_8); #endif } void presentation() { // Send the sketch version information to the gateway and Controller sendSketchInfo(SKETCH_NAME, SKETCH_MAJOR_VER "." SKETCH_MINOR_VER); // Register binary input sensor to sensor_node (they will be created as child devices) present(PRIMARY_CHILD_ID, S_DOOR); } // Loop will iterate on changes on the BUTTON_PINs void loop() { // Short delay to allow buttons to properly settle sleep(5); deActivatePin(PRIMARY_BUTTON_PIN); deActivatePin(SECONDARY_BUTTON_PIN); // Check if the previously connected pin is now connected. We do that because it's the most likely to be unconnected now // so it's the best way not to lose any current byte newConnectedPin = GetNonConnectedPin(); if (checkPinIsConnected(connectedPin)) { // If pin is still connected we set back the value to connected pin newConnectedPin = connectedPin; #ifdef MY_DEBUG Serial.println("Connected pin is connected !"); #endif } connectedPin = newConnectedPin; // If connected pin is different that the one during the last sending of status, we send again #ifdef MY_DEBUG Serial.print("Connected pin = "); Serial.println(connectedPin); Serial.print("New Connected pin = "); Serial.println(newConnectedPin); #endif if (connectedPin != connectedPinAtLastSending) { // Value has changed from last transmission, send the updated value send(msg.set(connectedPin==PRIMARY_BUTTON_PIN ? 1 : 0)); connectedPinAtLastSending = connectedPin; isEven = !isEven; } if (isEven) { // send only every two changes for a full open + close cycle int currentBatteryPercent = SystemStatus().getVCCPercent(VccMin, VccMax); if (currentBatteryPercent != LastBatteryPercent) { LastBatteryPercent = currentBatteryPercent; sendBatteryLevel(currentBatteryPercent); } } #ifdef MY_DEBUG Serial.print("Preparing to sleep, pin "); Serial.println(GetNonConnectedPin()); wait(50); #endif // Activate the non connected pin before setting up interrupt activatePin(GetNonConnectedPin()); // Sleep until something happens with the door sensor sleep(GetNonConnectedPin()-2, CHANGE); } void activatePin(byte pin) { // Set pin as input pinMode(pin, INPUT); // Activate internal pull up digitalWrite(pin, HIGH); } void deActivatePin(byte pin) { // Set back pin as output, low pinMode(pin, OUTPUT); digitalWrite(pin, LOW); } // Will check if pin is grounded (returns true) or not boolean checkPinIsConnected(byte pin) { activatePin(pin); // Read value byte valPin = digitalRead(pin); deActivatePin(pin); #ifdef MY_DEBUG Serial.print("checkPinIsConnected pin = "); Serial.print(pin); Serial.print(", value = "); Serial.println(valPin); #endif return valPin != HIGH; } // Returns the pin that is not connected byte GetNonConnectedPin() { return (connectedPin == PRIMARY_BUTTON_PIN) ? SECONDARY_BUTTON_PIN : PRIMARY_BUTTON_PIN; }
-
@Nca78 Thanks. Someone else posted this as well. I will update this Inow rev 9 with some jumper or something.
-
Another real quick question. I have a simple sensor using a DHT11. I have this connected to D3 for signal and power and ground from the right holes. I'm getting an error saying it can't read temp/hum from the DHT. That set up should be right though? I also have a 4.7k ohm resistor in the board for D3 (that's the pin, right?).
-
@chuckconnors - that right, see my post at 110 (https://forum.mysensors.org/topic/2740/easy-newbie-pcb-for-mysensors/110)
I have the dht22 in the prototyping area but have made alot of dht22 attached directly to power/gnd and d3 pin on the mysx connector. Works great.
-
@sundberg84 Thanks. Another dumb question: What is the difference between the RAW ad the PWR pads and when should I use one rather than the other?
-
If you have unregulated power (RAW) within pro minis on board voltage regulater you can instead of using 5v regulated power use this and the arduino will convert it to 5v. I think the specs are 6-12v (with a varning on that clones can not handle 12v!). So for example if you have a 9v battery you can power everything with connecting this to RAW and GND instead of PWR and GND and the voltage regulater on the pro mini will output 5v for the rest of the PCB. @chuckconnors
-
what is the size of the mounting holes? i don't have a caliper yet to measure this small of a size (ordering on amazon)
-
Just wanted to say great work on this board. I have the first one wired up w/ batteries, 3.3v APM w/led and regulations removed, voltage regulator, dht11 and motion w 3v mod and works wonderfully. Once I get my caliper in, I'll get the right mounting screws, finish my enclosure and post the pics.
-
@rchamp said:
what is the size of the mounting holes? i don't have a caliper yet to measure this small of a size (ordering on amazon)
I dont have eagles at this computer, so I have to answer you tonight (8 hours) or so...
Thanks for the nice feedback!
-
@rchamp - sorry for later reply, the mounting holes are 2mm or 78.7mil.
-
@sundberg84
awesome thanks!
-
Hello, I ordered a second batch from PCBWay, it's ok except some components have a frame on the silkscreen, not very beautiful.
Just wanted to say that it was a pain to cut the 1.6mm PCB so this time I ordered in 0.8mm and it is sooooo easy to cut with regular cissors: no efforts and very clean cut ! So if you plan to cut the right part, order at 1mm or below, you will enjoy the cutting phase
-
@Nca78 said:
it's ok except some components have a frame on the silkscreen, not very beautiful.
Sorry, I dont understand what you mean - can you give me a closeup photo? It should be functional AND beautiful If the silkscreen overlaps the copper parts this could interfer as well...
you will enjoy the cutting phase
I also learned it the hard way - and since there isnt any high power ciciut it should be ok to order very thin pcbs.
I used a metallic saw for one and for some i cut a trace with a knife and bended it until it cracked.
-
Just ordered 10 white bords, they look so great
-
@sundberg84 said:
Sorry, I dont understand what you mean - can you give me a closeup photo? It should be functional AND beautiful If the silkscreen overlaps the copper parts this could interfer as well...
I fact it's the case only for the "Rev B" and licence text at the top left. No big deal but it was looking better without the frame from DirtyPCB
I also learned it the hard way - and since there isnt any high power ciciut it should be ok to order very thin pcbs.
I used a metallic saw for one and for some i cut a trace with a knife and bended it until it cracked.I used the knife too (don't have a metal saw) with the 1.6mm PCBs and it was long and messy. Now it's just like a strong cardboard.
-
I ordered some via DirtyPCB - Ordering via OpenHardware it seems to suggest you are buying Rev4. Says Rev4 under the order button at least.
-
@Qu3Uk - Yes, and its missleading. Its rev 9 you are ordering but the fourth update on openhardware.io Its no problem ordering from there, I always update those gerber files first.
-
I just wanted to make some suggestions for this board for the possible next revision. I recently ordered a 10 pack (which when I got it ended up being an 11 pack... BONUS BOARD).
When I put together my first board there were some things that I noticed. First, the boards that I got are labeled as rev 8 boards, but there is one small difference from the one shown on the openhardware.io website.
The placement of the 4.7uf capacitor and the raw power connection holes next to the nRF24L01+ socket are reversed. The spot that you have for the 4.7uf capacitor for the nRF24L01+ radio module is just a bit too close to the nRF24 connector. It appears that the capacitor that you chose in your design software was for a ceramic type cap that has a wider hole spacing and is narrower. Choose one for an electrolytic cap and move it away from the nRF24 connector a bit more. This should give the closer hole spacing designed for a small electrolytic cap and leave enough room for it.Similarly the spot you have for the 10uf cap above the regulator appears to also be a design for a ceramic cap with the wider hole spacing. Selecting electrolytics for these should not only give you the correct hole spacing for the electrolytic, but it should also better mark where the negative lead of the cap needs to go on your silkscreen layer.
The other thing that I wish this had was pads for a SMT AMS1117 regulator. This could be placed in the space under the nRF24 radio or just under the pro mini. You could do this in conjunction with the TO92 style that you have currently placed. It would give the board a bit more flexibility for users. In my parts box, I only had the AMS1117 regulators and not the TO92 style. I have since ordered some of the TO92 style, but having the flexibility for either would have been nice.
Last but not least, it would be nice to have slightly larger corner mounting holes. I don't have many small screws that fit those holes, and I have none that would work with the standoffs that I use.
Other than those few things, it seems like a rock solid board. Thanks for the hard work.
-
@dbemowsk - Hi!
Thank you for great input!Why the difference, is because I released rev 8 but made some last minute changes and forgot to update to rev 8.1.
You pretty much found the difference. It was a couple of days so I didnt think anybody would notice.
Did you order from DirtyPCB? I see not it got the old rev 8 version. I will update openhardware.io!Your suggestions about the 4,7uF cap is exactly what I did in the correct Rev 8 version.
I use electrolytic caps on both 4,7 0,1 and 10 uF without any problems. The G marks ground.I also like the AMS1117 but since its another design than LE33 and MySensors site wuggest LE33 i went with this.
Its a balance between flexibility and easy to use. To many components (like dual voltage regulators) will confuse some new users.I will try to fit in some bigger holes in rev 9 (currently working on it) and see what I can do about the AMS1117 .
Thank you for great input - ill keep it in mind!Br
Andreas
-
Hi,
First of all, thank you @sundberg84 for this great PCB. Super easy to work with. Still; there is one question that I haven't been able to figure out yet.
I'm running my pcb as a battery node and want to monitor the battery status. However A0 always returns a value somewhere around 30 +/- 15 - even with brand new batteries. Calculated into voltage, this would mean around 1,04V.
I've checked and double checked that I'm using 470k and 1M resistors.
I've also measured using a multi meter, with incoming value of 3,2 V and outgoing from booster 3,36V.Any ideas that might point me in the right direction for solving this noob issue?
-
@daand83 - do you mean analogread() always returns 30 but you still got 1,04V in? If so, either you have a bad connection to A0 or the chip is broken. I have had atmegas (pro mini) which was broken.
You could try soldering a second wire from A0 to the voltage divider to exclude connections errors. You could also measure the voltage input on the atmega chip. If its 1.04 there as well a bad connection can be excluded and you hav a bad pro mini / atmenga chip.
It coule be a code error as well, if you have changed to code...
-
@sundberg84
Hi,What I've done is this;
Measured voltage on PWR/GND which returns 3,2 V. I've measured voltage on GND/Vout on the battery booster which returns 3,36V. However, analogread always returns something like 300 +/-10, which (using the formula provided) indicates a voltage of 1,04 V and a battery percentage of ~30%. This has been the case with brand new batteries as well as old ones...
-
@daand83 - this is quite dependent on which code you use I think but it sounds right. A return of 1000 would be 3,3V in my code.
This is my code:
Defines:
//========================= // BATTERY VOLTAGE DIVIDER SETUP // 1M, 470K divider across battery and using internal ADC ref of 1.1V // Sense point is bypassed with 0.1 uF cap to reduce noise at that point // ((1e6+470e3)/470e3)*1.1 = Vmax = 3.44 Volts // 3.44/1023 = Volts per bit = 0.003363075 #define VBAT_PER_BITS 0.003363075 #define VMIN 1.9 // Vmin (radio Min Volt)=1.9V (564) #define VMAX 3.0 // Vmax = (2xAA bat)=3.0V (892) int batteryPcnt = 0; // Calc value for battery % int BATTERY_SENSE_PIN = A0; // select the input pin for the battery sense point //=========================
Setup()
analogReference(INTERNAL); // For battery sensing
Loop()
delay(500); // Battery monitoring reading int sensorValue = analogRead(BATTERY_SENSE_PIN); delay(500); // Calculate the battery in % float Vbat = sensorValue * VBAT_PER_BITS; int batteryPcnt = static_cast<int>(((Vbat-VMIN)/(VMAX-VMIN))*100.); Serial.print("Battery percent: "); Serial.print(batteryPcnt); Serial.println(" %"); if (batteryPcnt > 100) { batteryPcnt=100; } Serial.print(batteryPcnt); Serial.println(" %"); gw.sendBatteryLevel(batteryPcnt);
I think you should measure the voltage on A0 to Gnd and see what you get.
-
@sundberg84 - the only weird part is that analogread() returns a value of 300, which in turn is below VMIN; and hence a negative value (1,04-1,9)/(3,0-1,9) = -78%.
But if I understand you correctly the next two steps in the troubleshooting process would be;
- measure GND/VCC on the atmega-chip as well to make sure that it is indeed not a faulty chip?
- solder a second connection from A0 to the voltage divider to remove any bad connections
Thanks again
-
I have to verify when I get home, but I've probably found the problem... Seems as a stupid copy/paste problem. No call to analogreference(INTERNAL). Don't know how I've been able to overlook this for a week now, but... Will check back with result later on...
-
@daand83 - haha, easy to forget - I also forgot to post in in my example above (changed now)
Only one line of code in a different place... well, hope you found it!
-
@sundberg84 - Indeed missing analogreference. All good now, even got a battery value of 102 %
-
@sundberg84 said:
AMS1117
mmmm I would like to see a board with room for AMS1117 and caps...
While waiting for my Newbie PCBs to arrive I have built my own test sensor on a bit of breadboard. Got the new 0,8-3.3v to 3.3v today. My boosters. So, I just cut the trace going from the battery to the rest of the components and arduino and there I connected my booster. VIN directly from bat + and gnd from bat -, Also, everything else that need GND is connected to the same place. I then reconnected the plus power rail to the power coming from the booster. I also moved the radio connection so that if feed directly from the battery. Measurements show me 3.3 v to arduino and other sensors and about 2.9 to the radio directly from batt. Something does not want to work. It is something with the power to the radio. Running sensor on battery only, no booster, works just fine. Running node with everything on vout from the booster, it just won't work. The radio struggles to do something useful but it fails. Running radio on batt and the rest on booster does not work. 'But, if I power the node with power from the serial adapter. the node woks again but only if the battery provide power to the radio at the same time.
Any suggestions? Quite tired, can be messy
-
@NiklasO - do you have any serial log?
2,9V should be just fine for the radio, but it might freeze with spikes from booster or other power circuit. A 0,1cap from Out to Gnd on the booster might help.Try to remove the booster and verify if the radio works then - if so, its the booster. If not try another radio - we know the radios is very different quality sometimes.
-
Hello, I think @sundberg84 is right, you need some capacitors to filter the noise from the booster, the best is to put the same than those that are on EasyPCB (top of the voltage regulator).
Even if you power the radio directly from the battery, the booster will generate some noise if you use it to power the board, as they have the same GND.
-
@sundberg84 said:
@NiklasO - do you have any serial log?
2,9V should be just fine for the radio, but it might freeze with spikes from booster or other power circuit. A 0,1cap from Out to Gnd on the booster might help.Try to remove the booster and verify if the radio works then - if so, its the booster. If not try another radio - we know the radios is very different quality sometimes.
Thanks for the answers guys!
Everything works as it should when all on battery.
Out to GND already have a cap. The same one the radio use? If it sits between radio vcc and gnd-pin that would be the same as between Vout and GND on the booster, right? I have tried with caps at 0,1 - 100uF. The current one is at 47uF. The serial log say stuff about signing error and other like !TSM:UPL:FAIL when radio on battery and the rest on booster Vout. Reports radio OK at start. All has the same GND.
The multi meter show a quite stable 3.3v output from the booster but I don't have any oscilloscope to see the eventual noise. I have tried different boosters but all are probably the same batch, marked "Canton-power" I think. Also, the radio seem to freeze the Gateway. My sensor tries to communicate with the gateway (I have green, yellow, and red leds connected to both gw and my testsensor). On the sensor the yellow and green blink momentarily and then it greets me with angry red led blinking at me. The gateway does the same ofc but often it freezes with all the three leds constantly on. To make the gateway accept connections again I have to reset it but this does only happen with this troublesome sensor with radio on bat, rest on booster. Other than that the gateway works great with my other sensors (all on battery only for now).
-
You have to combine different capacitor values to have some efficient filtering.
If you respect what is implemented on EasyPCB board you should have :- 0.1µF and 10µF as close as possible to the booster output
- your 47µF as close as possible to the GND/VCC of the radio
Location of capacitors is important as if they are far from the radio for example, the wires to the radio act as antenna and will catch noise generated by the booster. So in addition to the capacitors at the right position, try to have wires going to the radio as short as possible.
-
@Nca78
Ok, thanks.
I'll try some more.
-
My Dirty boards arrived today! Woho! Got 12 of them.
-
Just wanted to say that my first sensor on this board works great! Measuring passives in place. Worked first try.
On battery, with booster and one DS18B20 temperature sensor.Great work @sundberg84!
-
@sundberg84: I have plan to use your pcb to build ethernet gateway, thus I want to use NRF24L01+ radio with external antenna. In this case it's more than recommended to use external power to supply the radio as pro mini has not enough juice to feed radio properly. Could you please give me some hint how to do it in most elegant way? I think it should be enough to do not solder radio's vcc and gnd pins to pcb, but to connect external power supply to these pins with hardsoldered capacitor. What do you think?
-
@fisher - that is exactly what I did... i made a external "powerpcb" which i could connect the radio to and the node (Arduino + Ethern module) to. This way I didnt feed the radio from the arduino. Be sure to use a voltage regulator with a good ampere output.
Check this: https://www.openhardware.io/view/207/Mysensors-20-ethernet-gateway-W5100-build
-
@sundberg84: thx for the quick response. I saw your post with external ethernet gateway but I'd like to avoid use of jumper wires and use your newbie psb instead
-
@fisher - well, the only option then is to use a 3.3v arduino on my PCB and BAT jumper. Then make sure you have a steady 3.3v on PWR on the PCB. If you have any units (like ethernet module?) that needs 5v you need a step up for this... i guess there are many ways to solve this but I have not tried them so you need to experiment a little.
-
@sundberg84: I think I have to abandon my idea to use Newbie PCB as there is slightly different wiring required for connecting w5100 module. I will solder it on prototype board instead. Thanks for your help
-
@sundberg84
I really like this design. Do you have plans to make a version for the RFM69W radio? Shouldn't be to difficult but with the free version of eagle, I can't edit your design.
-
@FotoFieber - that shouldnt be any problem editing. Do you try to open the gerber files, you need to open .sch and .brd
-
So I have one more flaw to point out in the board that I didn't notice before. I also have a question regarding powering the nano. I'll start with the problem and this is for @sundberg84 . Some weeks back I posted some suggestions and differences that I noticed in the revisions of the boards. This was the pic:
When I posted that, you noted that for the capacitors, the G denotes ground. If you look at the blue board on the right which is the one that I have, you have the G marked on the left leg of the capacitor. If you measure continuity from that pin to the large ground tab for incoming power, you will notice that that is not ground. The one on the right is. Since I got the boards, I have always teeted for continuity for my ground legs, so I haven't had any issues, but for a newbie, which is what the board is geared toward, there could be issues.Now on to my question regarding power. So I am building another node and I am using the 5 volt version of a Recom power module .
Seeing that this is a 5 volt output, I would think I should be able to go directly to the 5 volt in on the nano, but what is the best way to wire this if I am using a screw terminal connector to bring my power in? The RAW power pad goes to the regulator input on the nano, and the PWR pad goes to the battery booster which I am not using. I would also guess that I would need to jumper the BAT pads. Would I then too want to remove the regulator from the nano, or won't that matter?Any help is appreciated.
-
@dbemowsk - thanks for your unput! I have checked my project and changed the G label.
I will also make an notise on openhardware!You should be able to use that just fine as power. Most people here use HLK-PM01 but this might be a great addition! (Havent seen it before).
Check this thread out: https://forum.mysensors.org/topic/1607/safe-in-wall-ac-to-dc-transformers. You should connect it to PWR and GND with REG jumper short.
-
@sundberg84 said:
this might be a great addition! (Havent seen it before).Unfortunately it's not the same price range as HLK with 12$95 from all suppliers linked from their website.
Could still have been nice if it had "physical" advantages compared to HLK but it's bigger and with lower power.
So it's got the safety of a German product left, but HLK is safe enough provided we get a genuine one.Interesting part is the recommended circuit which is similar to the one suggested here for the HLK with input fuse, varistor for use with 230V source and optionnal output capacitor to reduce ripple. No temperature fuse but I suppose with bigger size, lower power and higher quality components it's getting really overkill.
-
I ended up ordering 3 of these. I got them from this site. It wasn't till after I ordered them that I saw a post on here about the HLK-PM01 modules. I see the better advantages of the HLK series, cost being the big one, and will order these in the future as needed, but I am just trying to use up the 3 of these that I have.
I have another project I am working on where I might order some HLK-PM12 modules. I ended up getting a lot of 10 - 12 or 24 volt relay modules for free that I figure I can use in some projects. I wish they were 5 volt, but it's hard to argue with FREE.
-
Hello,
I'm using the temperature sensor (DS18B20) on a card v8.
Ok if I use a 18650 battery, if I use a CR2032 coin battery, the sensor does not work.
I have to make some adjustments?
-
@fabix68 Your problem might be in the fact that the 18650 battery is a 3.7 volt battery, where the CR2032 is only a 3 volt. The extra 0.7 volts will make all the difference. If you use a CR2032, there are a few things you want to do. The first thing is that you need a battery booster. This will boost your power from 3 volts to the needed 3.3 for the nano and the radio. Next is to remove the LED from your nano. This will put unnecessary load on your battery and drain it much faster. You may even want to remove the regulator from the nano.
-
I'm already using a booster to the battery and removed led and regulator. I partially solved by inserting in parallel to battery a 10mF capacitor
-
What are your setup @fabix68 ? If you are using a 3.3v arudino straight on it will not work.
Please describe your setup and hardware and not only your battery,
-
I'm using Arduino mini pro 3.3v to which I removed led and regulator, battery boster and tamper on batt.
I attach the photo
-
@fabix68 should work just fine.
Whats your issue? Any serial output?
-
Now, with the capacitor on the VCC, it seems to work, even if the range is smaller. It will be to evaluate the battery life
-
Hello, don't waste your CR2032 yet, as it is now you will be lucky to last a few days ...
CR2032 and other lithium cells with the same chemistry have a strong internal resistance. It means the more current you draw from them, the more energy you will waste because of this internal resistance. It makes the voltage drop and it means your battery booster will need more and more current to maintain the output voltage = vicious circle with more and more energy wasted.
Your solution is not to add a battery booster but to use another sensor that will be able to run at low voltage: BMP180/BMP280/BME280 or SHT21/SI7021. They have a very low power consumption (unlike ds18) and will accept Vcc voltage below 2V. I would suggest the SHT21/SI7021 as it's easier to use and will go in sleep mode between measurements without any action from you.
Without battery booster you will also have a much increased range as the booster generates a lot of noise that perturbates the radio.
You will also need to:- add a big capacitor (at least 100µF) in parallel with the battery to ease out the current peaks
- remove the voltage regulator as it's still on your pro mini at the moment
- adapt your sketch to sleep (with 200ms you should be ok) between all consecutive radio calls. Don't forget to do it in the presentation method as it's the most sensible part, before it's called the library has already done many radio calls that made your battery voltage drop. You should begin the presentation method with a sleep.
- update the fuses on your pro mini to remove the BOD which is by default at 2.7V and will limit the total power you will get from the battery
- use a brand name cell, the cheap chinese no-name cells will have much lower real capacity available, voltage will drop much faster.
-
@Nca78 said:
SHT21
Nca78 thanks for the reply.
I did not know the SHT21 sensor, it looks like a good alternative also DHT22.
I've already added a capacitor and view the trace output with the oscilloscope, it is clean, why not explain the decrease in range.
With regard to the program, has been provided for the sending of data every 5 minutes, if it changes from the previous value, to then return to sleep.
I never tried to change the fuse on the PRO. I believe that this is the solution. Run it at minimum frequency, remove the BDO so you can also remove the battery booster.
-
I am wondering on the Rev 8 boards how much room there is around the outer mounting holes to drill them a bit larger? Is this just a dual layer board or are there other sandwiched layers in it that might be affected if I drill them larger?I have been trying to find a decent way to mount these and stack them with other boards, but I'm not having much luck. The project I am working on right now is a revised board for my garage door controller and I have my power supply circuit on a piece of proto board and I want to stack the newbie PCB on top of it, but can't find standoffs that small, and I am having real trouble even finding screws that will fit the holes. Has anyone done mounting of these? If I can find screws and mounting hardware that will work without having to drill the holes bigger I am all for it.
-
@dbemowsk said:
I am wondering on the Rev 8 boards how much room there is around the outer mounting holes to drill them a bit larger? Is this just a dual layer board or are there other sandwiched layers.
Its a dual board - drill as much as you want, you can see all traces. In my upcoming rev the holes are bigger. I have recieved this feedback and are improving this.
-
@sundberg84 said:
In my upcoming rev the holes are bigger. I have recieved this feedback and are improving this.
what should be on the next rev ?
-
@Lior-Rubin Changelog so far:
- Bigger mounting holes 2.5mm
- IRQ Jumper from Radio. This makes this trace disabled and D2 can be used for interupts unless jumper is connected.
- BAT and REG jumpers changed positions for better tracing.
- MysX 2,6
- Text on voltage regulater (Vout/Vin/Gnd)
- Bug with G on CAP now on the right side.
Release and if there will be more things added I dont know.
Any suggestions?
-
In power input I would suggest moving GND to the middle of VCC/RAW so you could using a 2 pin block for GND/RAW like what is shown in post 205. Might cause tracing issues though for you.
-
@Qu3Uk - its a good suggestion.
I will se what I can do.
-
@sundberg84 I may suggest the following:
- place for Temp\Hum sensor
- place for Light sensor
- ability to use AC to DC (3\5v) in the board
- ESP8266 option rather than Arduino (maybe 2 versions)
- TX\RX connection or FTDI connection
-
I had mentioned this before, but the electrolytic capacitors wer put in the design using a ceramic capacitor designation which doesn't allow room for correct placement of capacitors. The main one is the one near the radio. The pads for the cap are spaced too far apart for a small electrolytic, and they are too close to the connector requiring that the capacitor leads be bent toward the radio connector to be able to get it to fit.
-
@Lior-Rubin @dbemowsk - thanks you for the suggestions. I will take them into consideration!
Im not sure I will implement everything because the main purpose of this PCB is to keep it SIMPLE. Its a newbie/easy PCB and to many components and/or other things will make it hard for new members to use.
-
I agree with sundberg84 here. Would it be nice to have those other features? Sure, but then you're limited to what else you can do. This is a GREAT board for many/most sensors around the house. And in regards to light or temp/hum, in my experience it's better to have these detached and in better location for detection while keeping "main" board. more out of sight.
I'll post up some pics of my builds for ideas, but I've built sensors with temp/hum, temp/hum/motion (both battery powered running for over 7 months) and my latest a Neopixel multi strip driver for kitchen cabinets using 5v regulated power. And I haven't had any issues with the cheap through hole ceramic caps for .10uf or the electrolytic caps for 4.7 or 10uf sizes on this board
-
Only issue I've have was with resistor to D3 which I don't use. My first board I put a resistor there and when doing a trace noticed I was constantly getting regulated 3.3v and it fried my dht11. Might Have been I interpreed the purpose of it wrong as I am new to electrical engineering, but I digress. I just power the dht of of vcc and gnd in prototype area and wire sensor outpUT directly to D3 breakout. No resistor.
My biggest challenge is finding/building quality quick connects for quick changes and mods /addons. I've reverted to Barrel connectors as they're easily available and can get pigtail versions and panel mount Versons easily
-
I too agree with @sundberg84 and @rchamp. You ask for a spot for all these different sensors, well it has it with the small proto area. If you make it specific to certain sensors you are limiting it's flexibility. the proto area as it sits is big enough, if I want to put a temp/humidity sensor, light sensor, motion sensor or whatever else, I can wire the connectors in the proto area. If anything, I might say to make that proto area even one row bigger in each direction to give a tad more room for maybe resistors or capacitors that may be needed for some sensors. May give a little more flexibility for if you wanted to do a multi sensor board.
@Lior Rubin, you said "ESP8266 option rather than Arduino " did you mean "ESP8266 option rather than nRF24"? Also,why would you need to put an TX/RX or FTDI connector. IF you use pro mini , it has the FTDI connector on it already.
-
@sundberg84 I hit this post again today with the intention of finally biting the bullet and buying some boards - but then I saw your notes about the next revision of the board. Could you tell me when you're expecting to release that? Is it worth me waiting a while?
Thanks!
-
@velkrosmaak - I dont know - im in the middle of another project and it wont be any bigger changes.
See the changelog above.
Only thing that can matter if you planning to do a project with 2 interupts that need D2 and D3,
-
@dbemowsk said:
@Lior Rubin, you said "ESP8266 option rather than Arduino " did you mean "ESP8266 option rather than nRF24"? Also,why would you need to put an TX/RX or FTDI connector. IF you use pro mini , it has the FTDI connector on it already.
I meant to use the ESP8266 option rather than the pro mini+nrf24. So to transfer the sensors to use IP and not radio.
for the FTDI, the connection on top of the arduino board is hard to connect because of the terminals.
-
@Lior-Rubin said:
I meant to use the ESP8266 option rather than the pro mini+nrf24. So to transfer the sensors to use IP and not radio.
for the FTDI, the connection on top of the arduino board is hard to connect because of the terminals.
As for the FTDI connector, you have a few options. You can switch the right angled header pins for straight ones and plug in vertically. Option 2 is to mount it reversed pointing away from the terminals. Option 3, which is what I do, is to mount the Pro Mini with female header strips on the board. The ones that I use bring it up high enough where the FTDI connector clears the terminals if I use them. Doing it that way gives you the added benefit of being able to remove the pro mini and swap it if there is a problem.
-
@sundberg84 said:
Only thing that can matter if you planning to do a project with 2 interupts that need D2 and D3,
Even for that the current version is not a big problem. Just cut or unsolder the interrupt pin on the NRF24.
-
Hi
Do anyone have a working sketch for a 2xAA battery powered DHT22 with Mysensors 2.0 that works with this pcb rev.8 ?//PT
-
@pettib - almost https://github.com/sundberg84/MySensors2.0.0/blob/master/UVSensor/UVSensor.ino
This is a UV sensor - so everything else works. Just exchange the UV code for DHT22 code.
-
Thanks. I will try this.
//PT
-
Hi guys!
Any suggestions as to why my voltage on 3.3 is either battery voltage (if BAT is short circuited) or 0v if BAT not short circuited. I have the same problem on two boards so I guess I´ve done the same mistake twice and that it´s not H/W error.. This means the radio doesn´t work unless I have brand new batteries or hook it up to USB for programming..
-
@ChrisW, I am assuming you are using 3.3v nanos. What are you using for batteries? Where are you measuring your 3.3v? I am assuming that you are measuring it on the radio on pin 2. When using the power booster at 3.3v, first measure the output power of the booster at the pin closest to the RAW input. If you have your 3.3v there, then you need to add a jumper to the regulator pads since you are not using a 3.3v regulator (below the 0.1uf and 10uf capacitors) for the radio. That jumper needs to go between the 2 pads near the flat edge of the regulator silkscreen. You can also jump the lower two pins from the BAT and REG jumpers, that does the same thing. This jumps your 3.3v over to the radio power in. DO NOT put a jumper across BAT. Adding that can ruin your radio if you put more than 3.3v on your PWR in from your batteries. The nRF24L01 radios are sensitive to the power applied to them.
-
@ChrisW - im sorry, Im dont really understand you - english isnt my first language, could be why.
Could it be a short somewhere? and booster is mounted in the correct way? Please describe some more and answer the questions @dbemowsk asked and im sure we can figure it out.
-
@dbemowsk , yes I am using the 3.3 nano.
I´m using 2 regular AA batteries 1,5 V. I am measuring on VCC for radio, which should be boosted to 3.3V.
VCC on the left pin layout is 3.3, the 3.3-pin is same as battery.Booster output is 3.3V.
I was unaware of the need for voltage regulator to the radio - since I´m going with 3.3 all the way I never realized this. That´s probably the culprit right there.I´ll try your suggestion tomorrow and see if it works out. Thank you for your time.
@sundberg84 , det är OK, det är inte mitt förstaspråk heller..
Tack för ett bra nybörjarpaket - väldigt enkelt att få ihop en bra hobbysensor!
Jag misstänker att det är som dbemowsk säger - att jag skulle haft en booster till radion också.
-
@ChrisW - Hi! (Writing in english so all can understand, även om det inte behövs )
When you are using 3.3v pro mini and booster with BAT jumper it should not be 3.3v over the radio. This is because the booster generates alot of noice and the radio can handle down to 1.9v without any issues. This is how the PCB was designed due to learning by doing. The radio uses what comes raw from the batteries without booster. Evreything else on the PCB is boosted.
If you are using 2xAA you should be able to run the it beteen 1.9V and 3V (which is most of the batteries since the voltage drops pretty fast below that).
-
@ChrisW said:
I was unaware of the need for voltage regulator to the radio - since I´m going with 3.3 all the way I never realized this.
That's what I was trying to explain. You do not need the regulator, but the board is set up to use one in the event that you might use a 5 volt nano. That is why I mentioned adding the jumper wire. That is to jumper the input and output pins of where the regulator would normally go IF you were using a 5 volt arduino.
EDIT:
@sundberg84 I think we were typing messages at the same time. I did not realize that the radio could run at that low of a voltage. My method jumps the boosted 3.3 volts over to the radio. Shouldn't adding the 0.1uf and 10uf caps attenuate the noise from the booster when jumping the regulator pins?
-
@dbemowsk - What I know the booster generates ALOT of noice and are really dependent of the quality of the booster. They are expensive as it is and if you buy the china ones its a big risk you get disturbance to the radio even if you use caps!
I would not recommend to jump the boosted voltage to the radio. It might work in some cases (depending on the hardware) but there is a risk doing it.
Some boosters even generate so much noice that even if you havent it connected directly to the radio it doesnt work.
-
Hiya Sundberg
I think Im having boost converter noise issues from a dodgy ebay batch.
I have soldered up 11 of your boards to date and two are real flaky.
Aside from swapping out the boost converter is there a way to reduce the noise? 0.1UF cap across the radio power/gnd pins? Or across the GND and output pins of the booster itself?
They are kind of expensive so dont want to bin them if I can bodge up a fix...
Thanks,
Matt
-
@Matt - Hi!
This issues has been addressed in the thread before, see if you can find it.
I have had luck with a 0,1 ceramic cap on the booster from out to GND. There is more advances methods to reduce noice which I haven't tried but you can read about them above in the thread somewhere. As you said they are a bit pricey but some boards have I just not been able to fix due to really bad booster and scrapped.
-
@sundberg84 Hiya yep found it, starts with your post 30th June 2016.
To be honest its a bit over my head, inductors. ferrite beads etc. A picture of what to solder where would help.
I did try to 0.1uf cap across OUT and GND but the things still only work for a minute then go silent.
I will desolder existing booster then add a jumper from vin to vout to see how stable they are with a good solid battery supply.
If they are reliable I will order some more boosters, but it seems a bit hit and miss as to reliability...
Unless someone can post a pic or explain (for dummies) how to filter the booster effectively?
I should pull out my scope, which involves tidying my workbench, not a task I undertake lightly....Thanks,
Matt
-
Have been doing some investigation of the boost converters, just with my DMM, which doesnt have frequency function.
However it can measure ac ripple. On the working boosters there is a ripple amplitude of around 0.02V. On the flaky ones its anything from 0.03 to 0.05V. So this makes it easy for me to test to converters before comitting them with solder.
-
@alexsh1 I know its a bit historical but could you post a pic or explain how you connect the lc-filter to the boost converter? Having issues here, 0.1uf cap didnt help...
Thanks....
-
@Matt - It was some time ago now i experienced with this... but something like this:
and to be hones maybe it was from ground (middle pin) to vin (left pin)... try both, cant do any harm. As I said - in most cases it works... I buy 10 and 10 batches and around 7-8 works good enough.
-
@sundberg84 thanks, that is how I have soldered the 0.1uF cap but it hasnt improved things.
I was hoping @alexsh1 would be happy to chip in here and show me how to solder the 220uf cap and 3.3uH choke?
-
-
@AWI hey thanks! I especially like this
Although.... Something tells me L should be in series on Vout, sureley if it was between BAT and 3.3 voltage weird things would happen....
Might be time to finally try to figure out how to use that cheap old scope in my garage...
Also, as it happens, am just getting in to RC stuff (well for my son, but you know...)