11. Input devices

This week's assignment was to add an input device to a microcontroller board I've designed, and program it to measure something.

Hall-Effect Switches

Since I'm working with magnets for my final project I decided to make a PCB that would help me to detect magnetic fields to check the functionality of my prototype. To do this I chose a Hall-Effect switch, the A3144 to be precise. A Hall-Effect sensor is an integrated circuit that transduces magnetic fields to electrical signals. The A3144 has three legs, one for voltage, one for an analog signal, and one for ground. I'll leave the datasheet for anyone who would like to check the specifics. A3144 datasheet

Designing a PCB for the Hall-Effect sensor was pretty easy, considering the pin itself only needs 3 types of connections. Apart from that I added 2 more pins for leds. Magnetic senosr PCB design. Magnetic sensor PCB schematic.

To make the code from the svg. file from KiCad I used modsCE, for a more detailed explanation of how to use mods you can refer to my week 4 documentation or Ibero Pueblas group documentation. Week 4 group page.

Once I had my gcode I only needed to cut it.

After soldering the components it was time to make the program. I used the XIAO as my processor, the program was veary easy to make, I jus needed it to keep a LED on when the senosor didn't detect anything and another LED to turn on when it detected a magnetic field. Magnetic sensor code.

Hero Shot