Here’s the executive summary of the last 2 weeks
- A version of the iOS app has been submitted to Apple for their review.
- Found a bad hardware bug, fixed it with firmware (see below)
- Found and fixed a variety of sticky firmware bugs
The iOS app has been submitted to Apple for review. In the comments on a previous post, a reader showed that sometimes the reviewers ask for hardware. If they ask I will provide it, but there’s no standard interface for providing it so I linked them to a video demonstration of the app working with a meter. I’ll let you know what I hear back. Here’s a link to the video I submitted, I won’t embed it here because it’s rather long and dry, but in case you’re curious you can check it out.
Bugs and Features
Resistance Measurement Bug
The Mooshimeter has a configurable current source that supplies current to the Ω output for measuring resistance and diode drop. I found (and patched) a nasty edge case that caused measurement of very high resistances to be way off. Here’s a video of that problem:
That video was taken 4 days ago and I’ve since figured out a firmware based solution. The firmware patch just has the meter momentarily switch a pulldown resistor* in on the active input if the resistance reading is above a certain threshold. The momentary pull is all it takes to drop the amplifier out of lockup. The next time there’s a chance for a hardware revision this portion of the circuit is going to get some overhaul.
*This pulldown resistor is a feature that I haven’t talked about before… it opens up some measurement possibilities down the road, but I haven’t had time to fully explore them yet. More on this when there’s time.
As requested by several backers who have been following the blog and providing great feedback (Thanks Beat and John), being able to force the meter in to hibernation through the app is an important feature. Not everybody can carry a tool broadcasting radio packets all the time.
Life on a Single Core
I’ve also found and fixed a variety of insidious bugs causing firmware lockup and data corruption. Most of them stem from the fact that all the analog processing and the radio protocol processing is happening on a single microcontroller (a CC2540 SoC). Having everything go through one microcontroller gives reduced hardware complexity, lower overall power consumption, and reduced hardware cost. But it adds challenge to the firmware, since there are two processes with hard real-time constraints competing for a single resource, and if one runs too long Bad things happen. Some examples of things I’ve fixed in the last 2 weeks:
- Some BLE masters don’t respect connection parameter update requests. A BLE connection has a fundamental interval called the “Connection Interval”, which is how often the two devices on either side of the connection exchange messages. So if the BLE master doesn’t respect the meter’s request for a longer connection interval, the meter may have to wake up and service the radio in the middle of an analog sample, causing corruption. The firmware now detects when this problem has occurred and interpolates for missed samples. It’s not a perfect fix but in practice it’s been fine.
- Computing RMS values (for AC voltage and current) is time intensive when you’re processing 24-bit samples on an 8-bit core. In some circumstances, the calculation could run for too long and cause the radio connection to drop.
- The interaction with some SD cards takes longer than with others, and an interaction that runs too long will fill the time needed by other tasks. I haven’t fully debugged this yet, I am leaning towards punting it to an update so I can focus on getting the apps done and meters in people’s hands, even if the logging doesn’t work yet.
But when will they ship?
Nobody is more anxious to get meters out the door than I am. I definitely underestimated how long the app development part of the process would take. I think it’s a few more weeks of concerted effort. And it feels bad to say because I know I’ve been saying that since October. Christmas is coming up as well, and Mooshim Engineering LLC will be closing for the holidays. There are still unknowns with the Android app, but it’s going much faster than the iOS app because it’s more of a port than a composition from scratch. My estimate right now is that meters will be out the door in mid January. I apologize again for the delay and thank you for your patience in helping to bring this product to market.
Interested in beta testing?
It would be nice to have a group of people with varied devices to release app updates to before releasing to the group at large. For Android I can put a “beta” .apk file on the website and people can self select, but for iOS Apple keeps a tight leash on the ecosystem and beta testers for any app must be registered. So if you have an iOS device and are interested in beta testing, please register here!