Tuesday, September 3, 2013

The new traffic light (Part 2)

UPS was so kind to deliver a batch of 20 PCA9685 chips to my door today. I was very pleased, since that allowed me to continue some of my projects. Today, I'm writing about the traffic light again, since that is the project i selected for testing.

I don't have much experience soldering SMD components, and so I immediately messed up the first board I had prepared in my previous post. Always check that your components are properly aligned with their solder pads! Moving them is pretty much impossible once a few of the pins have been soldered to the board. On a second note, I might need to get that hot air station.

I had more luck with the second attempt. Take a look at the finished board:

Top side with the two ULN2803 amplifiers

Bottom side with the PCA9685
I must admit, this is not my prettiest job. But the solder joints are all clean, and no shorts are on the board.

I had to prepare a few more cables, but once I hooked up the board to one of my Raspberry Pis it was immediately found by i2c-detect. For testing purposes I have attached a new cable to the one side of the light that I had already reworked before. I still need to get out the drill and the hot glue gun for the other three sides.

I tried it out with the Adafruit demo code that is destined for their PWM board, and since this is the exact same chip it worked right out of the box. I added a few lines and the result is a complete traffic light sequence in about 20 seconds:


But wait, there's more. I chose the PCA9685 because it is capable of outputting PWM. This is what it looks like when run with pilight code. Enjoy!


No comments:

Post a Comment