jenswilly.dk


Prototype ready

The prototype has been assembled and the first version of the firmware (including the no-button, Gauss-Newton calibration) is done. The calibration routine has been converted from Rolfe Schmidt's Arduino sketch to raw AVR Libc.

Here's a video of the prototype being put into calibration mode, calibrated and then turned on in normal mode.
The camera doesn't do the RGB LED credit and the colors aren't reproduced very well – probably because of the high intensity of the LED.

And I have changed the colors a bit since the last few posts. So now a white light on power-on means "if you switch off now the device will go into calibration mode on next power-up". And the blue flashing LED means "switch to next orientation and hold the sensor still". After a reading it will flash twice either green (meaning "reading ok") or red (meaning "bad reading – hold it still, man")  and lastly it will keep flashing green meaning "calibration done – cycle power".

When in normal mode, the G readings on each axis are clamped to 0-1 (I'm using the absolute value, so -1 G is the same as +1 G). This is then converted to a PWM duty cycle between 0% and 100%.
Red is the X-axis, green is Y and blue is Z. That's why it lights a solid blue when lying flat on the table: the only acceleration is 1 G on the Z-axis.


One comment on "Prototype ready"

[...] protocol, collecting data in phases, lighting up status lights (as Jens does with his RGB Tumbler [video]), responding to button presses, or more.  The SimpleDataCollector used here just collects a fixed [...]

Leave a Reply