Posts | Comments

Planet Arduino

Archive for the ‘PCA9685’ Category

Mythological legend has it that Tempestas, the Roman goddess of storms and sudden weather, saved the consul Scipio when his fleet of ships got caught in a storm off of Corsica. In return, she demanded that a temple be dedicated to her.

[SephenDeVos]’ beautiful barometer, dubbed Tempestas II,  demands nothing of the viewer, but will likely command attention anyway because it looks so cool. If the weather is anything but clear and sunny, the appropriate sun-obscuring weather actor, be it clouds, more clouds, rain, or lightning will swing into place, blocking out the blue sky in layers, just like real life.

There’s a total of five weather-serving servos, and they’re all controlled by an Arduino Nano through a 16-channel PWM driver. The Nano gets the news from a BMP280 barometric pressure/temperature sensor and drives the servos accordingly.

Nine layers of nicely-decorated Plexiglas® hide the clouds and things in the wings while it’s nice outside. We totally love the way this looks —  it’s even pretty on the back, where the sun don’t shine. This one is new and ongoing, so it seems likely that [Sephen] will post the code before the sun sets on this project. In the meantime, check out the demo after the break.

We don’t see too many barometers builds around here — maybe there’s too much pressure. This one tells you to lay off the coffee when the pressure’s too low.

If your Arduino runs out of I/O lines, you can always add one of the several I/O expander chips that takes a serial interface to set its several pins. Or perhaps you could buy something like an Arduino Mega, with its extra sockets to fulfil your needs. But what would you do if you really needed more pins, say a thousand of them? Perhaps [Brian Lough] has the answer. OK, full disclosure: If you really need a thousand, the video isn’t exactly for you, as he shows you how to add up to 992 PWM outputs. The chip he uses works with any microcontroller (the video shows an ESP8266), and we suppose you could use two daisy chains of them and break the 1,000 barrier handily.

We like how short the video is (just two minutes; see below) as it gets right to the point. The PCA9685 chip gives you 16 12-bit PWM channels via an I2C interface. You can daisy chain up to 62 of the boards to get the 992 outputs promised.

[Brian] uses a cheap $2 breakout board that lets you set a 6-bit address, has a nice power connector and makes it easy to use the little surface mount device. Each of the 16 outputs on the board can have an independent duty cycle, but they do share a single output frequency. That means if you want to use some channels for low-frequency devices like motors and some for high-frequency devices like LEDs, you might have to spring $4 for two boards.

Over on Hackaday.io, we’ve seen these devices driving 128 vibration motors. The PCA9685 made us think of the time we rolled our own serial to PWM devices using an FPGA.



  • Newsletter

    Sign up for the PlanetArduino Newsletter, which delivers the most popular articles via e-mail to your inbox every week. Just fill in the information below and submit.

  • Like Us on Facebook