💬 Easy/Newbie PCB for MySensors
-
Thanks Stephen. connected both and i can now see what is going on :-)
-
Hey, @sundberg84 , I am trying to order the rfm69 version from ITEAD and their M.Rev1 file I downloaded looks to be your v9. Can you upload the v10 to them so I may place an order?
@ElCheekytico - I dont know why they wont update to rev 10. I have uploaded the new revision to openhardware... nothing else I can do, sorry.
-
Thanks Stephen. connected both and i can now see what is going on :-)
@pierre1410 - I would suggest you connect the battery, and then the usb/ftdi cable, but only GND, TX and RX fro the usb connection. This will have the node running on the batteries VCC and get you closer to the real deal. Using VCC from the usb adapter might be higher VCC than the batteries, and in worst case scenario it works great with that connected but not when you deploy and only use battery power.
-
@pierre1410 - I would suggest you connect the battery, and then the usb/ftdi cable, but only GND, TX and RX fro the usb connection. This will have the node running on the batteries VCC and get you closer to the real deal. Using VCC from the usb adapter might be higher VCC than the batteries, and in worst case scenario it works great with that connected but not when you deploy and only use battery power.
@sundberg84 that is exactly what i experienced. thanks for the tip. struggling in fact to have my PIR sensor running on 3.3V. when i connect to the pin on the right of the board (3rd from top).. Arduino IDE serial terminal does not outcome any coherent information.
-
@sundberg84 that is exactly what i experienced. thanks for the tip. struggling in fact to have my PIR sensor running on 3.3V. when i connect to the pin on the right of the board (3rd from top).. Arduino IDE serial terminal does not outcome any coherent information.
@pierre1410 ok - well not to get your hopes down but a motion detector on batteries are one of the harder builds. If you are using a booster with the batteries it's harder due to false triggers from the booster noice. Also I believe the quality of your motion detector module determine if it's possible..I've had detectors running fine on 3.3v but several which didn't.
-
Hello, Is there a way to solder a DC-DC booster 3.3V to 5V directly onto the Easy PCB or should it be connected separately to power a PIR for instance? and would that really prevent using 2xAA batteries to power the all thing? have tried to step down the PIR to work at 3.3V but it was not conclusive. Thanks a lot.
-
Hello, Is there a way to solder a DC-DC booster 3.3V to 5V directly onto the Easy PCB or should it be connected separately to power a PIR for instance? and would that really prevent using 2xAA batteries to power the all thing? have tried to step down the PIR to work at 3.3V but it was not conclusive. Thanks a lot.
@pierre1410 - you can always use the prototyping area for a 3.3 to 5v booster but... booster + PIR might cause false triggers, so choose your booster wisely.
-
@sundberg84, had to migrate my gateway to Ethernet in the meantime but now I am on the PIR/ battery case. i have my booster to 5V in.. will post the results of it...
-
@sundberg84, had to migrate my gateway to Ethernet in the meantime but now I am on the PIR/ battery case. i have my booster to 5V in.. will post the results of it...
-
Hello
I think there is a mistake in your code (on github) to mesure battery.
The array have 4 values, but you divide by 3. So you get to high result.
https://github.com/sundberg84/HomeAutomation/blob/master/BatteryMeasurer/BatteryMeasurer.ino
On line 77Everything else is ok in my case :) the board works well with 2 battery AA, and 47uF cap (not with 4.7uF) .
-
Hello
I think there is a mistake in your code (on github) to mesure battery.
The array have 4 values, but you divide by 3. So you get to high result.
https://github.com/sundberg84/HomeAutomation/blob/master/BatteryMeasurer/BatteryMeasurer.ino
On line 77Everything else is ok in my case :) the board works well with 2 battery AA, and 47uF cap (not with 4.7uF) .
Nice catch @barrydou
The bat array is declared to hold 3 elements
int batArray[3];but then 4 values are fetched
batteryPcnt = (batArray[0] + batArray[1] + batArray[2] + batArray[3]);batArray[3] is outside of the array, so the ram here could hold any value.
The code should probably be changed to this
batteryPcnt = (batArray[0] + batArray[1] + batArray[2]); -
@mfalkvidd : I think you have to change the condition in if too :
if (batLoop > 1) {With that, batLoop = 2 when entering in the if (so the 3 values of the array are filled : 0, 1, 2), calculating the average and reseting the batLoop to 0.
If not modify, the array will be set with batArray[3] just before entering theif (batLoop > 2) {Other way is to set the batArray size to 4 values, and divide by 4 (I'm actually trying that).
-
@mfalkvidd : I think you have to change the condition in if too :
if (batLoop > 1) {With that, batLoop = 2 when entering in the if (so the 3 values of the array are filled : 0, 1, 2), calculating the average and reseting the batLoop to 0.
If not modify, the array will be set with batArray[3] just before entering theif (batLoop > 2) {Other way is to set the batArray size to 4 values, and divide by 4 (I'm actually trying that).
@barrydou @mfalkvidd - thanks.
Wouldnt it be easiest to just "+ batArray[3]" so it isbatteryPcnt = (batArray[0] + batArray[1] + batArray[2]the declaration = 3 elements
batterypct = 3 elements
batloop > 2 should be correct (0,1 and 2)I dont think the code has made any faulty readings since the declaration is only for 3 elements, making batArray[3] never used? (Or always been 0). The batteryPcnt is then divived by 3.
-
@barrydou @mfalkvidd - thanks.
Wouldnt it be easiest to just "+ batArray[3]" so it isbatteryPcnt = (batArray[0] + batArray[1] + batArray[2]the declaration = 3 elements
batterypct = 3 elements
batloop > 2 should be correct (0,1 and 2)I dont think the code has made any faulty readings since the declaration is only for 3 elements, making batArray[3] never used? (Or always been 0). The batteryPcnt is then divived by 3.
-
We must be ordering EasyPCB alof from PCBway since they used it as an example board for this youtuber:
-
We must be ordering EasyPCB alof from PCBway since they used it as an example board for this youtuber:
@sundberg84 haha gorgeous, I think they only sent open hardware boards, and ran some batches from boards available on openhardware, as except the perfboards they send as free gifts the other real PCBs are MySWeMosIRShield by @emc2 and the RollerShutterNode by @Scalz
https://www.openhardware.io/view/385/MySWeMosIRShield-IR-blaster-shield-for-WeMos-D1
https://www.openhardware.io/view/22/Roller-Shutter-Node -
Looks nice in red ;)
-
hello, i have a stupid question... on the 3 rows below VCC and GD on your prototyping area; are the rows connected horizontally like a breadboard? thanks
-
hello, i have a stupid question... on the 3 rows below VCC and GD on your prototyping area; are the rows connected horizontally like a breadboard? thanks
@pierre1410 - no stupid questions, simple answer though, no :)

-
Hello Sundberg84 et al,
I purchased Easy Newbie PCB (Rev 10) with the hope of jumping into the IoT rave... I tried to create the Gateway - and it works perfectly. I also found and created an advanced Water Sprinkler MyS project by Pete and Co!... that also worked perfectly.However, I cant seem to get simpler beginner sketches to work with EasyNewbie. I have soldered the need components (the regulated version). I plan to connect to a 4 relay module, but for now, I am simulating the relay with a simple LED attached to D2. I have uploaded the following sketch which was originally written for version 1.0 MySensors - but have been corrected using guidelines I found for converting 1.0 - 2.0 version. but still no cheese - the controller (Domoticz) displays the Node, but not the complete child nodes, - the LED connected to pin D2 (or D3, D5..) on the Easy Newbie doesn't light up even when I toggle the switches and devices on controller. Don't know what I might be doing wrong, please help.
// Example sketch showing how to control physical relays. // This example will remember relay state even after power failure. // Enable debug prints #define MY_DEBUG // Enable and select radio type attached #define MY_RADIO_NRF24 #define MY_NODE_ID 4 // Set this to fix your Radio ID or use AUTO or 1 #define MY_REGISTRATION_FEATURE // Forece registration #define MY_REGISTRATION_RETRIES 5 #include <Wire.h> #include <TimeLib.h> #include <SPI.h> #include <MySensors.h> #include <LCD.h> #include <LiquidCrystal.h> #include <LiquidCrystal_I2C.h> // For Debug #ifdef DEBUG_ON #define DEBUG_PRINT(x) Serial.print(x) #define DEBUG_PRINTLN(x) Serial.println(x) #else #define DEBUG_PRINT(x) #define DEBUG_PRINTLN(x) #define SERIAL_START(x) #endif //#define RELAY_1 2 // Arduino Digital I/O pin number for first relay (second on pin+1 etc) #define RELAY_PIN 3 #define NUMBER_OF_RELAYS 4 // Total number of attached relays #define RELAY_ON 0 // GPIO value to write to turn on attached relay #define RELAY_OFF 1 // GPIO value to write to turn off attached relay #define SKETCH_NAME "Base Relay Node" #define SKETCH_VERSION "0.1.2" #define CHILD_ID 0 MyMessage msg(1,V_LIGHT); //void before() void setup() { for (int sensor=1, pin=RELAY_PIN; sensor<=NUMBER_OF_RELAYS; sensor++, pin++) { // Then set relay pins in output mode pinMode(pin, OUTPUT); // Set relay to last known state (using eeprom storage) digitalWrite(pin, loadState(sensor)?RELAY_ON:RELAY_OFF); } } void presentation() { sendSketchInfo(SKETCH_NAME, SKETCH_VERSION); // Fetch relay status for (int sensor=1, pin=RELAY_PIN; sensor<=NUMBER_OF_RELAYS; sensor++, pin++) { // Register all sensors to gw (they will be created as child devices) // present(sensor, S_BINARY); present(sensor, S_LIGHT); // Then set relay pins in output mode pinMode(pin, OUTPUT); // Set relay to last known state (using eeprom storage) boolean savedState = loadState(sensor); digitalWrite(pin, savedState?RELAY_ON:RELAY_OFF); send(msg.set(savedState? 1 : 0)); } DEBUG_PRINTLN(F("Sensor Presentation Complete")); } void loop() { // Alway process incoming messages whenever possible // Sleep until interrupt comes in on motion sensor. Send update every two minute. // sleep(digitalPinToInterrupt(DIGITAL_INPUT_SENSOR), CHANGE, SLEEP_TIME); // update Relays; for (int sensor=1, pin=RELAY_PIN; sensor<=NUMBER_OF_RELAYS; sensor++, pin++) { // Register all sensors to gw (they will be created as child devices) // present(sensor, S_BINARY); send(msg.set(sensor).set(false), false); wait(50); } } void incomingMessage(const MyMessage &message) { // We only expect one type of message from controller. But we better check anyway. if (msg.type==V_STATUS) { // Change relay state digitalWrite(msg.sensor-1+RELAY_PIN, msg.getBool()?RELAY_ON:RELAY_OFF); // Store state in eeprom saveState(msg.sensor, msg.getBool()); // Write some debug info Serial.print("Incoming change for sensor:"); Serial.print(msg.sensor); Serial.print(", New status: "); Serial.println(msg.getBool()); } }