Posts

Popular posts:

Measuring bank angles with the MPU6050 and Raspberry Pi - The introduction and hardware requirements

What this blog is about : The following series of blog entries will describe how to measure bank angles on a motorcycle using a raspber ry pi and the MPU6 050 circuit board as hardware and python as software language. The entries will cover the practic al approach on how to w rite a sma ll set of routines, that allow you to use the hardware on a motorcycle and how to p ostprocess and evaluate them. It does not cover the complete theoretical b ackground of the measurement principles or the basic software c oding ideas of subfunctions, interrupts and hardware readout . Other blogs, w hich I will refer to throughout this series, cover this way better. To sum it up - I focus on the combination of different ideas and their practical application, found in other blogs. I think it mi ght be some helpful advice or at least a small manual on which mistakes to avoid . The motivation and putting some thoughts into order:   A good friend of mine loves to ride motorcycles and as he ...

Building a watering can with an arduino and an aquarium pump

Image
The motivation: At our workplace, there is a room full of smart people. Everyone has a Master’s degree in mechanical engineering and most of us are doing a PhD in mechanical engineerning – So on paper we should be pretty smart. Yet still, our collective brainpower is not able to remember to water the office plants at least once a week. There could be the easy way out to just set a fixed date on the smartphone to set off an alarm when to water the plants. As we are hugely talented in procrastinating, we went for a different approach. Why not use an Arduino and an aquarium pump to water the plants automatically? Welcome to the utopia of lazy PhD students! The hardware requirements: The parts list depends on how sophisticated you want the plant watering system to be. You could just have a DS1307 RTC i2C module that tells you the time and similar to the advent wreath project you pick a certain time when the pump has to be activated. The pump itself usually requires more power t...

Building an electronic advent wreath with an Arduino Uno

Image
The motivation: It was Christmas season and there is the obligatory waiting time between December 1st and December 24th until you can stuff yourself with enormous amounts of food and unwrap some presents and then complain about the weight gain that noone saw coming. To pass that time a little faster, you usually have an advent wreath and light a candle every seven days. As we were eager to stuff our bellies but were not allowed to light candles at our workplace, due to fire protection, a friend of mine and I decided to build an electronically controlled advent wreath. Instead of candles, we decided to use LEDs – Less fire, less problems. And as we are lazy engineers we wanted the thing to light the LEDs by itself, when it was the right time. The hardware requirements: Basically all you need is something, that tells you the time and something that lights LEDs. We decided to go with a DS1307 RTC module, as it features the I2C protocol and has an excellent Arduino library ava...

Measuring bank angles with the MPU6050 and Raspberry Pi - The first tests

What happened so far Throughout the last blog entries I briefly explained the motivation and idea behind measuring the bank angles on a motorcycle with the help of a raspberry pi and the MPU6050. We then focused on the hardware- and software requirements as well as the basic coding structure . First data and validation: With the hard- and software ready it is time to test. At first I wanted to make sure that the sensor produces accurate results. For this purpose we took the motorcycle, lined it up without starting the engine, and tilted it left and right. The next diagram shows the bank angle vs. time. One can see the angle that has been calculated from the accelerometer input.   The chart shows a constan t angle output for the motorcycle in straight upright position of 5 deg rees wit h the engine switched off (blue line). The 5 degrees offset for the straight position come from the mounting of the MPU6050 on the circu it board. This is perfectly fine and and off...