Ohnitsch Cartoons Cartoons, Electronics, Acrobatics and other things.


Using Eclipse instead of Keil C51 uVision for EnOcean firmware development

This article describes how to develop Firmwares for EnOcean EO3000I based modules with Eclipse.

After using the rather mediocre Keil uVision for too long for developing Firmwares for the STM3xy modules I thought that there must be a better solution, and voila, a day of work later I managed to get everything up and running with Eclipse! Finally autocomplete, indexing and all the amenities of Eclipse.


Measuring heart rate with a piezoelectric vibration sensor

While trying to create a circuit that detects whether water is flowing through a pipe by measuring the vibration with a piezoelectric sensor, just to see what happens I taped the sensor around my finger and - to my surprise - got values that were a very noise-free representation of my heart rate!

Piezo sensor taped to finger

Piezo sensor taped to finger

Analog values from a piezoelectric sensor taped to my finger.

Analog values from a piezoelectric sensor taped to my finger.

This is even easier than using LEDs as it only requires a piezoelectric sensor and an Arduino. (and a piece of tape)
The sensor I used is a DFRobot Piezo Disc Vibration Sensor Module.

When defining an arbitrary threshold (e.g. half of the maximum measured value), the rising edge of the signal will pass the threshold once per heartbeat, making measuring it as simple as measuring the time between two successive beats. For less jitter, I chose to calculate the heart rate using the average of the last 16 time differences between the beats.

Here's a quick and dirty code that calculates the heart rate and outputs the average heart rate over the last 16 beats at every beat:

If you would like to try this at home, just connect the analog output of the sensor to A2 (or change the code) and connect the 5V and GND lines of the sensor.


Remote controlled 2-axis webcam with Arduino

This is a little afternoon-project I did today! It's a 2-axis mount for my webcam that allows it to be rotated 180° in each direction from anywhere in the world!
I used 2 cheap servos, random Lego parts and an Arduino Chris gave me last year. I wrote a little Program in java that acts as a server and forwards commands to the microcontroller and a Flash app that sends commands to the Java server, works great 🙂
If you have Skype and want to try controlling the cam, poke me!

arduino remote controlles webcam
Totally not hacked together!

Filed under: AVR, Hacks No Comments