Skip to content

Hardware

Talk about fun sensor hardware, MCUs, PCBs and how to power your sensors here.
1.8k Topics 18.3k Posts
  • stm32 sleep support

    14
    1 Votes
    14 Posts
    2k Views
    H
    @rozpruwacz I have also my "own" nrf52840 mySensors board (50m33mm) which we designed together with ranseyer (made for a few cents). The small nRF5280 modules from RFstar which are on our relatively small mySensors board (which the mySensors 2.6 standard pinheader) cost around 5€. So I consider them as very cost effective. One of the very interesting MCU's a few of us have tried is the TI CC1352(P) which has 2,4GHz and 868MHz on-board, so you can use one of theme or both together, but there are only a few modules available and they cost almost 30€ and you need to place them on your own board such as the nRF52840 or any other modules which are meant to solder on own designed boards.
  • About DS18B20 onewire.

    dallas one wire onewire ds18b20
    48
    0 Votes
    48 Posts
    12k Views
    pepsonP
    But.... Can you also help me to add to this sketch option to send to example to Home Assistant also DESCRIPTION to each sensors ? And description will be get from sketch from name about address sensor ? As in this sketch which i have for relay: #define USE_EXPANDER // Enable debug prints to serial monitor //#define MY_DEBUG #define MY_GATEWAY_SERIAL #include <MySensors.h> #include <Bounce2.h> #ifdef USE_EXPANDER #include <Wire.h> // Required for I2C communication #include "PCF8574.h" uint8_t expanderAddresses[] = {0x20}; const int numberOfExpanders = sizeof(expanderAddresses); PCF8574 expander[numberOfExpanders]; #define E(expanderNo, ExpanderPin) (((expanderNo+1)<<8) | (ExpanderPin)) #endif // No Button Constant #define NOB -1 #define MULTI_RELAY_VERSION 9 #define RELAY_STATE_STORAGE 1 const uint8_t RELAY_TRIGGER_LOW = 0; const uint8_t RELAY_TRIGGER_HIGH = 1; const uint8_t RELAY_STARTUP_ON = 2; const uint8_t RELAY_STARTUP_OFF = 4; const uint8_t RELAY_STARTUP_MASK = RELAY_STARTUP_ON | RELAY_STARTUP_OFF; enum ButtonType { MONO_STABLE = 0, BI_STABLE = 1, DING_DONG = 2 // HIGH state immediatly after push, LOW state after release }; typedef struct { int sensorId; int relay; int button; uint8_t relayOptions; ButtonType buttonType; const char * relayDescription; } RelayButton; // CONFIGURE ONLY THIS ARRAY! // Row params: sensor ID - sensor ID reported on MySensor Gateway // relay pin - Expander supported // button pin - <0 for virtual buttons (only available in MySensor Gateway); no support for Expander // relay options - [RELAY_TRIGGER_LOW|RELAY_TRIGGER_HIGH] {RELAY_STARTUP_ON|RELAY_STARTUP_OFF} // button type - [MONO_STABLE|BI_STABLE|DING_DONG] // relay description - reported on MySensor Gateway, can help identify device on initial configuration in Home Automation App, can be empty ("") RelayButton myRelayButtons[] = { {0, 2, A0, RELAY_TRIGGER_LOW, MONO_STABLE, "Ł2 - kinkiet [C10]"}, // WŁ: Ł2 {1, 16, A1, RELAY_TRIGGER_LOW, BI_STABLE, "Salon 2 [A9]"}, // WŁ: Salon 2 {2, 15, A2, RELAY_TRIGGER_LOW, BI_STABLE, "Salon 1 [A10]"}, // WŁ: Salon 1 {3, E(0,1), A3, RELAY_TRIGGER_LOW | RELAY_STARTUP_OFF, BI_STABLE, "Halogen - Taras [B8]"}, // WŁ: Taras {4, 22, A4, RELAY_TRIGGER_LOW, BI_STABLE, "Kuchnia [B2]"}, // WŁ: Kuchnia 1 {5, 23, A5, RELAY_TRIGGER_LOW, BI_STABLE, "Kuchnia - Kinkiet [B3]"}, // WŁ: Kuchnia 2 {6, 28, A6, RELAY_TRIGGER_LOW, BI_STABLE, "Jadalnia 2 [A4]"}, // WŁ: Hall I/Jadalnia prawy {17, 17, A7, RELAY_TRIGGER_LOW, BI_STABLE, "Ł1 - Kinkiet [A11]"}, // WŁ: Hall I/Ł1 prawy {8, 31, A8, RELAY_TRIGGER_LOW, MONO_STABLE, "Garaż [A7]"}, // WŁ: Kotłownia/Garaż {8, 31, A9, RELAY_TRIGGER_LOW, MONO_STABLE, "Garaż [A7]"}, // WŁ: Garaż {10, 14, A10, RELAY_TRIGGER_LOW | RELAY_STARTUP_ON, BI_STABLE, "Halogen - wejście [B4]"}, // WŁ: Drzwi wejściowe {11, E(0,7), A11, RELAY_TRIGGER_LOW, DING_DONG, "Dzwonek [?]"}, // WŁ: Dzwonek {12, 29, A12, RELAY_TRIGGER_LOW, BI_STABLE, "Hall 1 [A5]"}, // WŁ: Hall I/Jadalnia lewy {12, 29, A13, RELAY_TRIGGER_LOW, BI_STABLE, "Hall 1 [A5]"}, // WŁ: Hall I/Wiatrołap {14, 32, A14, RELAY_TRIGGER_LOW, BI_STABLE, "Wiatrołap [A8]"}, // WŁ: Wiatrołap/Hall I {15, 19, A15, RELAY_TRIGGER_LOW, MONO_STABLE, "Kotłownia [B1]"}, // WŁ: Kotłownia/Hall I {16, 24, 53, RELAY_TRIGGER_LOW, BI_STABLE, "Ł1 - Taśma LED [C1]"}, // WŁ: Hall I/Ł1 środek {17, 17, 52, RELAY_TRIGGER_LOW, MONO_STABLE, "Ł1 - Kinkiet [A11]"}, // WŁ: Ł1 {18, 18, 51, RELAY_TRIGGER_LOW, BI_STABLE, "Ł1 [A12]"}, // WŁ: Hall I/Ł1 lewy {19, 6, 50, RELAY_TRIGGER_LOW, BI_STABLE, "Klatka Schodowa [B7]"}, // WŁ: Hall I/Schody 1 {12, 29, 49, RELAY_TRIGGER_LOW, BI_STABLE, "Hall 1 [A5]"}, // WŁ: Hall I/Schody 2 {21, 26, 48, RELAY_TRIGGER_LOW, BI_STABLE, "Gabinet [A2]"}, // WŁ: Gabinet {22, 7, 47, RELAY_TRIGGER_LOW, BI_STABLE, "Hall 2 [B5]"}, // WŁ: Hall II/Schody 1 {19, 6, 46, RELAY_TRIGGER_LOW, BI_STABLE, "Klatka Schodowa [B7]"}, // WŁ: Hall II/Schody 2 {24, 10, 45, RELAY_TRIGGER_LOW, BI_STABLE, "Garderoba [C12]"}, // WŁ: Garderoba {25, 4, 44, RELAY_TRIGGER_LOW, MONO_STABLE, "Pok. nad kuchnią 2 [B10]"}, // WŁ: Pok. nad kuchnią 2 {26, 5, 43, RELAY_TRIGGER_LOW, BI_STABLE, "Pok. nad kuchnią 1 [B9]"}, // WŁ: Pok. nad kuchnią 1 {27, 8, 42, RELAY_TRIGGER_LOW, BI_STABLE, "Pok. nad salonem 2 [B12]"}, // WŁ: Pok. nad salonem 2 {28, 9, 41, RELAY_TRIGGER_LOW, MONO_STABLE, "Pok. nad salonem 1 [B11]"}, // WŁ: Pok. nad salonem 1 {29, 3, 40, RELAY_TRIGGER_LOW, BI_STABLE, "Ł2 [C7]"}, // WŁ: Hall II/Ł2 1 {30, E(0,3), 39, RELAY_TRIGGER_LOW, BI_STABLE, "Ł2 - Taśma LED [?]"}, // WŁ: Hall II/Ł2 2 {22, 7, 38, RELAY_TRIGGER_LOW, BI_STABLE, "Hall 2 [B5]"}, // WŁ: Hall II/Sypialnia {32, 11, 37, RELAY_TRIGGER_LOW, BI_STABLE, "Sypialnia 2 [C9]"}, // WŁ: Sypialnia 2 {33, 12, 36, RELAY_TRIGGER_LOW, BI_STABLE, "Sypialnia 1 [C8]"}, // WŁ: Sypialnia 1 {34, 25, -1, RELAY_TRIGGER_LOW | RELAY_STARTUP_ON, MONO_STABLE, "Halogen - Garaż [A1]"}, // WŁ: Virtual Button 1 {35, 30, -2, RELAY_TRIGGER_LOW | RELAY_STARTUP_OFF, MONO_STABLE, "Ł1 - Wentylator [A3]"}, // WŁ: Virtual Button 2 {36, E(0,2), -3, RELAY_TRIGGER_LOW | RELAY_STARTUP_OFF, MONO_STABLE, "Halogen - wschód [B6]"}, // WŁ: Virtual Button 3 {37, E(0,4), -4, RELAY_TRIGGER_LOW, MONO_STABLE, "Lampki schodowe [C6]"}, // WŁ: Virtual Button 4 {38, E(0,5), -5, RELAY_TRIGGER_LOW, MONO_STABLE, "Lampki podłogowe I [C4]"}, // WŁ: Virtual Button 5 {39, E(0,6), -6, RELAY_TRIGGER_LOW, MONO_STABLE, "Lampki podłogowe II [C2]"}, // WŁ: Virtual Button 6 {40, E(0,0), -7, RELAY_TRIGGER_LOW | RELAY_STARTUP_OFF, MONO_STABLE, "Ł2 - wentylator [C11]"}, // WŁ: Virtual Button 7 }; const int numberOfRelayButtons = sizeof(myRelayButtons) / sizeof(RelayButton); typedef struct { int firstButton; int nextButton; } RelayMultiButtons; RelayMultiButtons relayMultiButtons[numberOfRelayButtons]; uint8_t myRelayState[numberOfRelayButtons]; // MySensors - Sending Data // To send data you have to create a MyMessage container to hold the information. MyMessage msgs[numberOfRelayButtons]; Bounce myButtonDebouncer[numberOfRelayButtons]; //Function Declaration uint8_t loadRelayState(int relayNum, uint8_t forceEeprom = 0); void saveRelayState(int relayNum, uint8_t state, uint8_t useEeprom); void saveRelayState(int relayNum, uint8_t state); void changeRelayState(int relayNum, uint8_t relayState); // MySensors - This will execute before MySensors starts up void before() { Serial.begin(115200); #ifdef USE_EXPANDER /* Start I2C bus and PCF8574 instance */ for(int i = 0; i < numberOfExpanders; i++) { expander[i].begin(expanderAddresses[i]); } #endif // initialize multiple buttons list structure for (int i = 0; i < numberOfRelayButtons; i++) { relayMultiButtons[i].firstButton = -1; relayMultiButtons[i].nextButton = -1; } // find multiple buttons for the same relay (uni-directional list) for (int i = 0; i < numberOfRelayButtons-1; i++) { if (relayMultiButtons[i].firstButton == -1) { int prevRelayButton = i; for (int j = i+1; j < numberOfRelayButtons; j++) { if (myRelayButtons[i].relay == myRelayButtons[j].relay) { relayMultiButtons[prevRelayButton].firstButton = i; relayMultiButtons[prevRelayButton].nextButton = j; relayMultiButtons[j].firstButton = i; prevRelayButton = j; } } } } // if version has changed, reset state of all relays int versionChangeResetState = (MULTI_RELAY_VERSION == loadState(0) ) ? 0 : 1; for (int i = 0; i < numberOfRelayButtons; i++) { // if this relay has multiple buttons, load only first if (relayMultiButtons[i].firstButton == -1 || relayMultiButtons[i].firstButton == i) { // Then set relay pins in output mode #ifdef USE_EXPANDER if ( myRelayButtons[i].relay & 0xff00 ) { // EXPANDER int expanderNo = (myRelayButtons[i].relay >> 8) - 1; int expanderPin = myRelayButtons[i].relay & 0xff; expander[expanderNo].pinMode(expanderPin, OUTPUT); } else { #endif pinMode(myRelayButtons[i].relay, OUTPUT); #ifdef USE_EXPANDER } #endif uint8_t isTurnedOn = 0; if (myRelayButtons[i].relayOptions & RELAY_STARTUP_ON) { isTurnedOn = 1; } else if (myRelayButtons[i].relayOptions & RELAY_STARTUP_OFF) { } else { // Set relay to last known state (using eeprom storage) isTurnedOn = loadRelayState(i, 1); // 1 - true, 0 - false if (versionChangeResetState && isTurnedOn) { saveRelayState(i, 0, 1); isTurnedOn = 0; } } changeRelayState(i, isTurnedOn); myRelayState[i] = isTurnedOn; } } if (versionChangeResetState) { // version has changed, so store new version in eeporom saveState(0, MULTI_RELAY_VERSION); } } // executed AFTER mysensors has been initialised void setup() { for(int i = 0; i < numberOfRelayButtons; i++) { if (myRelayButtons[i].button >= 0) { // No Expander support for buttons (de-bouncing) pinMode(myRelayButtons[i].button, INPUT_PULLUP); // HIGH state when button is not pushed } } // Setup locally attached sensors delay(5000); // Send state to MySensor Gateway for(int i = 0; i < numberOfRelayButtons; i++) { // if this relay has multiple buttons, send only first if (relayMultiButtons[i].firstButton == -1 || relayMultiButtons[i].firstButton == i) { msgs[i] = MyMessage(myRelayButtons[i].sensorId, V_LIGHT); uint8_t relayState; if (myRelayButtons[i].relayOptions & RELAY_STARTUP_ON) { relayState = 1; } else if (myRelayButtons[i].relayOptions & RELAY_STARTUP_OFF) { relayState = 0; } else { relayState = loadRelayState(i); } send(msgs[i].set(relayState)); // send current state } } // Setup buttons for(int i = 0; i < numberOfRelayButtons; i++) { if (myRelayButtons[i].button >= 0) { // setup debouncer myButtonDebouncer[i] = Bounce(); myButtonDebouncer[i].attach(myRelayButtons[i].button); myButtonDebouncer[i].interval(50); } } } void loop() { for(int i = 0; i < numberOfRelayButtons; i++) { if (myRelayButtons[i].button >= 0 && myButtonDebouncer[i].update()) { int buttonState = myButtonDebouncer[i].read(); #ifdef MY_DEBUG Serial.print("# Button "); Serial.print(i); Serial.print(" changed to: "); Serial.println(buttonState); #endif int relayNum = (relayMultiButtons[i].firstButton == -1) ? i : relayMultiButtons[i].firstButton; if (myRelayButtons[i].buttonType == DING_DONG) { if (buttonState == LOW) { // button pressed changeRelayState(relayNum, 1); send(msgs[relayNum].set(1)); } else { // button released changeRelayState(relayNum, 0); send(msgs[relayNum].set(0)); } } else if (myRelayButtons[i].buttonType == BI_STABLE || buttonState == HIGH) { // If button type is BI_STABLE, any change will toggle relay state // For MONO_STABLE, button must be pushed and released (HIGH) uint8_t isTurnedOn = ! loadRelayState(relayNum); // 1 - true, 0 - false changeRelayState(relayNum, isTurnedOn); send(msgs[relayNum].set(isTurnedOn)); saveRelayState(relayNum, isTurnedOn); } } } } // MySensors - Presentation // Your sensor must first present itself to the controller. // The presentation is a hint to allow controller prepare for the sensor data that eventually will come. // Executed after "before()" and before "setup()" in: _begin (MySensorsCore.cpp) > gatewayTransportInit() > presentNode() void presentation() { // Send the sketch version information to the gateway and Controller sendSketchInfo("Multi Relay", "1.2"); // Register every relay as separate sensor for (int i = 0; i < numberOfRelayButtons; i++) { // if this relay has multiple buttons, register only first if (relayMultiButtons[i].firstButton == -1 || relayMultiButtons[i].firstButton == i) { // Register all sensors to gw (they will be created as child devices) // void present(uint8_t childSensorId, uint8_t sensorType, const char *description, bool ack); // childSensorId - The unique child id you want to choose for the sensor connected to this Arduino. Range 0-254. // sensorType - The sensor type you want to create. // description An optional textual description of the attached sensor. // ack - Set this to true if you want destination node to send ack back to this node. Default is not to request any ack. present(myRelayButtons[i].sensorId, S_BINARY, myRelayButtons[i].relayDescription); } } } // MySensors - Handling incoming messages // Nodes that expects incoming data, such as an actuator or repeating nodes, // must implement the receive() - function to handle the incoming messages. // Do not sleep a node where you expect incoming data or you will lose messages. void receive(const MyMessage &message) { // We only expect one type of message from controller. But we better check anyway. if (message.type == V_STATUS) { uint8_t isTurnedOn = message.getBool(); // 1 - true, 0 - false changeRelayState(message.sensor, isTurnedOn); // Store state in eeprom if changed if (loadRelayState(message.sensor) != isTurnedOn) { saveRelayState(message.sensor, isTurnedOn); } send(msgs[message.sensor].set(isTurnedOn)); // support for OPTIMISTIC=FALSE (Home Asistant) #ifdef MY_DEBUG // Write some debug info Serial.print("# Incoming change for sensor: " + message.sensor); Serial.println(", New status: " + isTurnedOn); #endif } } uint8_t loadRelayState(int relayNum, uint8_t forceEeprom) { uint8_t relayState; if (forceEeprom) { relayState = loadState(RELAY_STATE_STORAGE + relayNum); } else { relayState = myRelayState[relayNum]; } #ifdef MY_DEBUG Serial.print("# loadRelayState: "); Serial.print(relayNum); if (forceEeprom) { Serial.print("(byte "); Serial.print(RELAY_STATE_STORAGE + relayNum); Serial.print(")"); } Serial.print(" = "); Serial.println(relayState); #endif return(relayState); } void saveRelayState(int relayNum, uint8_t state, uint8_t useEeprom) { int mainRelayNum = (relayMultiButtons[relayNum].firstButton == -1) ? relayNum : relayMultiButtons[relayNum].firstButton; myRelayState[mainRelayNum] = state; if (useEeprom && (relayNum == mainRelayNum)) { saveState(RELAY_STATE_STORAGE + mainRelayNum, state); } int nextButton = mainRelayNum; // update all buttons while ((nextButton = relayMultiButtons[nextButton].nextButton) != -1) { myRelayState[nextButton] = state; }; } void saveRelayState(int relayNum, uint8_t state) { uint8_t useEeprom = ((myRelayButtons[relayNum].relayOptions & RELAY_STARTUP_MASK) == 0); saveRelayState(relayNum, state, useEeprom); } void changeRelayState(int relayNum, uint8_t relayState) { uint8_t relayTrigger = myRelayButtons[relayNum].relayOptions & RELAY_TRIGGER_HIGH; uint8_t digitalOutState = relayState ? relayTrigger : ! relayTrigger; #ifdef USE_EXPANDER if ( myRelayButtons[relayNum].relay & 0xff00 ) { int expanderNo = (myRelayButtons[relayNum].relay >> 8) - 1; int expanderPin = myRelayButtons[relayNum].relay & 0xff; expander[expanderNo].digitalWrite(expanderPin, digitalOutState); } else { #endif digitalWrite(myRelayButtons[relayNum].relay, digitalOutState); #ifdef USE_EXPANDER } #endif } And in Home assistant show example decription: Ł2 - kinkiet [C10] or for second Salon 2 [A9] etc. Please help me... because it will be good to identify sensors when add to Controller.
  • rboard - Cheap relay/radio/arduino board ~$10

    57
    0 Votes
    57 Posts
    28k Views
    HomerH
    @alowhum said in rboard - Cheap relay/radio/arduino board ~$10: Could you share the sketch? Perhaps others will learn from it too? Great idea! :relaxed: Here it is // Enable debug prints to serial monitor #define MY_DEBUG // Enable and select radio type attached #define MY_RADIO_NRF24 //#define MY_RADIO_RFM69 #include <SPI.h> #include <MySensors.h> #include <DallasTemperature.h> #include <OneWire.h> // Setup Relay bits #define RELAY_PIN 4 // Arduino Digital I/O pin number for first relay (second on pin+1 etc) #define NUMBER_OF_RELAYS 1 // Total number of attached relays #define RELAY_ON 1 // GPIO value to write to turn on attached relay #define RELAY_OFF 0 // GPIO value to write to turn off attached relay // Setup Temperature bits #define COMPARE_TEMP 1 // Send temperature only if changed? 1 = Yes 0 = No #define ONE_WIRE_BUS 14 // Pin where dallase sensor is connected #define MAX_ATTACHED_DS18B20 16 unsigned long SLEEP_TIME = 30000; // Sleep time between reads (in milliseconds) OneWire oneWire(ONE_WIRE_BUS); // Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs) DallasTemperature sensors(&oneWire); // Pass the oneWire reference to Dallas Temperature. float lastTemperature[MAX_ATTACHED_DS18B20]; int numSensors = 0; bool receivedConfig = false; bool metric = true; // Initialize temperature message MyMessage tempMsg(0, V_TEMP); void before() { 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); } // Startup up the OneWire library sensors.begin(); } void setup() { // requestTemperatures() will not block current thread sensors.setWaitForConversion(false); } void presentation() { // Send the sketch version information to the gateway and Controller sendSketchInfo("Temp and Relay", "1.0"); // Fetch the number of attached temperature sensors numSensors = sensors.getDeviceCount(); // Present all sensors to controller for (int i = 0; i < numSensors && i < MAX_ATTACHED_DS18B20; i++) { present(i, S_TEMP); 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); } } } void loop() { // Fetch temperatures from Dallas sensors sensors.requestTemperatures(); // query conversion time and sleep until conversion completed int16_t conversionTime = sensors.millisToWaitForConversion(sensors.getResolution()); // sleep() call can be replaced by wait() call if node need to process incoming messages (or if node is repeater) wait(conversionTime); // Read temperatures and send them to controller for (int i = 0; i < numSensors && i < MAX_ATTACHED_DS18B20; i++) { // Fetch and round temperature to one decimal float temperature = static_cast<float>(static_cast<int>((getControllerConfig().isMetric ? sensors.getTempCByIndex(i) : sensors.getTempFByIndex(i)) * 10.)) / 10.; // Only send data if temperature has changed and no error #if COMPARE_TEMP == 1 if (lastTemperature[i] != temperature && temperature != -127.00 && temperature != 85.00) { #else if (temperature != -127.00 && temperature != 85.00) { #endif // Send in the new temperature send(tempMsg.setSensor(i).set(temperature, 1)); // Save new temperatures for next compare lastTemperature[i] = temperature; } } wait(SLEEP_TIME); } void receive(const MyMessage &message) { // We only expect one type of message from controller. But we better check anyway. if (message.type == V_STATUS) { // Change relay state digitalWrite(message.sensor - 1 + RELAY_PIN, message.getBool() ? RELAY_ON : RELAY_OFF); // Store state in eeprom saveState(message.sensor, message.getBool()); // Write some debug info Serial.print("Incoming change for sensor:"); Serial.print(message.sensor); Serial.print(", New status: "); Serial.println(message.getBool()); } }
  • Piezzo siren/alarm

    26
    4
    0 Votes
    26 Posts
    2k Views
    ben999B
    @fotofieber DC+ one output is really poor and voltage has no impact on noise. I have tested with up to 6S LiPo and there's absolutely no gain as compared to 5V DC AC+ two outputs is a game changer! Much louder right from +/-5V and really a killer @ +/-12V. So that's it: the first iteration of this project will go for a step-up converter from 5V up to 12V for the piezo speaker. Thanks folks! EDIT: could someone suggest a MOSFET (or transistor) that could be used in lieu of the huge (and probably over-sized) TIP120 (that where there, waiting in the drawer :) ). Through-hole is my league. SMD is a bit of a struggle (welding, machining pcb, ...) Thanks again :smiley:
  • nrf51 problem

    6
    0 Votes
    6 Posts
    661 Views
    H
    @mfalkvidd OK, i resoved this problem with battery detect in void before ,thanks
  • Female-female header connectors?

    8
    0 Votes
    8 Posts
    3k Views
    K
    You realy think, that it Is useful fór connecting two male connectors together, what way asked?
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    7 Views
    No one has replied
  • Push-button not working

    3
    1 Votes
    3 Posts
    379 Views
    skywatchS
    If the door bell push button is outside then it is likely the contacts are not too good - that is why the original bell probably used 24 or higher voltage (likely AC) to overcome this. Take the cover off the button and lightly sand or file the contacts until you have shiny metal again. Do the same with the screws and wires that are held by the screws. Finally, give it a spray of wd40 and reassemble. Test again. Hopefully it will work now. If you do not feel confident doing that a new door bell push button is probably not that expensive and you would only need to clean the wires where they meet the contacts. Finally, be careful with the wires. Electricians leave little extra and they will very likely be solid core and can break easily.
  • RFM69HW connection to 2560 Mega Pro board

    2
    0 Votes
    2 Posts
    586 Views
    M
    Answering to myself... after many tests I decided to start to start working backwards and started to discard assumptions... finally I discarded : I know that Mega pins are 5v and in theory RFM69 are 3.3v, but I have more sensors installed in a similar setup with mini Pro 5v and Nano boards that work perfectly. So I fit a ttl levels shifter between the Mega Pro and the RFM69 and it started to work right away. It looks like AT328 and AT2560 have different levels of sensitivity as of being able to interpret 3.3v correctly as a "1". Interestingly, I checked the datasheets for both chips and the specification is the same, min 0.6Vcc volts, so anything over 3v should be interpreted as a "1"... go see... As a final detail, I was able to use a 4way ttl shifter since the MISO line doesn't need to be shifted, which left me with MOSI, SCK, SS and INT. Credit to this forum page for this: I can also confirm that pin D2 on these boards is connected to INT0 as standard... I don't know why the pinout diagram indicates something different. I hope this helps others.
  • This topic is deleted!

    2
    0 Votes
    2 Posts
    120 Views
  • Choosing the right NRF chip for MySensors

    4
    0 Votes
    4 Posts
    1k Views
    O
    Thank you both for your answers, that clears up most of the confusion I had around that subject! For my first prototype I might go with the BM832 and a on board regulator like Nca78 mentionned.
  • PMS7003 Sensor - TTY/UART scrambled output [solved]

    11
    1
    0 Votes
    11 Posts
    1k Views
    mfalkviddM
    @kernelpanic done. If you want to do it yourself next time, just click edit on your first post and edit the field at the top.
  • How to protect rain sensor from oxidation?

    14
    1
    0 Votes
    14 Posts
    3k Views
    dzjrD
    For my soil moisture sensors I use a transistor with which I switch the voltage on the sensor on and off with an interval of 15 minutes. For a rain sensor I am lucky to have an old rain sensor from a greenhouse climate system, This sensor works in much the same way, only there are power resistors at the rear, which act as a kind of heating, these switch on when moisture or rain is measured on the sensor, and off again when they are dry.
  • Possible readymade sensor?

    17
    0 Votes
    17 Posts
    5k Views
    HomerH
    Been doing a bit more research on this. The place I bought the plugs from actually have some projects that they have shared. One of them can be found here : https://www.jaycar.com.au/wi-fi-power-switch I'm hoping to find the time tomorrow to look at their sketch to see what I can come up with myself for the Mysensors environment.
  • E73 nrf52 sleep current

    12
    0 Votes
    12 Posts
    1k Views
    kisse66K
    @nca78 about 27uA (Rigol DM3085) @3.2V. It only drops 1-2uA if I disconnect the sensors (all wires towards HTU21,BMP085,VEML6075, BH1750) which is about what the datasheet for those say under shutdown. So most is taken by NRF52. There can be other peripherals that could be turned off still before sleep maybe. Now I only handle the I2C errata and then shut it off before sleep (wire.end), the rest is in mysensors code for sleep. Sleep current does not change if I don't enable the DCDC. Perhaps the active current does a bit but can't measure it accurately (too fast). Just estimated that using AA-batteries it should last over 2 years. It only wakes up every 20min and runs about 400ms to send 7 values. But still I'd like to get better. This is my rain gauge / multisensor under upgrade. It was earlier powered by mega328+NRF24. Worked fine about a year, but then something happened and it started taking 2mA while sleeping. Didn't see any visible reason why.
  • [SOLVED] Problems with ESP8266 and NRF24L01+

    24
    1 Votes
    24 Posts
    17k Views
    George LaynesG
    This thread has been a life saver for me. Just wanted to drop a line for anyone else who might be despairing why despite numerous tests, the radio would still not work on the NodeMCU. In my case, it was NodeMCU v3 from Lolin and I had two traces not workingbetween GPIO13 and GPIO12 - there was no continuity of the trace between the ESP-12E chip and the board pins. I had to solder those two traces together and now - everything works! Thank you for inspiring me to look for this problem.
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • NRF24L01+ on SPI1, TFT on SPI0

    8
    0 Votes
    8 Posts
    1k Views
    N
    @monte said in NRF24L01+ on SPI1, TFT on SPI0: @nizoo91 that's nice, but i didn't found this method. Thanks for the tip! It is definitely easier to do this way :) But my main point was to help someone who will try to compile mysgw for SPI1 and it won't work, because picture he refered to was wrong... I may be stupid, but i spent whole day figuring that out :) For sure :) trust me I have been there and done that, spent days trying to figure something out and to find out it was the simplest thing to solve hahah Anyhow, checkout this site for any pin reference you need. I found it to be very accurate ;) https://pinout.xyz/pinout/spi
  • Soil moisture sensor - strange readings

    12
    1
    0 Votes
    12 Posts
    3k Views
    M
    now it Looks better :-) reversed D2 and D6 D2 -> Input 10K resistor-> Output 10K Input Fork and A1-> Output fork -> D6 The values now makes sense :-) However...Would be great if someone can have a look on the Sketch because Ihave removed the OTA part and not sure If it was correct on this way. Many thanks Markus
  • Getting started. Samd21, dragino lora hat

    3
    0 Votes
    3 Posts
    637 Views
    P
    ok thanks! Then i will order the dragino board to test if it will work. I really like the samd series, so i will just test it and see what happens.

19

Online

11.7k

Users

11.2k

Topics

113.1k

Posts