Week 10: Networking and Communications

Created
Tags

Looking ahead to my final project where I plan to build a pager, I decided to make a board with an LCD and a speaker so I can start to test out the basic functionality of what I’m looking to achieve.

Designing the board was fairly straightfoward. I’m using a PAM8302A amplifier from adafruit for the speaker and a (pre-connected) I2C module on the LCD display. I decided to use horizontal female headers to the left of my board for sliding in the LCD and vertical female headers on the right to slot in the amplifier breakout.

As standard practice now, instead of designing my board to sit the xiao directly on top of it, I place vertical female headers onto which I slot in the xiao so that the xiao is hot-swappable

Milling

Milling the board was fairly uneventful. Now that I have done this many times, I’ve gotten a hang of it. It does take some time though to put tape on the back of the board and plop it in the Roland.

Soldering

Soldering is still a pain in my butt. I don’t know if I’m doing something wrong but even such a simple board took me a shockingly long time (perhaps a couple of hours) because mistakes happen and the board is super delicate. I first ripped off a pad while trying to use solder wick to desolder a false connection.

I then tried to perform some surgery on the board to repair it but I had a hard time soldering on the wire onto the connectors.

Trying to add a wire to directly solder the ripped pad to the header

The above hack finally kinda worked.

I want to explore reflow / hotplate soldering next time as these may work better for me.

Code

To talk to the I2C module on the LCD display, I tried a bunch of different Arduino libraries. I tried LiquidCrystal_I2C and LiquidCrystal_PCF8574T. I was unable to get my display to display anything so I tried to instead use my older devboard to see if there was an issue with my new board

It didn’t work with the dev board either and in the process I also ripped some male headers from my dev-board which was super frustrating. Quentin mentioned to me that the male headers are always super delicate so you should use female headers if you can or use vertical male headers.

Ripped the headers on my trusty devboard 😟

I then downgraded all the way to an arduino uno to just get the LCD to work. It didn’t work with the uno either, and at this point I had even tried 3 different software libraries.

I then saw on a blog post someone asking another person facing similar issues to try and see if the contrast was high enough. I remembered that the pot on the I2C module controlled the display contrast, so I grabbed a screwdriver and twisted it. The display finally started “working” (though in reality it always was but the contrast just wasn’t high enough to see).