10_input_devices

Exercise 10. Input Devices

Assignment: Input Devices

Learning Outcomes

Evidence

Process

As I'm still refining my cat exercise wheel from our building big assignment, I decided this would be a good place to build on for this week. There are plenty projects designed to measure the distance a hamster travels on a wheel and while it's still to be seen whether my cats will use the exercise wheel, quantifying their use is appealing.

The Hall Effect Sensor fits the bill for this task as it can capture wheel revolutions. The sensor measures current in response to a magnetic field. I'll place a strong magnet on the exterior of the wheel and the sensor will detect the difference in magnetism each time the magnet passes over it. To translate these differences to distance I'll need to program an output device as well and write code to translate revolutions to distance.

Test run with Neil's Board

To start I used Neil's Hall Effect board. Hello Mag

I gathered all of the components from our electronics station. Wanting to practice with Eagle again, I built the schematic and board based on these files. The datasheet came in handy when I couldnt find the sensor in the Eagle library. I was able to find the component under "SOT-23".

In hindsight, it would have been good to add an LED to be used to indicate if the board is functioning since I'd ran into difficulties with earlier boards.

I changed the width of some of the traces underneath the Hall Effect sensor and ATTiny in order to fit them. Eagle Board

Milling

I exported the board file as an image to Gimp where I flattened the image, centered it, and created two layers for milling: traces and then a second layer with a border around the trace area for cutting the PCB. I reversed colors for the "interior" cut.

I opened up the Mods program for the Roland SRM-20, loaded my trace file, and attempted to set x, y, and z positions. I ran into difficulty trying to mill the board when I couldn't drop the Z axis lower through Mods than "0" when my tool still wasn't reaching the PCB material at that height.

I used the Roland SRM-20 software to change the machine settings. The built-in software help guide proved useful in learning how to change the machine's default settings in VPanel. Roland Settings

It took a couple tries to mill my traces because the first time around I managed to invert what was being milled out! Inverse cut Once I successfully milled my traces I switched tools, reset "z", loaded the second image, calculated in Mods and cut the board.

Reading a Datasheet

Opening the datasheet for the Hall Effect sensor was daunting. I found this video was helpful in understanding how the sensor works and making sense of datasheet info. A few key pieces of information were particularly useful as I developed my board.

  1. Finding the component in the Eagle library
  2. Assisting in breadboarding with my the SOT-23 package from a graphic using the SIP package-- more on this in Exercise 11. Output Devices pinout diagram
  3. With a minimum supply voltage of 4.5V being necessary, I needed to make sure I was powering it with 5V cable instead of 3V cable.

Stuffing Board

Starting with the ATTiny and working my way out, I soldered components onto my board. Components The feet on this sensor were definitely the smallest I've worked with so far! Since I was simultaneously using an Arduino to breadboard layout of my input and output devices, I soldered some wires onto a SOT-23. to use for breadboarding. Sensor

Once everything was put into place on the board, I checked my connections with a multimeter.

Hero Shot

Programming Board

I burned the bootloader and then programmed my board using the Arduino interface with my FabISP. I utilized Neil's C code by copying and pasting it into an .ino file in the Arduino IDE. Although the code uploaded successfully, nothing was displaying on my serial monitor.

Empty SM

To see if the board was working I then used Mods following this video.

Using Mods

Mods wasn't able to read the device from my Mac, nor from Jean Michel's.

Terminal

JM suspected it was an issue of Mac security so we tried from a PC in the lab and had more success as shown in the video. Hall Effect Sensor with Mods

Additional Workflow

After using the layout from Neil's Hall Effect board, I designed my own board with Hall Effect input using Daniele Ingrassia's Satshakit board as a starting point that also includes an LCD screen for output. Additional documentation found in Exercise 11. Output Devices.

Files

Eagle files built from Neil's .png files: Schematic, Board
Monochrome Gimp file for milling: Traces & Interior
Adapted Satshakit with Hall Effect input and LCD display output: Eagle Schematic, Eagle Board
Neil's Code: Arduino File