Skip to content

Hardware

Talk about fun sensor hardware, MCUs, PCBs and how to power your sensors here.
1.8k Topics 18.4k Posts
  • Design a pcb that has 6 layers

    pcb pcb manufacturi
    3
    0 Votes
    3 Posts
    2k Views
    N
    @Ozal I had similar board which **pcbbasket made it for me, the cost was a bit higher, but they made exactly as I wanted. So I recommend them www.pcbbasket.com **
  • 0 Votes
    39 Posts
    21k Views
    R
    I finally made them work :) I was not using the right clock for programming, 16MHz instead of 8MHz... Thanks @AWI ;)
  • Arduino NRF24L01 simple universal board

    arduino pro min arduino nrf24l01
    12
    2 Votes
    12 Posts
    9k Views
    K
    @AWI said: Can you share what is in the box? I am getting curious.. [image: upload-b4b8c6d2-ace5-400e-90c9-4c4dcfd4d4aa.jpg] arduino_nrf24l01.rar
  • Aluminium Case for MySensors

    wireless case sensor
    4
    0 Votes
    4 Posts
    3k Views
    D
    If you look at the Netatmo devices you can see that they have plastic caps and a long plastic notch. I'd bet that the antenna can be found in such an area... I dont think that a small thickness will help to let the radio signal pass. Think of that very thin µ-metal sheet covers on high frequency circuits e.g. in TV or Radio inputs (where you want to stop a radio transmission). They are built to not let radio waves pass and they are thin - so I dont think the thickness plays a major role. As Bulldog wrote paramagnetic blocks radio waves. And aluminum stays paramagnetic even if you reduce the thickness. But I made the experience that relatively small areas, where the radio waves will not get blocked (e.g. plastic caps) can make the difference between no signal and "its working". Also keep in mind that nearly all antennas have a direction. So changing the orienation of the antenna might dramatically change the transmitting capabilties.
  • Approved in-wall switches and dimmers

    switch dimmer
    17
    0 Votes
    17 Posts
    9k Views
    boblasureB
    @Session Yes, there are plenty of "certified" dimmers that are controlled by PWM or 0-10V input. However, there are also plenty of "certified" LED drivers that you can also use by connecting the (-) negative side of the DC output to the Arduino ground, and the (-) negative side of your LED to the mosfet output. Certification is for the AC part of the Driver. The great thing about the new LEDS is that you can control the DC side and not worry about controlling the AC. You don't need a triac, you don't need a zero crossing detector, simply switch on and off (PWM) the negative side of the DC part of the light.
  • Electric Gates Sensor

    6
    0 Votes
    6 Posts
    3k Views
    bjornhallbergB
    @tbowmo The last time I needed a non-standard thread (for a camera tripod-like mount) I had to go to Würth. They charge about an arm and a leg for a few screws, but on the other hand the metal is probably very high-grade and resistant to corrosion.
  • RF433MHZ sensor

    6
    0 Votes
    6 Posts
    5k Views
    T
    I am not sure, I bought some relays from Ebay. If I use the MySensors 433RF Sketch, the receiver recognises the remotes. /* * This sketch demonstrates how to use InterruptChain to receive and * decode remote switches (old and new) and remote sensors. * * Basically, this sketch combines the features of the ShowReceivedCode * and ShowReceivedCodeNewKaku examples of RemoteSwitch and the * ThermoHygroReceiver of RemoteSensor all at the same time! * * After uploading, enable the serial monitor at 115200 baud. * When you press buttons on a 433MHz remote control, as supported by * RemoteSwitch or NewRemoteSwitch, the code will be echoed. * At the same time, if data of a remote thermo/hygro-sensor is * received, as supported by RemoteSensor, it will be echoed as well. * * Setup: * - connect a 433MHz receiver on digital pin 2. * * * MySensor note: This example has not yet been adopted but can be used as an example * of receiving 433Mhz stuff. * * One idea could be to echo received 433 codes back to gateway to be able to pick up and * handle data over there. * */ #include <RemoteReceiver.h> #include <NewRemoteReceiver.h> #include <SensorReceiver.h> #include <InterruptChain.h> void setup() { Serial.begin(115200); // Interrupt -1 to indicate you will call the interrupt handler with InterruptChain RemoteReceiver::init(-1, 2, showOldCode); // Again, interrupt -1 to indicate you will call the interrupt handler with InterruptChain NewRemoteReceiver::init(-1, 2, showNewCode); // And once more, interrupt -1 to indicate you will call the interrupt handler with InterruptChain SensorReceiver::init(-1, showTempHumi); // On interrupt, call the interrupt handlers of remote and sensor receivers InterruptChain::addInterruptCallback(0, RemoteReceiver::interruptHandler); InterruptChain::addInterruptCallback(0, NewRemoteReceiver::interruptHandler); InterruptChain::addInterruptCallback(0, SensorReceiver::interruptHandler); } void loop() { // You can do other stuff here! } // shows the received code sent from an old-style remote switch void showOldCode(unsigned long receivedCode, unsigned int period) { // Print the received code. Serial.print("Code: "); Serial.print(receivedCode); Serial.print(", period: "); Serial.print(period); Serial.println("us."); } // Shows the received code sent from an new-style remote switch void showNewCode(NewRemoteCode receivedCode) { // Print the received code. Serial.print("Addr "); Serial.print(receivedCode.address); if (receivedCode.groupBit) { Serial.print(" group"); } else { Serial.print(" unit "); Serial.print(receivedCode.unit); } switch (receivedCode.switchType) { case NewRemoteCode::off: Serial.print(" off"); break; case NewRemoteCode::on: Serial.print(" on"); break; case NewRemoteCode::dim: Serial.print(" dim level "); Serial.print(receivedCode.dimLevel); break; case NewRemoteCode::on_with_dim: Serial.print(" on with dim level "); Serial.print(receivedCode.dimLevel); break; } Serial.print(", period: "); Serial.print(receivedCode.period); Serial.println("us."); } // Shows the received sensor data void showTempHumi(byte *data) { // is data a ThermoHygro-device? if ((data[3] & 0x1f) == 0x1e) { // Yes! byte channel, randomId; int temp; byte humidity; // Decode the data SensorReceiver::decodeThermoHygro(data, channel, randomId, temp, humidity); // Print temperature. Note: temp is 10x the actual temperature! Serial.print("Temperature: "); Serial.print(temp / 10); // units Serial.print('.'); Serial.println(temp % 10); // decimal } }
  • nRF24LE1 full controller to control devices and sensors reading!!

    18
    0 Votes
    18 Posts
    13k Views
    AnticimexA
    They also make a slightly fatter module with USB: http://www.nordicsemi.com/eng/Products/2.4GHz-RF/nRF24LU1P This puppy does come in 32Kb flash variant.
  • 0 Votes
    18 Posts
    6k Views
    C
    @PotatoBattery You have probably already found the solution for your issue, but for the sake of variety, here is my take on the matter. [image: upload-41343723-da07-492a-ad92-a2c3f45a7bfa.jpg] The battery is a generic lithium phone battery, 2300mAh in this case. The solar cell is a 5,5V, 30mAh one. It is enclosed in resin. The battery charger is a 1A lithium charger with battery protection. I've replaced the programming resistor with a 10k, to better suit the solar cell output current capabilities. The battery gets 15mA, on a sunny day. All the components are from eBay. And you can buy the Arudino board here, on mysensors.org. [image: upload-0709f7e6-73c0-4276-bde9-64bc76a97947.jpg] Everything fit perfectly. [image: upload-87599f77-07ab-4173-9a25-8463fd73875a.jpg]
  • Video - "Getting Started with the nRF24L01 Transceiver"

    nrf24l01
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • TX RX ERR - LED for Sensors

    9
    0 Votes
    9 Posts
    5k Views
    AWIA
    I use something similar mainly to show if messages are received. For this purpose I created a small class/ library to blink and time LED's. The class uses a similar syntax as Bounce2 for assigning and handling LED's attached to output pins. LedFlash. A code example: https://codebender.cc/sketch:85200
  • Small Mosfet transistor to high power Mosfet driver

    1
    1 Votes
    1 Posts
    1k Views
    No one has replied
  • Amazon place to buy parts

    store
    4
    0 Votes
    4 Posts
    2k Views
    hekH
    @Trixcomp said: 10-Best-Electronics-Suppliers What's best... for who? US residents? ;) Naa. we've cannot just focus on US when it comes to parts. And I'm from Sweden actually. Last month visits: [image: upload-e3df2c90-e430-4c86-897b-4daa18971642.png] [image: upload-81fb3c4e-030c-4857-a573-55ff4bc0711a.png]
  • External power supply to radio

    14
    0 Votes
    14 Posts
    10k Views
    gigiG
    @ServiceXp said: I just can't believe that the display, rfm12b and NRF24 on the same 3.3v rail is under 50ma,... not too mention the other stuff on it.. You could try disconnecting everything except the NRF24 and see what happens? I can't even get my NRF24's to work with the shop's listed boost with the Pro Mini attached without a 'massive' capacitor. I tried to put a separate power supply. General supply 5V 2 Amps. I do not have the controller and I put two arduino nano for 3.3 volts [image: upload-b4d19d21-af78-4ed4-b9fd-952020dc766d.jpg] after 2 hours the system crashes. if I put only one of the two radio system is fine. I tried it with a standalone with two radio but without a monitor and the system works perfectly!!! I have to put other capacitors? Thank
  • PCB Prototype Machine

    8
    0 Votes
    8 Posts
    3k Views
    greglG
    @blacey said: So many toys, so little time ;) ...and money....
  • Leapmotion

    10
    0 Votes
    10 Posts
    3k Views
    hekH
    @Johnny-B-Good We have to wait for the standalone version. :)
  • Hardware debugging

    1
    1 Votes
    1 Posts
    781 Views
    No one has replied
  • MQTT Gateway and Relay Status

    6
    0 Votes
    6 Posts
    3k Views
    X
    @hek It works to have a feedback from the sensor, but this doesn't give a status if someone acts on the relay manually. BTW I've tested a similar approach. I send from the sensor a custom variable with the status of the relay. @gadu This is the best approach. This could handle the status of the relay even if manual activated. The return of the signal always give us the relay position. But it needs a different dual stepper relay. I'll try this as well soon. Thanks a lot to all! Simon
  • One way on how to reuse 433MHZ alarming sensors for Mysensors

    5
    1 Votes
    5 Posts
    4k Views
    axillentA
    i see a bug, been without a motion events for a while it is stop working at the same time it can work for a while in case of motion events hmm... fix needed but it is just a prototype. I plan to support 4-6 types of sensors (at least types I have with my security system). Currently only motion sensors are supportde (actually any alert sensor can be treated as a motion sensor but it will be better to differentiate) double radio transmittion is also not good, will be better to have an ethernet gateway directly working with RF433 This way I'm connecting very simple RF433 sensors one way (alert is comming from sensor to home controller). Same idea but different hardware and different sketch are needed to soport RF433 relays and wall switches. #include <avr/eeprom.h> #include <SPI.h> #include <MySensor.h> #include <DHT.h> #include <RCSwitch.h> #define CHILD_ID_HUM 0 #define CHILD_ID_TEMP 1 #define HUMIDITY_SENSOR_DIGITAL_PIN 3 unsigned long SLEEP_TIME = 30000; // Sleep time between reads (in milliseconds) MySensor gw; DHT dht; float lastTemp; float lastHum; boolean metric = true; MyMessage msgHum(CHILD_ID_HUM, V_HUM); MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP); RCSwitch mySwitch = RCSwitch(); #define RF433_CHILDS_MAX 20 typedef struct { unsigned long key; uint8_t child_id; } rf433_child_type; uint8_t *eeprom_last_id = (uint8_t*)EEPROM_LOCAL_CONFIG_ADDRESS; rf433_child_type *eeprom_rf433_array = (rf433_child_type*)EEPROM_LOCAL_CONFIG_ADDRESS+1; unsigned long dht_period; void setup() { gw.begin(); dht.setup(HUMIDITY_SENSOR_DIGITAL_PIN); mySwitch.enableReceive(0); // Receiver on inerrupt 0 => that is pin #2 digitalWrite(5, HIGH); // Send the Sketch Version Information to the Gateway gw.sendSketchInfo("Humidity", "1.0"); // Register all sensors to gw (they will be created as child devices) gw.present(CHILD_ID_HUM, S_HUM); gw.present(CHILD_ID_TEMP, S_TEMP); metric = gw.getConfig().isMetric; } void loop() { if(digitalRead(5)) { Serial.println("-- enetered RF433 init mode"); unsigned long t = millis(); while(millis() - t < 60000) { if (mySwitch.available()) { unsigned long key = mySwitch.getReceivedValue(); mySwitch.resetAvailable(); uint8_t child_id = rf_find_child(key); Serial.print("--- child_id - "); if(child_id == 255) { // key is not presented in EEPROM uint8_t last_id = rf_get_last_id(); if(last_id < RF433_CHILDS_MAX) { // a new id should be created rf433_child_type child; // prepare data to be stored in eeprom child.key = key; child.child_id = last_id + 2; eeprom_write_block(&child, &eeprom_rf433_array[last_id], sizeof(child)); // store new last_id last_id++; rf_set_last_id(last_id); Serial.print("new "); Serial.println(last_id); gw.present(child.child_id, S_MOTION); } else { // no more space in EEPROM Serial.println("no space"); } } else { // existing key Serial.println(child_id); gw.present(child_id, S_MOTION); } break; } } Serial.println("-- left RF433 init mode"); } if (mySwitch.available()) { // motion event unsigned long key = mySwitch.getReceivedValue(); mySwitch.resetAvailable(); uint8_t child_id = rf_find_child(key); Serial.print("-- rf key "); Serial.print(key); Serial.print(" child_id "); Serial.println(child_id); if(child_id != 255) { MyMessage msg(child_id, V_TRIPPED); gw.send(msg.set("1")); // Send tripped value to gw delay(2000); gw.send(msg.set("0")); } } if(dht_period < millis()) { //delay(dht.getMinimumSamplingPeriod()); float temperature = dht.getTemperature(); if (isnan(temperature)) { Serial.println("Failed reading temperature from DHT"); } else if (temperature != lastTemp) { lastTemp = temperature; if (!metric) { temperature = dht.toFahrenheit(temperature); } gw.send(msgTemp.set(temperature, 1)); Serial.print("T: "); Serial.println(temperature); } float humidity = dht.getHumidity(); if (isnan(humidity)) { Serial.println("Failed reading humidity from DHT"); } else if (humidity != lastHum) { lastHum = humidity; gw.send(msgHum.set(humidity, 1)); Serial.print("H: "); Serial.println(humidity); } //gw.sleep(SLEEP_TIME); //sleep a bit dht_period = millis() + SLEEP_TIME; } } uint8_t rf_get_last_id() { uint8_t x = eeprom_read_byte(eeprom_last_id); if(x == 255) x = 0; return x; } void rf_set_last_id(uint8_t last_id) { eeprom_write_byte(eeprom_last_id, last_id); } uint8_t rf_find_child(unsigned long key) { uint8_t last_id = rf_get_last_id(); uint8_t id = 0; while(id != last_id) { rf433_child_type child; eeprom_read_block(&child, &eeprom_rf433_array[id], sizeof(child)); if(child.key == key) return child.child_id; } return 255; }
  • Keypads

    6
    0 Votes
    6 Posts
    4k Views
    klimK
    I'm actually working on a mySensor KeyPad node, but currently i'm struggling with a generic solution to read/write eeprom configurations controlled by the gateway. Maybe i'll ask for help in this forum in near future for future.

11

Online

11.7k

Users

11.2k

Topics

113.2k

Posts