Skip to content

Hardware

Talk about fun sensor hardware, MCUs, PCBs and how to power your sensors here.
1.8k Topics 18.4k Posts
  • MySensor Moteino Gateway board for Raspberry PI2

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • nRF24 radio reliability

    5
    0 Votes
    5 Posts
    3k Views
    pliniosenioreP
    @tbowmo Sure, but be able to clone an IC means that they have a structure and manufacturing equipments, I guess they can found better way to get income. Dario.
  • Hall effect sensor wiring?

    13
    0 Votes
    13 Posts
    6k Views
    Moshe LivneM
    @Sparkman it say 3144 415 so its the a3144 i think. found a you tube video https://www.youtube.com/watch?v=1ZkX1-gJYjQ (i think the guy there misses the part that it gives 2.5v and goes up or down according to the polarity but its good enough for me...) will give it a try later and see how sensitive it is
  • Motion (PIR), actuator and Temp sensor

    7
    0 Votes
    7 Posts
    4k Views
    H
    Ok, finally got it to work with this: // Example sketch showing how to control physical relays. // This example will remember relay state even after power failure. #include <MySensor.h> #include <SPI.h> #include <DallasTemperature.h> #include <OneWire.h> #define ONE_WIRE_BUS 3 // Pin where dallase sensor is connected #define MAX_ATTACHED_DS18B20 16 OneWire oneWire(ONE_WIRE_BUS); DallasTemperature sensors(&oneWire); float lastTemperature[MAX_ATTACHED_DS18B20]; int numSensors=0; //boolean receivedConfig = false; boolean metric = true; #define RELAY_1 5 // Arduino Digital I/O pin number for first relay (second on pin+1 etc) #define RELAY_2 6 #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 // Motion sensor defs unsigned long SLEEP_TIME = 10000; // Sleep time between reports (in milliseconds) #define DIGITAL_INPUT_SENSOR 4 // The digital input you attached your motion sensor. (Only 2 and 3 generates interrupt!) //#define INTERRUPT DIGITAL_INPUT_SENSOR-2 // Usually the interrupt = pin -2 (on uno/nano anyway) #define CHILD_ID 3 // Id of the sensor child boolean lastTrippedState; MySensor gw; // MyMessage msgTemp(0, V_TEMP); MyMessage msgRelay2(2, V_LIGHT); MyMessage msgMotion(3, V_TRIPPED); void setup() { gw.begin(incomingMessage, AUTO, true); gw.sendSketchInfo("Temp/Relay/Motion Sensor", "1.0"); // gw.present(1, S_LIGHT); pinMode(RELAY_1, OUTPUT); // gw.present(2, S_LIGHT); pinMode(RELAY_2, OUTPUT); digitalWrite(RELAY_1, gw.loadState(1)? RELAY_ON : RELAY_OFF); digitalWrite(RELAY_2, gw.loadState(1)? RELAY_ON : RELAY_OFF); pinMode(DIGITAL_INPUT_SENSOR, INPUT); // sets the motion sensor digital pin as input // gw.present(CHILD_ID, S_MOTION); // 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++) { gw.present(0, S_TEMP); //} } // void loop() { gw.process(); boolean tripped = digitalRead(DIGITAL_INPUT_SENSOR) == HIGH; if (tripped != lastTrippedState) { Serial.println(tripped? "tripped" : "not tripped"); gw.send(msgMotion.set(tripped?"1":"0")); // Send tripped value to gw// //digitalWrite(RELAY_1, tripped? 1 : 0); } lastTrippedState = tripped; // Fetch temperatures from Dallas sensors sensors.requestTemperatures(); // 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>((gw.getConfig().isMetric?sensors.getTempCByIndex(0):sensors.getTempFByIndex(0)) * 10.)) / 10.; // Only send data if temperature has changed more then 1 degC and no error if (int(lastTemperature[0]) != int(temperature) && temperature != -127.00) { //added integer // Send in the new temperature gw.send(msgTemp.setSensor(0).set(temperature,1)); lastTemperature[0]=temperature; } //} } void incomingMessage(const MyMessage &message) { // if (message.type==V_LIGHT && message.sensor == 2) { // Change relay state digitalWrite(RELAY_2, message.getBool()?RELAY_ON:RELAY_OFF); // Store state in eeprom gw.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()); } }
  • Device Similar Vera

    3
    0 Votes
    3 Posts
    2k Views
    D
    Hmm,Okay I willmake a ethernet getway, but I don't understand how I sync the sensr with her eheh
  • Power source for relay actuator

    5
    0 Votes
    5 Posts
    2k Views
    M
    @Cory said: I usually search for "ac usb" on ebay and get good results. So far i have been happy to find chargers like these. They support up to 240V and are small enough to fit into electrical boxes with the case on. http://www.ebay.com/itm/New-US-Plug-USB-AC-Wall-Charger-Adapter-For-Samsung-iPad-iPhon-White-f20-/281681762352?pt=LH_DefaultDomain_0&hash=item41958a9830 I typically get them for ~$0.70 each but have also won some bids for less. those modules not so safe to be inside a 220v box without ventilation they can burst in flames (its rare but imagine it happen once in 220v box and the all house could burn...) I open one once to see how can they fit in so small box and they just cut the PCB on half and connect one half to another with ribbon cable and fold the 2 pieces on on another with a thin foam to protect the capacitors...
  • Newb trying to build a 3 unit dimmer with control

    1
    0 Votes
    1 Posts
    903 Views
    No one has replied
  • Motion and lux meters combined in a single device

    23
    3 Votes
    23 Posts
    15k Views
    jeylitesJ
    With the help from @korttoma & @AWI , I put together this sketch. I've tested it and it works. Have fun! #include <MySensor.h> #include <SPI.h> unsigned long SLEEP_TIME = 120000; // Sleep time between reports (in milliseconds) #define DIGITAL_INPUT_SENSOR 3 // The digital input you attached your motion sensor. (Only 2 and 3 generates interrupt!) #define INTERRUPT DIGITAL_INPUT_SENSOR-2 // Usually the interrupt = pin -2 (on uno/nano anyway) #define CHILD_ID 1 // Id of the sensor child #define LED_PIN 5 MySensor gw; // Initialize motion message MyMessage msg(CHILD_ID, V_TRIPPED); void setup() { gw.begin(); // Send the sketch version information to the gateway and Controller gw.sendSketchInfo("Motion Sensor", "1.0"); pinMode(DIGITAL_INPUT_SENSOR, INPUT); // sets the motion sensor digital pin as input pinMode(LED_PIN, OUTPUT); // Register all sensors to gw (they will be created as child devices) gw.present(CHILD_ID, S_MOTION); } void loop() { // Read digital motion value boolean tripped = digitalRead(DIGITAL_INPUT_SENSOR) == HIGH; Serial.println(tripped); gw.send(msg.set(tripped?"1":"0")); // Send tripped value to gw { if (tripped){ // from the "Blink" example sketch :-) digitalWrite(LED_PIN, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(LED_PIN, LOW); // turn the LED off by making the voltage LOW delay(1000); } // Sleep until interrupt comes in on motion sensor. Send update every two minute. gw.sleep(INTERRUPT,CHANGE, SLEEP_TIME); } }
  • ArduinoProMini to nRF24L patch PCB with battery holder and Switch

    3
    2 Votes
    3 Posts
    3k Views
    G
    You can do it ! Tweezers and magnifying goggles ( from Harbor Fright ) and you are in business. Don't forget to set the Arduino to internal clock 8 mhz via fuse settings when rinning at 3V -- Most of them run without it but some might not be happy running 16mhz of the xtal at 3V .Gary
  • Custom made ethernet gateway based on atmega128

    39
    3 Votes
    39 Posts
    23k Views
    D
    @axillent Okay, I will try :) The sketch of the Plug, I will see that do many challenges, but let's go. I was reading the code the Ethernet getway, but i learn how i sync it with another sensor. Thx for your help
  • Real world estimation of NRF24L range

    1
    0 Votes
    1 Posts
    977 Views
    No one has replied
  • Programming the Arduino Pro Mini 3.3V

    14
    0 Votes
    14 Posts
    12k Views
    tejoT
    I understood that you can not make new uploads at 3.3V Arduino with your converter. the fact that the pre-loaded program work does not mean much because you only this feeding the Arduino. if the question is about having bought Arduino defective, and recording using another Arduino as ISP, this will show for you. if record, the problem is the pair converter / Arduino 3.3v. use another Arduino as a recorder. look in the Arduino sketch the ISP and you will understand the interconnection pins. if I get it wrong, forgive me, it is the difficulty with the language.
  • Using interrupts with an LDR (pro min)

    3
    0 Votes
    3 Posts
    2k Views
    S
    @maltimus Because on a dark day I was concerned this would not be enough to trigger. I intend to test it though!
  • strange behavior with receiving

    1
    0 Votes
    1 Posts
    725 Views
    No one has replied
  • 433 / 868 MHz common temperature sensors

    3
    0 Votes
    3 Posts
    3k Views
    DwaltD
    @MSchmidke Take a look at what Ray ( at rayshobby.net) has documented on this subject.
  • Repeaters in domoticz

    6
    0 Votes
    6 Posts
    3k Views
    S
    Go this going by playing with the ordering. I wiped sensors from domoticz and turned on repeater node. Then I restarted domoticz - then opened my reed switch (outside electric gate) - this caused the gate to be registered. I then had to reset the repeater (it is a buzzer and led actuator) for that to be seen in domoitcz also. A bit convoluted but got there. Guess this could trip many up. Thanks all.
  • Checking if the air conditioning is on

    19
    0 Votes
    19 Posts
    7k Views
    Moshe LivneM
    @Chester That is actually a great idea.... From what I read elsewhere it seems that the cheap hall sensors are not that sensitive so your idea should be the bestest... Thanks!!!
  • ICSP Programmer Adapter

    5
    0 Votes
    5 Posts
    2k Views
    Roberto BrunialtiR
    The adapter itself does'nt hold a pcb. You have to use ... your hands or a table clamp. Neverthless it is really usefull...
  • Version mismatch

    4
    0 Votes
    4 Posts
    2k Views
    D
    Yes of course...anyway "version mismatch" should not appear due to wire issue :-)
  • PIR sensor unreliable

    2
    0 Votes
    2 Posts
    1k Views
    SweebeeS
    I just found out that my gateway is not working great. I made a new one but i don't know why the other is not working good? Solved it, it was not the gateway, it was a repeater node that couldn't pass the messages all the time.

15

Online

11.7k

Users

11.2k

Topics

113.2k

Posts