Week 9

Input Devices

Individual Assignment

This week, our individual assignment was to measure something by adding a sensor to a microcontroller board that we have designed and reading it. Unfortunately, this past weekend I was fairly busy with Diwali activities, and was behind on my work in general, so the work I'm presenting below is not yet complete. Currently, I'm considering two ideas for my final project: a low-cost coral reef nursery or a shadow lamp that changes patterns based room ambience (temperature, humidity, etc). With either idea, I thought it would be good to try an incorporate a humidity sensor into this week's assignment. Based on stock availability, I chose to use the BMP280, a I2C or SPI Barometric Pressure and Temperature Sensor.

I chose to keep the board fairly simple. It mostly consists of the SAMD11C, the BMP280 sensor, the regulator, and the bootloader pins. Anthony sent me some sources to help figure out how to connect the sensor and the SAMD11C.

I designed the board using Eagle within Fusion and used the fab design rules. I kept 16mil distance between each trace, and had each trace be 10mil wide. I was conveniently able to use an existing 6x1 FTDI SMD Header part for the sensor. I also unfortunately added a resistor in there when I didn't need to. Here is the final design!

Now that I was ready to mill, I ran into a whole plethora of problems with the Roland, my Mac, and my own oversight. These problems included:

  • Dull bit ripping away traces
  • Placing tape on the underside of the board over old tape. The board slipped while milling
  • I forgot to convert the outline to a polygon and so the outline png file was an unfilled white outline (sorry, I was really tired) instead of a filled white shape. The mill only partially cut around the design. I fixed this and remilled just the outline.
  • The outline stuff then didn't matter that much because the design was also placed too close to a border, so the traces were ripped away. -The Roland kept stalling at 2/4500 or something like that, and made me restart it a bunch of times
  • It also wouldn't cut deep enough, so we had to increase the cut depth for traces from .004 to .007
  • The most annoying error was that occasionally, mods thought it could mill the traces without blobbing them, and then it would randomly decide otherwise. I found this out the sad way when I remilled a png after increasing the board size (not messing with the traces) and it blobbed some of the paths together. I have a Mac, and I had been exporting the pngs at 1000 dpi and then entering 2000 in mods. I tried tricking it by decreasing the tool size to .0125 in mods, but no luck. With Anthony's help, I then exported it at 2400 dpi from my mac, entered 4800 in mods, and also changed the tool size to .014 to simulate 17mil distance between traces. That finally worked.

Overall, this took me way longer than expected. After the board was finally milled, I was able to solder all the components and get the bootloader burned after some mild debugging (there was some issue with it calling SPI even though I was using I2C. This was fixed by selecting a NO_SPI option when burning the bootloader)

I then tried to run this code:

Unfortunately, this would not compile on the SAMD11C, and it was also quite late. I gave up for the night and will continue trying to fix this later.

Update! I later learned my issues were because the SAMD11C had very little flash memory. Next time, I will use the SAMD21C to avoid this issue.

For a bonus, check out this project where I successfully apply the skills I learned in input devices week! I develop this project further in the Networking and Interfaces weeks.

File Download