Ana Cabral

Week 13

Input devices

back to main page

The assignment

This week’s assignment was to add a sensor to a microcontroller board that we have designed and read it.



Analog Microphone Board

I decided to make an analog microphone board, because I thought it could be useful in my final project - which is still quite open. I figured that the microphone could both be used for reading a heartbeat (if I should have a biometric sensor) or something from the external surroundings.



Analog Microphone Board, by Neil G.

I was away for this week, when I got back it was important to have an input board - so that it could be used in networking and interfacing weeks -, so I decided to mill Neil’s example board, solder the components and load Neil’s program in order to catch up for the other weeks.

Everything worked fine, but the readings from the microphone were within a lower interval (see video below), comparing to Neil’s reading. The microphone component was extremely hard to solder. Probably it wasn’t well connected.



Analog Microphone Board, by Ana C.

So, I used Neil’s example board to be able to catch up in the interface week, but the network week inspired me to re-design the analog mic board. Neil’s example board for the analog mic runs on 3.3V and the LED board I have designed on week 10 (output devices) runs on 5V. For the network week assignment, the communication between boards needs to be done at the same voltage.

A way to do it would be to redesign mic board, connecting directly VCC on the ISP/microcontroller to VC on the FTDI header. I also added a resistor connected to the MOSI pin in the microcontroller (PB0), so it won’t complain so much about the different voltages. I removed the FTDI, and added a 4 pin header instead, so that it would be easier to power the boards.

After the schematics, I proceeded with the board layout, exported it as a PNG and edited it in Inkscape into the traces and outline files.

It was only in the end of this weekend, when workig towards the final project, that I realised how simple it is to add jumper resistors in Kicad. So far, I have been adding them in Inkscape.

I then milled the board in the desktop milling machine and soldered the components.

Only after milling, I realised there was some problems with the traces. I fixed it by hand with a x-acto knife, and used a multimeter to check that there was no continuity between the areas I just separated.

I took a look at Neil’s C file to check if there was something I should change, but there was no significant changes to what the pins on the microcontroller were connected to. So I loaded the program into the microcontroller. I got an error message.

I took a look again at the schematics… somehow when cleaning up the schematics, I have deleted the connection between VC from 4 pin header and VCC in the micro controller. To fast check if that was the problem, I soldered a jumper wire between this two.

Tried to load the program again and YEY! it worked!!

To power the board, I have been using 2 jumper wires, connecting ground and VC from the FTDI cable to the 4 pin header on the board.

And now I was more careful soldering the microphone component, and the range for the readings is working a lot better.

I proceeded by correcting the schematics, board layout in kicad, working out the exported png in Inkscape to create a traces and a outlines png files (same process as before). This time I was more careful testing the traces PNG in FabModules, to avoid having to fix the board by hand later on.

I tried to load the C program but I got an error message. I inspected the board and it puzzled me to realize that the VC on the 4 pin header was not connecting to the VCC on the microcontroller... even though I was sure I made that change in the schematics... So I went to inspect my files in Kicad and found the mistake... between VC on the 4 pin header was connecting to the general VCC line and that connected to

I kept working with this board in week 16 (Interface & Application Programming), as well as in the final project.



Working towards the final project

I kept working with this board for the final project. For the final project, the mic board will be part of a wearable modular system, so the focus will be to make it as flexible and integrated as possible. You can see more about final project development here. Files for the microphone board used in the final project ca be found in the end of this page.



Files

Neil’s analog mic board: PNG_TRACES, PNG_OUTLINES, C, MAKEFILE and PYTHON_INTERFACE

Ana’s analog mic board: PNG_TRACES, PNG_OUTLINES, SVG_MIC.BOARD, KICAD_SCHEMATICS and KICAD_LAYOUT