Archive for January 2011


I am sorry to inform the visitors of this blog that they will have to register prior to placing comments. The reason is that I have to spend an increasing and excessive amount of time in parsing rubbish and real messages (for which I thank you ;-)). Bear in mind that you can change the […]

Tilt Sensor (Part 8)

Part 1, 2, 3, 4, 5, 6, 7, 8, 9 We have now covered most of the required functions to build a state of the art tiltmeter. Some additional general purpose libraries are necessary to build a stand alone device: PlainLCD (LCD driver), PlainENC (Encoder dirver) in addition to the standard math and EEPROM libraries. Please check this page if you are interested in […]

Tips and Tricks (9)

Previous T&T This trick relates to the use of nested Libraries, e.g. LibB Library requires functions from LibA Library. Ultimately, LibB functions are to be used in MyApp application This the way of building header and code files: LibA.h #ifndef LibA_h #define LibA_h #include class LibA { public: /* LibA functions */ private: }; #endif […]


Thanks for visiting my blog. I am running some statistics on the visits of this blog since I created it in June 2010. I am sure that some sales departments would love to show the same progress 😉 They are usefull for me for orienting the subjects in the direction of the greatest interest of […]

Tilt Sensor (Part 7)

Part 1, 2, 3, 4, 5, 6, 7, 8, 9 Calibrating the accelerometer on each boot may be boring! It might be a good idea to store the calibration parameters in some non-volatile memory space so that we could call them back on boot. The ATMEGA has a built in EEPROM memory space which will be perfect for this use. First of all, we […]

Tilt Sensor (Part 6)

Part 1, 2, 3, 4, 5, 6, 7, 8, 9 Unless you plan to use the tilt sensor for detecting 90° tilt angles (e.g. dice position), you must calibrate the sensor prior to running accurate tilt angle measurements. There a many ways of achieving this task. The described method is pretty simple and gives very good results. Under these calibration conditions, starting at 0:0 […]

Tilt Sensor (Part 5)

Part 1, 2, 3, 4, 5, 6, 7, 8, 9 Once offsets have been subtracted from the raw data, it is time to convert them into scaled data (Gs actually) by applying the sensitivity convertion factor for each axis. Alike offsets, sensistivity factor can be taken straight from the data sheets (300 mV/G), or pre calculated in a calibration routine. /* Compute acceleration in […]

Fast Signal Sampling (Part 5)

Part 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 11, 12 Scanning data from an analog port inevitably leads to some compromises: time resolution or signal resolution. We know that converting analog signal in digital counts takes time, whatever the conversion mode except may be the flash conversion (which is neither […]