Week 10 - input devices

Add a sensor to a microcontroller board to measure something

Posted on April 15, 2015

What I'm gonna do this week?

For this week I choose to make an accelerometer board, because one of my plans to final project is to make a bicycle alarm using a movement sensor like an accelerometer or tilt.

We couldn’t buy the SMD 2D accelerometer because the minimum order is something about 1.000 thousand pieces. So we order the ADXL335 accelerometer board. Then I changed the Neil’s hello.accell.45 design to add one more axis as the ADXL335 has 3 axis, and also I added a connector to put the accelerometer board. This is how my board looks like:

I finished my board but the accelerometer was not delivered yet, so I decided to try to use the step response board because at the end what I want is something to measure the bike movement, and I would like to try with the hello.txrx.45 plus something liquid. So I made these board and bought a level tool on chinese shop for 3,50 euros with 3 bubble level capsules.

This was the setup trying to measure the bubble movement

To program it what I did was:
- First I putted all the files (.make / .c / .py) in the same folder
- Then I had to install:

  • homebrew
  • then on Terminal type: brew install GCC
  • cross pack AVR

  • - After that type on Terminal:
    make -f hello.txrx.45.make program-usbtiny

    - For running the python program I had to install pyserial
    - After that run the python file, in this case type:
    python hello.txrx.45.py /dev/tty.usbserial
    (and then press tab to MAC autocomplete your serial port name)

    So the result is that this bubble level case is to thick and the bubble pressure doesn’t affect the sensors, as you can see on the video:

    week 9 / molding and casting week 11 / output devices