Posted: November 17th, 2012 | Author: Vic | Filed under: AQE, Uncategorized | Tags: AQE, sensor | Comments Off on Air Quality Egg: Setting R0 Values
Some people have been trying to update their fielded Egg Shields and running into trouble with really small values being reported (like 0). One reason this could happen is a mistake made here at the “factory” during programming. The sensors rely on a value stored per sensor called R0 – which is to say the nominal resistance of the sensor in ambient conditions. During device programming, we should have set these value to something reasonable. We set R0 for the NO2 sensors to 2200 (ohms) and R0 for the CO sensors to 750000 (ohms).
To do this procedure, you’ll need an FTDI cable or equivalent to program the device using the Arduino IDE. If you download the EggBus library from Git-Hub, it comes with a few useful examples. If you start by loading up the PollEggBus example (File => Examples => EggBus => PollEggBus”), it will show you, for each sensor it finds on the bus, a bunch of useful information. You’re going to want to look closely at what it says for “R0:” – and if it’s a “really big value” (like 4294967295, which turns out to be 0xffffffff to the binary initiated) we’ll have to run a quick sketch to get things back on track. Load up the PollEggBus_WriteTest example (File => Examples => EggBus => PollEggBus_WriteTest) and run it. After it runs you should see NO2’s R0 value is 2200 and CO’s R0 value is 750000 as advertised.
You can change these values to whatever you want actually, and I’m going to write up a derivative example that lets you perform a targeted calibration procedure in the near future.
Load back your Air Quality Egg sketch back onto your Nanode after you run this program (for standalone eggs this is probably the AQEBaseSensor sketch, and for Egg pairs it’s probable the AQERemote sketch). Hopefully this helps you out if it seems like your Egg is always outputting zero.
Posted: August 13th, 2011 | Author: Vic | Filed under: Wireless | Tags: nanode, pachube, sensor, software, wickedreceiver, Wireless, wNode, wReceiver | 3 Comments »
The other day I got my Nanode talking to Pachube! That in and of itself is pretty cool, and it was also pretty easy given that there are a fair number of examples out on the web and a well documented API for interacting with Pachube. I extended some of these examples to use our Wicked Node and post received data to a Pachube sensor feed. I think my biggest contribution here perhaps was a bit of refactoring of the code so that the major chunks are re-usable in future sketches. Maybe some of it can maybe even make it’s way into the EtherShield library. I’ll provide my sketch attached to this post for anyone who wants to check out the details. I also want to share some general knowledge about debugging networks and software that interacts with networks, which I’ll dedicate my next post to.
So part one – the general program flow goes like this:
1. Set Serial to 2400 baud (for radio interface)
2. Initialize the Ethernet interface with a MAC address
3. Get an IP address using DHCP (optional)
4. Initialize the IP/UDP/TCP stack with a MAC address, IP address, and WWW port
5. Set the Gateway and DNS IP addresses
6. Wait for the Gateway to recognize the Nanode
7. Resolve "api.pachube.com" to an IP address using DNS
8. Initialize the Web Client part of the EtherShield library
1. Wait for wireless sensor data to be recieved
2. When data is received populate a template string and post it to Pachube
Pretty simple, right!? Well there is an example with the EtherShield library for demonstrating DNS and a separate example for demonstrating DHCP, and another example that demonstrates Pachube (getting information *from* Pachube actually), but besides the DHCP example, nothing really tied in DHCP; the other examples just use static IP addresses and call it day. So I refactored the code in the DHCP example so as to make the acquisition of an IP address over DHCP into a function call that I could just call from setup(). I insightfully named this function
acquireIPAddress, and I’m pretty sure it will be useful in many a sketch in the future (for me and others I hope). Similarly in looking at the DNS example, it was kind of hard to see how you ended up with a resolved address, so I made another function that I think is a little more intuitive from an API standpoint that takes a null-terminated string as the address to resolves and a buffer into which it puts the resolved IP address. I decided not to get too creative and named this function
I think factoring out these two functions really makes reading the
loop functions a whole lot more digestible to the average human. As a last step I tidied up my code and moved things around so that all the configuration for the sketch is up top, including whether you want to use static of dynamic IP parameters, your Pachube API key and how you format and populate your Pachube post template. If you want to use the sketch as a basis for your own application, you’ll have to download the EtherShield library and WickedReceiver library and drop them in your Arduino libraries folder to get it all to compile.
Have fun getting your Nanode onto the internet and let us know what cool things you’re doing it!
Download the Sketch Here: Pachube_WickedNode
Check out this other blog post for a variation on the sketch that doesn’t use the Wicked Node, but instead posts ADC inputs directly from the Nanode.
Update: 12/14/2012 – The EtherShield library was retired earlier this year in favor of the EtherCard library. At some point I may get around to making another update to this post, but the EtherCard library already comes with a pretty easy to follow Cosm (the new name for Pachube) sketch. As always, feel free to post to our forum if you have questions.
Posted: January 1st, 2011 | Author: admin | Filed under: NewProduct, Wireless | Tags: Arduino, radio, sensor, Wireless | Comments Off on Two new products – transmitter and receiver
Announcing two new products, a 433 MHz transmitter+sensor, and a receiver shield, both available in our store. Both are designed for short range, power sensitive applications.
The transmitter and sensor combination makes it very easy to add both digital and analog remote sensing to your projects. It has modes for periodic and event based transmission. Sensor pads make it very easy to solder up to 4 sensors to each sensor. Range is up to 300′ line of sight. It is extremely power frugal, ideal for drop-and-forget sampling.
The receiver is simple, and gives you wireless capability on your ‘duino for under $10, the cheapest we have seen. Together they provide a short range wireless link and sensor package for under $25.
The make pages are:
We hope you enjoy them!