-
A New Sensor Platform!
08/17/2015 at 15:39 • 0 commentsSo I've done some project logs about my 915MHz Droplet hardware and Hub. They have really been solid pieces of hardware but I'm always looking to improve. There are a few things that I dislike about droplets that are preventing me from proliferating further:
1) Cost - they cost me about $25 to make, that is pretty cheap but if I could get the price down to $12.50 the I could make twice as many sensors and that is a big deal.
2) Requires a Hub. The hub is cool but for getting people started, I wanted to create something where the hub was optional. Ideally it would interface directly to someones smart phone....
3) Batteries - the 2450 battery is pretty neat, compact and powerful. In testing, I got about 5months life out of it. When it dies, a new one needs to be soldered into place. I don't find this to be an issue for me but if I wanted to sell to others, it was apparent that it is not a feasible solution. The CR2450 in small quantities is also expensive and drives some shipping issues (lithium cells).
So I set out to create a new low cost, easy to use sensor node and here it is:
Like all of my boards, the design is done in upverter and I fab my prototypes at OSHpark. I'm using a on board PCB trace antenna (for cost reasons) and have selected the HopeRF RF75 Chip for a radio. The primary reason for using this radio is that it is low cost but I wouldn't let that fool you, it is also an awesome chip for the price. It is nearly equivalent to the venerable Nordic nRF24 chip and I've run many tests and it is for sure over the air compatible.
The MCU is a MSP430G2553IRHB and I am using Energia as the programming IDE. This is the Arduino clone that is compatible with TI processors. Also I must say that this has been done with a lot of collaboration with the 43oh.com forum which is a really awesome group of people who I like to talk shop with.
For Battery, I've chosen to use a AA form factor. This is driven by a variety of reasons, mostly the fact that this is the most common battery in many households and can be purchased anywhere so I don't need to supply one myself. It also has excellent capacity for long term life.
It does sound a little skewed but relatively speaking is large in physical size. Anyway, only a single cell is used so there is also a NCP1400 boost converter integrated not he board to boost the battery voltage to 3.3V. This also means that every last drop of power will be extracted from the battery due to the NCP1400's extremely low dropout voltage.
Here's an image of the first 6 prototypes:
Sandwiched between the battery holder and the board is a 20pin connector that has 2 programming pins, 2 ground pins, 1 3v3 power pin and 15 GPIO.
The pin out is designed to plug directly into a TI MSP430 Launchpad for easy programming. By adding two wire jumpers, you can even use the same Launchpad debug UART.
I'm also in the process or writing a library for the board which will be Energia (and Arduino) compatible. The radio interface is inspired by the Enrf24 library by another 430h.com member. It has a super easy API. Here is an example of a barebones transmit code:
It inherits the print class because everyone knows how to use that! That sketch compiles into 4k of code...
So the one thing that I haven't talked about yet is how this hardware achieves my second goal of interfacing to a smart phone. Usually BLE is used for this function but BLE is notoriously complicated and expensive for DIY because it requires expensive modules.
Well this hardware does support a limited about of BLE functionality! It use the same trick that was discovered here but abstracts away nearly all of that complexity and uses almost the same API:
There are other calls as well but these are the easiest. This will transmit a standard BLE advertisement with the text "Hello World".
Right now there are some limitations most of which I don't think effect wireless sensor applications but are prohibitive against all of the things that one could do with a full BLE stack.
1) Only Transmit is supported right now (Device -> Phone)
2) The Maximum payload of data is 14 bytes
Like I said, if my only intent is to transmit sensor data, 14 bytes is plenty!
I'm also working on an iPhone app that will receive these Beacons and forward information to analog.io for storage and further processing.
-
Measuring the Weight of Beehives
08/17/2015 at 14:49 • 3 commentsBased on my work from last winter and other awesome work that the community has done. Some if it even documented right here on hackaday.io, I decided to add weight measurement to my setup. For now due to cost it only encompasses one hive but I already have plans to add more!
The build is pretty straight forwards, the first step is that I purchased this scale from Amazon:
Upon receiving the scale, I started running some experiments and naturally taking it apart, here is an internal photo:
There's really not much to it, just some strain gauges and wires. What I liked about this one is that it had some very nice readout electronics that were external to the scale so I could simply cut the wire, add a connector and swap out my custom electronics with the "gold standard" any time that I wanted to. This proved to be very useful during calibration.
For the strain gage ADC, I selected HX711, this is a very popular device because it is easy to use and really just works!
Using nearly all of the same wireless hardware as I used for my Temp and Humidity project, I used the spare IO on the droplet to interface to the HX711.
Because the size constraints on this device were less and power consumption of HX711 is higher, I decided to power it from two AA batteries. You can also see the waterproof enclosure that I am using.
Luckily because this radio is outside of the hive, I can also now get full range WITHOUT the need to the AC extension cord and hub in the woods. Now the hub can sit comfortably indoors.
Here's some pictures of the installation of the scale into the hive:
In the end, you really cant even tell that it is there!
So here's the data:
What I find fascinating is that each day, you can see the volume of Bees who leave the hive to forage and then return in the evening. This is a very periodic pattern and you can even see the days which it rained (because they stay in the hive).
Also, the two discontinuities of weight in the chart are due to adding and removing an additional "Honey Super" to the hive stack.
We were really thrilled to see the awesome nectar flow in the month of July, things have sort of settled down in the last few weeks but I'm hopeful that there will be one more flow before the honey is harvested!
-
Measuring the Temp and Humidity of Beehives
08/17/2015 at 14:15 • 0 commentsOne of the main reasons that I started analog.io was because I had an interest in using internet connected sensors to measure various sensors inside of bee hives. The first thing that I wanted to do was measure the Temperature and Humidity of a set of Bee Hives in Wisconsin over the winter.
There are quite a few challenges associated with this:
So for the first iteration, it was clear that I needed to create my own wireless temp & humidity sensor and it also needed to get at least 260ft+ of range. It also needed to survive the attenuation of the hive and house and be low enough power to survive the winter without charging or power. Here's what I came up with:
(ignore the imp.guru logo, this was the name of the web application prior to me acquiring analog.io)
So these were the sensors, I then needed something to connect these to the internet. For this I created a 915MHz radio to WiFi bridge which I simply call "The Hub". It has a LNA/PA front end, then uses an Electric Imp to bridge the packets over to WiFi. From there, I wrote some Electric Imp Agent code to upload the data to analog.io.
With all of the hardware setup, I did some range tests and found that I could get great range with the radios (about 300ft) but unfortunately as soon as they were installed into the hives, the attenuation was pretty bad, reducing my range to only 100 ft. With winter closing in, I did this installation:
So I'm happy to say that this setup worked almost continuously for 5 month, and captured some pretty cool data:
It is amazing to think that the temperature inside of a bee hive can be 77 deg F while the outdoor temp is negative 6! It is also amazing to me that all of my hub hardware survived the bitter cold and is still running today.
-
analog.io web application
08/17/2015 at 13:55 • 4 commentsI'm happy to say that the analog.io web application has been successfully deployed to our servers at Digital Ocean! The site also uses ssl encryption for some added security.
The web application is developed using multiple web technologies, at the base Postgres is used as the database and a Ruby on Rails backend connects to this database. When users are not logged into the site, all pages are served directly from rails however once you create an account and log in, a AngularJS fronted is run directly in the browser and makes JSON REST API called to the backend.
Using AngularJS has a lot of advantages, it really gives a responsive feel to the website and the framework takes care of many of the low level actions that an application requires. Things like button listeners, messaging, data scoping, API management even rendering the HTML templates for the site. This not only improves user experience but also reduces overhead on the server so that more people can be served by less hardware.
The basic functionality is that when the user logs in, they are greeted with this screen:
Then if you have an existing data.sparkfun.com stream, you can import it into the tool by clicking "Import Stream" and then entering the public key from Sparkfun. After clicking OK, analog.io will automatically.
Besides importing streams, analog.io also allows you to look for other peoples data streams. It is also location aware so it can show where various streams are located using google maps. Here are are all of the streams created by analog.io users in the US:
You may also search by category, for example, there are over 16 streams at analog.io that are currently measuring temperature:
That should be enough for the first update but there are plenty more features as well. Right now there are 308 people who have signed up for analog.io accounts and the number grows each day. There is also data from 25 countries!