@dbemowsk The 2xbattery builds that I built didn't have the voltage regulator as you suggest. It was just a range problem as the voltage dropped. Moving it closer to the gateway everything was still working.
Posts made by jtm312
-
RE: Mini Weather Station
-
RE: Mini Weather Station
@dbemowsk I am using the 3.3V pro minis. It is the one pictured at the top of this thread. I started out by getting about a week. The big difference came after removing the LEDs, as they were using most of the power. Also sleeping most of the time.
A good quality 9v also helped. Other humidity sensors can also cut the power drain.
I have also built version using 2xAAA batteries, but I find that it doesn't take long before the voltages drops below the useful voltage for the radio and starts to cause a range problem. The next version I am planning on going back to using the onboard regulator with 4xAA batteries.
-
RE: Mini Weather Station
@dbemowsk By cutting the LEDs off, I am getting 12 to 16 weeks.
-
RE: Mini Weather Station
The pro minis have an onboard voltage regulator (raw input). The specs say that they are good for up to 12v for either the 5v or 3.3v version. I used a 3.3v version as it made the rest of the interface easier.
-
RE: Mini Weather Station
@flopp I have added the FreeCAD file to the Thingiverse post so that people can make any changes they want.
-
RE: Mini Weather Station
@bjacobse Thanks, they look interesting. I will grab some and have a play.
-
RE: Mini Weather Station
@Dylano Thanks.
I get 3-4 months from a battery by just removing the 2 LEDs from the arduino. Could probably do better running it from 2 AAA batteries and removing the voltage regulator as well. To save more power, you could also increase the interval between sending updates to the controller.
To build it you need:
- Arduino Pro Mini
- Humidity Sensor – DHT22 Aliexpress
- list itemPressure Sensor – BMP180 Aliexpress
- Prototype board & Battery Connector
Connections:
- Radio connected as http://www.mysensors.org/build/connect_radio
- 3.3V to sensors from arduino
- Battery Sense - A0 - connected as http://www.mysensors.org/build/battery R1=1M * R2=100k
- BMP085 - SCL - A5
- BMP085 - SCA - A4
- DHT22 - D3
-
RE: Mini Weather Station
@BulldogLowell Thanks, that looks like it is worth a try, or just round to 0.5 degree. I am also going to cut down the sample interval. After the 1min samples to average for the pressure, the rest of the time 5min is probably good enough.
-
RE: Mini Weather Station
@TimO Its been running for about 2 weeks now, and used 5-6% of the battery. I have pulled the leds off of the nano to make it last longer (I was only getting 3 weeks with the leds on). It would be nice to think that I could get 20 weeks. I am also thinking of some more code changes to reduce them amount of power consumed.
-
Mini Weather Station
This is a new mini weather station that I have been working on.
It provides Temperature, Humidity, Pressure, and Battery Voltage.
The case is designed to be printed without the need for any support, has vents in the front and sides. The front slides on to make it easy to replace the 9v battery. It is designed to take a 50x70mm prototype board. This gives heaps of room for the sensors.
The 3d files can be found on http://www.thingiverse.com/thing:704715
The code is mostly a refactor from the examples in the MySensors libraries, with a simplification of the forecast algorithm to reduce the amount of memory that it uses.
#include <SPI.h> #include <MySensor.h> #include <DHT.h> #include <Wire.h> #include <Adafruit_BMP085.h> #define CHILD_ID_HUM 0 #define CHILD_ID_TEMP 1 #define CHILD_ID_BARO 2 #define CHILD_ID_BARO_TEMP 3 #define HUMIDITY_SENSOR_DIGITAL_PIN 3 int BATTERY_SENSE_PIN = A0; // select the input pin for the battery sense point #define SLEEP_MINUTE 60000 #define SLEEP_FIVE_MINUTES 300000 MySensor gw; DHT dht; Adafruit_BMP085 bmp = Adafruit_BMP085(); // Digital Pressure Sensor float lastTemp = -1.0; float lastHum = -1.0; float lastBaroTemp = -1.0; int lastForecast = -1; char *weather[] = { "Stable", "Sunny", "Cloudy", "Unstable", "Thunderstorm", "Unknown" }; int minutes; int pressureSamples[5]; float lastPressureAvg = -1.0; int lastPressure = -1; int minuteCount = 0; float pressureAvg; int pressure; float dP_dt; boolean metric = true; MyMessage msgHum(CHILD_ID_HUM, V_HUM); MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP); MyMessage msgBaroTemp(CHILD_ID_BARO_TEMP, V_TEMP); MyMessage msgBaro(CHILD_ID_BARO, V_PRESSURE); MyMessage msgForecast(CHILD_ID_BARO, V_FORECAST); void setup() { // use the 1.1 V internal reference analogReference(INTERNAL); gw.begin(); dht.setup(HUMIDITY_SENSOR_DIGITAL_PIN); if (!bmp.begin()) { Serial.println("Could not find a valid BMP085 sensor, check wiring!"); } // Send the Sketch Version Information to the Gateway gw.sendSketchInfo("Mini Weather Station", "3.2"); // 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_BARO, S_BARO); gw.present(CHILD_ID_BARO_TEMP, S_TEMP); metric = gw.getConfig().isMetric; } void loop() { Serial.print("minuteCount = "); Serial.println(minuteCount); // The pressure Sensor Stuff int forecast = SamplePressure(); if ( minuteCount > 4 ) { // only every 5 minutes // Process the barometric sensor data float baro_temperature = bmp.readTemperature(); if (!metric) { // Convert to fahrenheit baro_temperature = baro_temperature * 9.0 / 5.0 + 32.0; } if (baro_temperature != lastBaroTemp) { gw.send(msgBaroTemp.set(baro_temperature, 1)); lastBaroTemp = baro_temperature; } if (pressure != lastPressure) { gw.send(msgBaro.set(pressure, 0)); //delay(1000); // gw.send(msgBaro.set(pressure)); lastPressure = pressure; } if (forecast != lastForecast) { gw.send(msgForecast.set(weather[forecast])); lastForecast = forecast; } // The humidity sensor stuff 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("Temperature: "); 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("Humidity: "); Serial.println(humidity); } // get the battery Voltage long sensorValue = analogRead(BATTERY_SENSE_PIN); // 1M, 100K 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+100e3)/100e3)*1.1 = Vmax = 12.1 Volts // 12.1/1023 = Volts per bit = 0.011827957 // sensor val at 9v = 9/0.011827957 = 760.909090217 // float batteryV = sensorValue * 0.011827957; long batteryValue = sensorValue * 100L; int batteryPcnt = batteryValue / 761; gw.sendBatteryLevel((batteryPcnt > 100 ? 100 : batteryPcnt)); // this allows for batteries that have slightly over 9v Serial.print("Batt %:"); Serial.println(batteryPcnt); } if ( minuteCount < 5 ) // sleep a bit gw.sleep(SLEEP_MINUTE); //while pressure sampling else gw.sleep(SLEEP_FIVE_MINUTES); } int SamplePressure() { // This is a simplification of Algorithm found here to same memory // http://www.freescale.com/files/sensors/doc/app_note/AN3914.pdf pressure = bmp.readSealevelPressure(60) / 100; // 60 meters above sealevel if (minuteCount > 9) { // we are going to test pressure change every 30 min (5*1min + 5*5min) lastPressureAvg = pressureAvg; minuteCount = 0; } if (minuteCount < 5) { pressureSamples[minuteCount] = pressure; // Collect 5 minutes of samples every 30 min Serial.print(" Sample("); Serial.print(minuteCount); Serial.print(") = "); Serial.println(pressure); } if (minuteCount == 4) { // the 5th minute // Avg pressure in first 5 min, value averaged from 0 to 5 min. pressureAvg = ((pressureSamples[0] + pressureSamples[1] + pressureSamples[2] + pressureSamples[3] + pressureSamples[4]) / 5); float change = pressureAvg - lastPressureAvg; dP_dt = (((65.0 / 1023.0) * change) / 0.5); // divide by 0.5 as this is the difference in time from last sample 0.5 hours Serial.print("dP_dt = "); Serial.println(dP_dt); } minuteCount++; if (lastPressureAvg < 0) // no previous pressure sample. return 5; // Unknown, more time needed else if (dP_dt < (-0.25)) return 4; // Quickly falling LP, Thunderstorm, not stable else if (dP_dt > 0.25) return 3; // Quickly rising HP, not stable weather else if ((dP_dt > (-0.25)) && (dP_dt < (-0.05))) return 2; // Slowly falling Low Pressure System, stable rainy weather else if ((dP_dt > 0.05) && (dP_dt < 0.25)) return 1; // Slowly rising HP stable good weather else if ((dP_dt > (-0.05)) && (dP_dt < 0.05)) return 0; // Stable weather else return 5; // Unknown }
-
RE: Iboard - Cheap Single board Ethernet Arduino with Radio
@tbully I'm using a Flashforge Creator. It's a Chinise clone of the original Makerbot GPL version. I have made a few minor mods to it and upgraded the firmware to the latest Sailfish version. It came mostly assembled, so I was up and running quickly. There are better printers on the market, but you get a lot for your money. Overall I have been happy with the investment, and it has been great to learn with.
-
RE: Iboard - Cheap Single board Ethernet Arduino with Radio
@ServiceXp Sorry, I can only do the design. Free to download and print though
-
RE: Iboard - Cheap Single board Ethernet Arduino with Radio
@hek sure, if you want. I hope people find the design useful.
-
RE: Iboard - Cheap Single board Ethernet Arduino with Radio
@ServiceXp Just added a new version of the box with LEDs and include button.
http://www.thingiverse.com/thing:483676 -
RE: Iboard - Cheap Single board Ethernet Arduino with Radio
@ServiceXp yeh, I was thinking about putting LED and inclusion button into it. I will have a bit of a thing about how best to fit it in.
-
RE: Iboard - Cheap Single board Ethernet Arduino with Radio
@gregl Here is my first attempt at a case for the iBoard. If I get time I will do a re-spin for the smaller radios without aerials.
-
RE: Ethernet Gateway 1.4 with Vera UI7
Thanks, I changed over to using a wiznet5100 based board (iboard) and it seems to have fixed the problem.
-
RE: Iboard - Cheap Single board Ethernet Arduino with Radio
I have built a gateway following the instructions above. It works well, and the mod was quite simple.
I have had a first cut at printing a custom case to match, unfortunately I had one of the holes in the wrong place. I will correct this over the next few days. When I get it right, I can post the design if people are interested.
-
Ethernet Gateway 1.4 with Vera UI7
Hi,
I am hiving some trouble getting the Ethernet 1.4 gateway going with Vera UI7. It seems to compile and install OK, but it doesn't function. Often pressing the "Start for inclusion button" on the Vera doesn't send any data (but sometimes it does), and after a short time following a reboot of the Vera, it sends the gateway all sorts of rubbish.I can telnet to the gateway port and what I type in shows in the serial debug nicely, and I can manually put the gateway into inclusion mode and I see the sensor data OK. Following is the serial debug (without the network traffic, and including a few extra debug statements)
Hello 0;0;3;0;14;Gateway startup complete. Gateway Started Hello, Ethernet Started Server Started 0;0;3;0;9;Inclusion started by button. 0;0;3;0;5;1 0;0;3;0;9;Inclusion started by button. 0;0;3;0;5;1 0;255;0;0;17;1.4 0;0;0;0;7;1.4 0;1;0;0;6;1.4 0;0;3;0;5;0 eth0-Hello - This is some text from telnet
It seems to start off ok, asking for the version, but then goes wrong. Following is a trace of the network traffic coming from the vera and going to the gateway:
0;0;3;0;2;Get Version .......1.0..@.........0..E.......1.0..@.........0..E...FFooma...^......1....2.........2.........1.0..@.........00..E...Fooma...^......1....22........2.........1.0..@..........0..E...Fooma...^......0..@.........0..E...Fooma....^......1....2........2..........1.0..@.........0..E....Fooma...^......1....2.........2.........1.0..@..........0..E...Fooma...^......1.....2........2.........1.0..@..........0..E...Fooma...^.......1....2........2.........11.0..@.........0..E...Fooma....^......1....2........2..........1.0..@.........0..E....Fooma...^......1....2.........2.........1.0..@..........0..E...Fooma...^......1.....2........2.........1.0..@..........0..E...Fooma...^.......1....2........2..........1.0..@.........0..E...Foomaa...^......1....2........2..........1.0..@.........0..E....Fooma...^......1....2.........2.........1.0..@..........0..E...Fooma...^......1.....2........2.........1.0..@@.........0..E...Fooma...^.......1....2........2..........1.0..@.........0..E...Foomma...^......1....2........2..........1.0..@.........0..EE...Fooma...^......1....2.........2.........1.0..@..........0..E...Fooma...^......1.....2........2.........1.0...@.........0..E...Fooma...^.......1....2........2..........1.0..@.........0..E...Foooma...^......1....2........22.........1.0..@.........0...E...Fooma...^......1....2.........2.........1.0..@..........0 ================================= CUT CUT CUT ========================= ...~....dM-SEEARCH * HTTP/1.1 ..@.@..C..........0..@j...E..1..@.@...... f.. ...~.....M-SEARCH * HTTP/1.1 ...3.t.@............Bp....E..(!.@.?..a..........6..........P...r .........=.....@...........Bp....E...(!.@.?..`.........6..........!P...q.........N%p^..@............Bp....E..(!.@.?.._..........6.........=P...q.............fF.@...........Bp.....E..(!.@.?..^.........6.....803006 3 ipp://192.168.10..102:631/printers/Brother_HLL-2140_series "Office" "Brotther HL-2140 series" "Brotheer HL-1240 Foomatic/hl1250 ((recommended)" job-sheets=noone,none lease-duration=300 '..4.@...........Bp....E...(!.@.?..H.........6...........P...oN.........7AKz.@............Bp....E..(!/@.?..G..........6..........P...o2..........mZ}..@...........Bp.....E..(!0@.?..F.........6...