Week 9 Input Devices

Summary

This week I learned how to connect a sensor and measure a magnetic field by applying a magnet to a hall effect sensor. To do this I made an additional PCB board and soldered the hall effect sensor on to it and then modified the board I made last week to connect it to that board and the computer.

Assignments

Group assignment

Probe an input device's analog levels and digital signals. I tested a Hall effects sensor digital signals. See the link here.

Individual assignment:

Measure something: add a sensor to a microcontroller board that you have designed and read it.

The first step was to create an additional board that I could connect a Hall effect sensor to and then I am going to remove the button from the PCB that I designed in the previous week. The sensor will then essentially act like the button and blink the two LEDs when it senses the magnetic field.

Below you can see the KiCad drawing of the additional board that I milled and then soldered the sensor to.

board

Then I connected the additional board to the main board as you can see below.

Connected

Then I connected the board to power and made some edits to the arduino software to make it run. Instead of button I defined Hall.

codeimage

Then I connected everything making sure that correct pins and inputs matched.

connected2

I then found a magnet that I could use to test the sensor and by applying the magnet very close to the sensor I could get it to activate. However I could not get it to activate from further away. After testing it with the oscilloscope we discovered that we were likely shorting the circuit with the magnet rather than truly activating the sensor. After fixing that with some additional soldering we were then able to activate it without touching the board as can be seen on the group page.