Skip to content

Hardware

Talk about fun sensor hardware, MCUs, PCBs and how to power your sensors here.
1.8k Topics 18.3k Posts
  • BMP180 breakout board on low voltage

    bmp180
    5
    0 Votes
    5 Posts
    5k Views
    D
    That was indeed the plan. 2 full batteries in series will start of at 3.0V and if they're empty, the voltage will have dropped to 1.6V But to be fair, I'll be happy if it still works at 1.8V, because that’s the voltage the atmega328 will start to fail.
  • Gerber/Eagle files and then...?

    5
    0 Votes
    5 Posts
    2k Views
    G
    Try pcbshopper.com, to search multiple fab houses based on your board requirements.
  • Help understanding addressing and log messages

    3
    0 Votes
    3 Posts
    3k Views
    V
    @pete1450 said: Based on this: http://www.mysensors.org/build/serial_api Example 1 id Node-id 0 Child-id 0 internal message no ack payload is type I_LOG_MESSAGE and your actual payload is "read: 21-20-0 s=0,c=1,t=0,pt=7,l=5:16.7" EDIT: I'm not sure if there is an easier place to get this, but I looked in the code for process where it prints "read" messages and found this to describe the payload. Send is also in there. Mysensor.cpp Line 221-222
  • Surface Mount ATMega328p-AU sensor board.

    pool smd
    5
    4 Votes
    5 Posts
    4k Views
    M
    I have been using an old(cheap) wall-to-USB power supply. I'll give it a try with a beefier supply and let you know the results I get.
  • 2 Votes
    6 Posts
    3k Views
    hekH
    @destos Wow!
  • Sensornodes: XAmbi Kid's

    9
    2 Votes
    9 Posts
    4k Views
    D
    @scalz exactly .. synchronization ...
  • IR distance sensor usage?

    proximity infrared distance
    4
    0 Votes
    4 Posts
    3k Views
    hetbeestH
    I did some quick coding, combining it with a temperature sensor. It did work for a couple of hours, after that my 9V battery was drained so far that I didn't get any data send from the sensors anymore. Quite likely the IR sensor uses a lot of power while it keeps transmitting IR. Anyhow, my quick and dirty code is: // Example sketch showing how to send in OneWire temperature readings #include <MySensor.h> #include <SPI.h> #include <DallasTemperature.h> #include <OneWire.h> #include <DistanceGP2Y0A21YK.h> #define ONE_WIRE_BUS 3 // Pin where dallase sensor is connected #define MAX_ATTACHED_DS18B20 16 #define CHILD_ID_DISTANCE 25 DistanceGP2Y0A21YK Dist; unsigned long SLEEP_TIME = 500; // Sleep time between reads (in milliseconds) OneWire oneWire(ONE_WIRE_BUS); DallasTemperature sensors(&oneWire); MySensor gw; float lastTemperature[MAX_ATTACHED_DS18B20]; int numSensors=0; boolean receivedConfig = false; boolean metric = true; int distance; int lastDistance=0; int loopCounter=0; int loopsBetweenTemp = 60; // Initialize temperature message MyMessage msg(0,V_TEMP); MyMessage msgdist(CHILD_ID_DISTANCE,V_DISTANCE); void setup() { // Startup OneWire sensors.begin(); Dist.begin(0); // Startup and initialize MySensors library. Set callback for incoming messages. gw.begin(); // Send the sketch version information to the gateway and Controller gw.sendSketchInfo("Temperature and Distance Sensor", "1.0"); gw.present(CHILD_ID_DISTANCE,S_DISTANCE); // 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(i, S_TEMP); } } void loop() { // Process incoming messages (like config from server) gw.process(); distance = Dist.getDistanceCentimeter(); if (distance != lastDistance) { lastDistance = distance; gw.send(msgdist.set(distance)); } if (loopCounter == 0) { // 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(i):sensors.getTempFByIndex(i)) * 10.)) / 10.; // Only send data if temperature has changed and no error if (lastTemperature[i] != temperature && temperature != -127.00) { // Send in the new temperature gw.send(msg.setSensor(i).set(temperature,1)); lastTemperature[i]=temperature; } } } if (++loopCounter >= loopsBetweenTemp) loopCounter = 0; gw.sleep(SLEEP_TIME); }
  • Power emission of NRF

    7
    0 Votes
    7 Posts
    4k Views
    D
    @lunarok about power emission .. I test it in my house .. WiFi is different .. but in 2.4Ghz is problem with signal mirroring .. receiver detect more signal , all are same but little delayed .. then receiver not receive signal correct .. in free area there are not mirroring signal then with low output power can get long distance .. and low power consumption.. but in Built up area is better to use 868Mhz or 433Mhz .. there is also mirroring but less then 2.4Ghz . I can test only nRF24L01+ with nRF905 or CC1101 .. but in fact .. in CC1101 or nRF905 is possible to set lower transmission speed then get longer distance .. best regards.. or not ???
  • MySensors on A20 (sun7i) chip (cubieboard2, banana pi)

    4
    0 Votes
    4 Posts
    2k Views
    A
    Please share the solution, I'm using OrangePi (quite 'better' clone of BananaPi from China), it's superb fast but would like to have nRF-serial gateway straight from board.
  • Ready to go kit (for the lazy!)

    10
    0 Votes
    10 Posts
    3k Views
    tbowmoT
    @hek One thing is, that salaries is much lower in China, than Europe/USA. Another thing could be that the government is funding the postal service, in order to get as cheap shipping FROM china, as possible. Doesn't explain things with itead though, but in general I would expect that it's like that.
  • Raspberry PI Interface

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Confused...sensors hook up to what?

    5
    0 Votes
    5 Posts
    2k Views
    sj44kS
    Check the shop part of the mysensors.org website you will be amazed :) Just be sure that you buy any Arduino with at least the ATmega328. I made a mistake buying the Arduino Mini with an ATmega168 micro controller (which is also available) but this has only half the amount of Flash Memory and EEPROM. This makes it unusable for the sketches you will find on MySensors.org, and the price difference between the 2 types of Arduinos is a matter of cents.
  • IR Sketch

    6
    0 Votes
    6 Posts
    4k Views
    L
    @Terence-Faul : did you still get this issue ? around that time (1 month ago) there was a beta release of the plugin creating such error of loops, nothing about IR (my fault) @hek : IRLib decode the message, so it's not so long, around 12 characters. I use it myself, the node send to the controler any code received and you can store them. I have a scenario in Jeedom that is storing all codes receive until I erase it, like this pressing multiples button, I get all of them. After that, you can create a V_IR_SEND and as the input use any of the codes you have received. But must be working only for a protocole decoded by IRLib (at that time, I have try only my Sony remote) If not decoded, yes RAW message is too long to be used. And of course better to know what type of protocol it is so (but it's possible to send this value in another sensor for exemple) My bigger problem with this library, it's the hardcoded Sender in PIN 3 (I don't understand why, and make me impossible to use a motion sensor at same time)
  • Temp/Humidity/Light Sensor on battery

    3
    1 Votes
    3 Posts
    7k Views
    D
    @Dwalt actually the sketch is simple. #include <SPI.h> #include <MySensor.h> #include <DHT.h> #define CHILD_ID_HUM 0 #define CHILD_ID_TEMP 1 #define CHILD_ID_LIGHT 2 #define HUMIDITY_SENSOR_DIGITAL_PIN 4 #define BATTERY_SENSE_PIN A0 // select the input pin for the battery sense point #define LIGHT_SENSOR_ANALOG_PIN A1 unsigned long SLEEP_TIME = 60000; // 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); MyMessage msg(CHILD_ID_LIGHT, V_LIGHT_LEVEL); int oldBatteryPcnt = 0; int battLoop =0; int lightLevel =0; int lastLightLevel =0; void setup() { gw.begin(NULL,15); dht.setup(HUMIDITY_SENSOR_DIGITAL_PIN); // Send the Sketch Version Information to the Gateway gw.sendSketchInfo("Temp Humidity Light", "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); gw.present(CHILD_ID_LIGHT, S_LIGHT_LEVEL); metric = gw.getConfig().isMetric; check_batt(); } void loop() { 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); } lightLevel = (analogRead(LIGHT_SENSOR_ANALOG_PIN))/10.23; if (lightLevel != lastLightLevel) { Serial.println(lightLevel); gw.send(msg.set(lightLevel)); lastLightLevel = lightLevel; } battLoop++; if (battLoop > 10) { check_batt(); battLoop=0; } gw.sleep(SLEEP_TIME); //sleep a bit } void check_batt() { // get the battery Voltage int sensorValue = analogRead(BATTERY_SENSE_PIN); Serial.println(sensorValue); // 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 // vout = (sensorvalue x 3.3) / 1023 //vin = vout / (R2/(R1+R2)); float batteryV = ( sensorValue * 0.003225806 ) / 0.3; // divide R2/(R1+R2) int batteryPcnt = sensorValue / 10 ; if ( batteryPcnt > 100 ) batteryPcnt = 100; Serial.print("Battery Voltage: "); Serial.print(batteryV); Serial.println(" V"); Serial.print("Battery percent: "); Serial.print(batteryPcnt); Serial.println(" %"); if (oldBatteryPcnt != batteryPcnt) { // Power up radio after sleep gw.sendBatteryLevel(batteryPcnt); oldBatteryPcnt = batteryPcnt; } } //```
  • MQTT gateway and freedomotic

    1
    0 Votes
    1 Posts
    849 Views
    No one has replied
  • Anyone using electronic transformers to power the nodes?

    7
    0 Votes
    7 Posts
    3k Views
    tbowmoT
    It needs a minimum load onthe output, in order to function correctly. If this minimum requirement is not met, the output couod become unstable, and self oscillate. I've Seen this with an electronic transformer for halogen lights, where i use led lamps instead. Needed 1-2 halogen spots on it (it supplies 5 spots in total) in order for the electronic transformator to work correctly
  • Any suggestion to use arduino 328p internal temperature as ambient temp.

    2
    0 Votes
    2 Posts
    1k Views
    m26872M
    @Dheeraj Personally I think it's interesting, but I also know it¨s been rejected in earlier discussions. It requires calibration, low-power and low activity arduino use. And even then, the accuracy isn't very impressive. I would still like to play a little and maybe use it as a complement in some projects. We'll see.
  • Decoupler capacitor

    4
    0 Votes
    4 Posts
    2k Views
    SweebeeS
    Thank you. And what about the low ESR capacitors?
  • Mini battery sensor

    battery micro sesnor
    3
    1 Votes
    3 Posts
    3k Views
    Ivan ZI
    Thank Sensor ready work. (I have not valid binary Optiboot) [image: 1427989664063-20150402_172032.jpg]
  • This topic is deleted!

    Locked
    4
    0 Votes
    4 Posts
    125 Views

10

Online

11.7k

Users

11.2k

Topics

113.0k

Posts