11. Input devices - Accelerometer

I ended up using the Week 16’s Assignment to complete this assignment. I used serial communication to read a button being pressed. Below is the video from part of that assignment:

This week I am overwhelmed and excited. There’s a bunch computer programming + electronics to connect. My final project idea thus far has been to detect orientations and connections between the puzzle parts as a way to determine one’s puzzle solving ability. So that would be an accelerometer sensor and a step response…

But I’m not sure if I still want to do that…I did get excited about making the puzzle at larger scale…and perhaps just measuring proximity so that the puzzle glows…

This page was helpful in identifying all the parts, particularly the 3.3v regulator

Here’s my list of components for the accelerometer:

  • (3) 10k ohm resistors
  • 1uF capacitor
  • .1uF capacitor
  • 6 pin FTDI header
  • 3.3V regulator
  • ADXL343 accelerometer
  • ISP header
  • ATTiny45

Data Sheet

ATtiny45 data sheet here I used the data sheet to confirm that there’d be enough memory for using the accelerometer.

I learned how to upload a new part to the Eagle Library: https://app.ultralibrarian.com/content/help/?eagle.htm

I did this because the ADXL343 accelerometer was not in the Fab library.

Schematic - downloable files

Schematic File download here

Board Design - downloadable files

I got an error based on the 16mil spacing between wires and pads for the ADXL343BCCZ accelerometer. It was suggested to use a bit smaller than 1/64” or to modify the library footprint. I think I might just photoshop the png!

Board File download here

CNC Milling

Milling on the Roland went well.

I ultimately did 5 outline passes.

Pretty nice cuts.

Soldering

First time doing reflow soldering. The ADXL343 calls for this technique. We’ll see how it turns out!

I think it went well…soldering is getting easier.

Programmming the Accelerometer

I successfully installed Neil’s c code on the board

Reading & Testing

I then ran the Python code to read the 3-axis motion. http://academy.cba.mit.edu/classes/input_devices/mag/hello.mag.45.py

In my video the X axis jumps way up when connected. I’m not sure what’s going wrong, but I do consider this a successful ‘read’ of the output. I will try to debug if time, but I will keep moving forward with the next assignment for now and assume I will get a properly functioning input device for the final project.

I was able to replicate the same error as above on a different Ubuntu OS and machine. This gives me confidence that the problem is related to the routing path I made for the ADXL343 as seen above (the diagonal route goes across the Pad 3, even though it is not connected to anything).

Succsessful Reading

I ended up using the Week 16’s Assignment to complete this assignment. I used serial communication to read a button being pressed. Below is the video from part of that assignment that demonstrates a successful reading of an input device: