Mini Project: Single Pixel

I have an interest in capacitive touch at the moment – I have no particular project in mind but I wanted to see the current state of cap-touch solutions so that I could use it in a future project.

To test it out I made a board with a single touch pixel. I can use this board in other projects as a drop in touch solution. I decided to go with Microchip’s (formerly Atmel’s) qTouch library with their Peripheral Touch Controller (PTC).

Continue reading “Mini Project: Single Pixel”

The Atmel’s Universal Serial Interface (USI) sucks for I2C

Quick Intro to I2C

Along with USART and SPI, I2C is definitely the most common interface used by a microcontroller to communicate with peripherals. In order to implement an I2C bus all you need is two open-collector collector pins, one for the SCL (clock) line and one for the SDA (data) line.  It has to be open-collector because there are times during the protocol when two devices drive the clock line at the same time which can lead to a short circuit if one device drives it high and one drives it low. This way, the bus lines are high by default due to the pull up resistors –  if a device wants a line to go low, it just shorts it to ground via an internal transistor. There is no path from VCC to GND that does not contain a high-valued resistor.

Continue reading “The Atmel’s Universal Serial Interface (USI) sucks for I2C”

Project: Smart Watch – Circuit Board

The watch has to be skinny, and compact. I wanted as many LEDs as possible and a minimum of 2 switches, but 4 would be best.

In this vein I delved for the first time into surface mount (SMD) components. In the end I ordered 5 red, yellow, green and blue SMD LEDs from ebay as well as some nice SMD 680Ω resistors and some titchy little SPST switches.

Tiny SMD Switch

…Talk about tiny…

I had to check that I can even solder these, so I grabbed some strip board and my soldering iron.

I have to say it wasn’t as bad as I thought! Although I have no idea how to tell the polarity of an SMD LED. Google? So that includes a switch, an LED and a resistor – nuts. It runs at about 4mA according to my ammeter, which is on the boundary of acceptable, and if anything its too bright!

So time to design the PCB. I’ve etched a number of circuit boards at home before, but it’s never gone well. I always set my sights too high and make it too compact for home etching. I wish I was still at school with proper etching equipment.

My PCBs sometimes work out alright, after a few attempts

My PCBs sometimes work out alright, after a few attempts

Hopefully, being a small circuit board, it wont be too much of a gamble as to how well it etches.

Before I have always used Express-PCB to design my boards but since it isn’t installed on my new PC, I took that as an excuse to try out Eagle PCB.

My (hopefully final) design is as follows:


So this design basically includes 20 DIL Through-the-Hole pins to allow the arduino to connect by its header rails and 4 SIL TTH pins to allow the bluetooth module to connect by a header. Everything else is surface mount. There are 4 switches, 6 LEDs and 6 accompanying resistors. Begrudgingly I had to use jumpers as far as I can see in order to get the power to the bluetooth module without increasing the area of the board. On the plus side, the arduino has internal pull-up resistors meaning I don’t need extra space for them. The rectangle represents the area I will remove to make room for the micro-usb port on the arduino.

I hope to etch it next week.