Posted: April 22nd, 2013 | Author: admin | Filed under: AQE | Tags: Air Quality Egg, AQE, aqe sensor | Comments Off
Based on my research findings (described in my last post), I spent some time digging into the Egg Shield hardware and firmware and I made some significant updates in hopes of improving results. I’m currently running an overnight experiment of the latest firmware, which I pushed out on GitHub (also for the Ozone and VOC add-ons). I also put load scripts out there to help ease the update process. I wanted to give an update on what I found and what I did.
Constant Heater Voltage
There was an observable random “spiking” phenomenon associated with the dynamic heater voltage control algorithm. I still don’t know the root cause of that, but I know that if I take that algorithm out, the associated phenomenon goes away, so the current version of the firmware sets the voltage at start-up and leaves it alone. I determined the settings for each heater experimentally by trying a setting, measuring H+ and H- and calculating the heater power, until I hit the datasheet targets.
Range Selection Algorithm / Fixed Point Math Rewrite
I was concerned about the frequent reports of apparent overflow conditions occurring. I looked into how to make better use of our range selection capability and rewrote it to select the range that yields results that are closest to the mid-range voltage. I believe this algorithm should provide more stable / continuous results than the original algorithm. In particular, I expect that it will be more immune to overflow conditions.
NO2 Hardware Bug – Workaround
In re-writing the Range Selection Algorithm, I was astonished to find an undiscovered hardware bug in the Egg Shield. I kept trying different settings on the range selection divider for NO2, but no matter what I did, two of the range settings always yielded the same analog-to-digital conversion result. I dug in and traced it back to the schematic (after hours of assuming I must be doing something wrong in software).
It turns out there is a node named “/NO2_R2_SEL” and a separate node named “/R2_SEL.” Those were meant to be the same node, but the tools don’t know that, so they never got connected in the layout. The effect is that it’s impossible to select a low-side resistance of R1 + R2 = 24.2 kΩ for NO2. <face-palm!> The firmware didn’t know about that bug either, so its model of the world didn’t agree with reality when it chose that range. This inconsistency was almost certainly also contributing to the instability in the NO2 readings we’ve been seeing. Anyway, the firmware agrees with the hardware now. I think it will be less accurate than it could have been were it not for the hardware bug, but I think this will be much better than what we had going on.
What To Do Next
I’ll follow up with a post tomorrow night with my overnight results. If you’re ambitious and know what you’re doing, the software and binaries for the firmware updates above is already out on GitHub and you can go ahead and re-flash your Egg Shield to hopefully start getting better results right away. As a reminder, Joe Saavedra also made a nice tutorial on how you can use an Arduino (or a Nanode) to reprogram a Sensor Shield. I plan to do a video to demonstrate that process as well in the next couple weeks. As always, if you’re uncomfortable reprogramming the hardware for yourself and you are willing to pay for the round-trip shipping, I am willing to personally reprogram your hardware at no additional cost.
Posted: February 4th, 2013 | Author: admin | Filed under: AQE, Software | Tags: Air Quality Egg, AQE, software | Comments Off
Over the weekend I worked on making the color expressions of the Air Quality Egg more… well, expressive. The update is on Git-Hub so feel free to update your software (howto videos) for the Remote and Base units. This is the 1.03 version of both baselines (version number gets printed to the serial console).
As the Eggs have been reaching their destinations, feedback from users indicated that the setup process had some significant holes in diagnostic feedback. The most important of these was that the outcome of the pairing interval was invisible to the end user; the only way you knew that pairing succeeded was that the system started working a couple minutes later. If the system didn’t start working, you were left scratching your head and trying again. So I added an acknowledgement to the pairing behavior, and now there’s clear feedback about the outcome of the pairing interval: after the yellow pulses that signify pairing in progress, three magenta blinks indicate “pairing was not acknowledged” and three cyan (light blue) blinks indicate “pairing was acknowledged.”
The second feedback notable feedback confusion was related to Cosm provisioning. The previous behavior was to indicate solid green when provisioning succeeded, but *only the first time* after that you would never see green again. So now, if provisioning has previously succeeded, you get three green blinks.
In summary, the colors the Egg expresses now come in three “flavors”:
- Pulsing colors are used to indicate normal activity and progress (I know some people find this annoying, but I’m erring on the side of more feedback)
- Blinking colors are used to signify status
- Solid colors are used to indicate conditions that result in a restart
- Blinking/Solid green, blue, and cyan are used as “positive” indicators
- Blinking/Solid red and magenta are used as “negative” indicators
The following flowchart describes the feedback behavior of the 1.03 baseline.
Posted: December 6th, 2012 | Author: Vic | Filed under: AQE, Nanode | Tags: Air Quality Egg, AQE, aqe sensor | 1 Comment »
This one is for everyone who only got an Air Quality Egg Egg Sensor Shield. I wanted to write it as a way of aggregating a bunch of information that is scattered across the interwebs presently. I’m also going to write it from the perspective of a Nanode as the host processor as that’s what I’m most familiar with and that’s what I wrote some code for. Here is the basic idea of how to get up and running quickly.
- Send us your MAC address (e.g. 00:04:a1:3c:11:22) from your Nanode to support AT wickeddevice DOT com (you know the drill). We need to register your device with Cosm to fold it into the Air Quality Egg network. If you run the sketch below and look at the serial data output, the MAC address gets printed out for your convenience.
- We will respond by email and let you know you’re hooked up on the back end.
- Download the software from Git Hub.
- Copy everything from the libraries folder to your arduino libraries folder.
- Load the AQEBaseSensor sketch onto your Nanode.
- Go to http://airqualityegg.com and type in your MAC address .
- Enjoy your data!
For people who got full-up Air Quality Eggs, we will have basically done everything up to step 6 for you (with different sketches). I’m completely swamped through December at least… it would be totally amazing if someone from the Air Quality Egg community could port this sketch to Arduino/Wiznet… I think it should be a relatively straightforward exercise.
Posted: November 17th, 2012 | Author: Vic | Filed under: AQE, Uncategorized | Tags: AQE, sensor | Comments Off
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: September 10th, 2012 | Author: admin | Filed under: Uncategorized | Tags: AQE | Comments Off
We just ordered 100,000 of 100nf capacitors for the Air Quality Egg. Achievement unlocked!
Posted: July 18th, 2012 | Author: admin | Filed under: Uncategorized | Tags: AQE | 2 Comments »
Recently we prototyped the add-on boards for ozone and volatile organic compounds (VoC). Both of these use the same PCB, with different population options. The circuits are very similar, and this helps keeps costs down. At right is the VoC sensor.
The add on boards speak I2C, which makes adding new boards easy. Anyone with a sensor can make a board for it and leverage the egg infrastructure to send the data up to the web. It does not need to be an air quality sensor – pretty much anything will work if you are prepared to make software changes to do something useful with the data.
- There is an ATTiny48, as with all the sensor boards.
- Each board has a unique ID, which means the boards are all individually addressable.
- Connection is via the 2mm pitch cable. This board plugs into the AQE shield. My hope is that we will have a daisy chain sensor network topology, but right now it is star. This would mean adding a second connector onto each board, pushing up the cost. Right now, the board in the picture is as it would be shipped (plus the cable, of course).
As always, click on the image to biggify.
Posted: July 16th, 2012 | Author: admin | Filed under: Uncategorized | Tags: AQE | 4 Comments »
We have made a lot of progress on the Air Quality Egg, so it is time to share some updates. I’ll do another post with some high level information. For now, let’s dive right into the AQE shield.
On the right is a build of the egg shield mounted on top of an SMD Nanode RF. Let me point out some of the important parts of it:
- The shield includes two sensors, CO and NO2. The round pads for these are visible below the yellow softwire. I’ll post a pic of the sockets and sensors soon, so you can see how that works. The most important thing is that they are quite high and need airflow, so you won’t be able to stack shields on top of the AQE shield.
- There are also 4 cable connectors to wire in additional I2C sensor boards. These are divided into two separate channels, and can have a bunch of sensors on each channel (up to 128? Anyway, a lot, and we’ll run into other constraints long before that). All extra sensors will be added on using this interface. These connectors are 2mm pitch, NOT JST’s.
- Power will be supplied using a 2.1mm center positive barrel jack. This jack will power the shield, Nanode and any additional boards. Currently we do plan to populate the 5v micro-USB connector visible at top left, but it will not be plugged in, and the AQE enclosure will not include space to connect it.
- The diamond shaped chip below the yellow wire is an ATTiny48 – so plenty of pins and space to write some code. Currently, I do NOT anticipate that the 6-pin programming header will be populated for production, but you can certainly add it yourself if you want to reprogram the tiny-48.
- In this image the RFM12 radio is not populated, but of course that will be included.
Ignore the yellow softwire. If you are curious, it is providing 5V to the 2.5V regulator (whoops!) and will not be present in the production version of the board.
Posted: May 5th, 2012 | Author: admin | Filed under: AQE | Tags: AQE | Comments Off
Now that the Air Quality Egg has been funded, my goal is to post updates every couple of weeks, probably with the exception of the week around Maker Faire. If you have any updates that you feel I have missed, items that should be included, or corrections, please let me know.
Sensor boards: Vic has posted a first draft of the sensor board schematic on Github. All boards will be in Eagle. The free version will work fine. Be sure to download Eagle if you want to follow along.
Final unit counts: We still don’t have the final numbers of who ordered what. Kickstarter does not make it easy to get this, and Albert is doing yeoman’s work sorting it all out. Please respond if you get an email asking you what you ordered. We can’t finalize the costing and a timeline until all these numbers are in.
Enclosures: Albert has also initiated a discussion on the sensor enclosure on the AQE Google Group. Now is the time to speak up if you want to contribute.
Money: It takes two weeks for Kickstarter to pay out, and we have now received $131,500, which is the total raised less 9% in fees. Thank you once more!
That’s all for now.