Jump to content
43oh

Recommended Posts

post-324-0-39605400-1388110153_thumb.jpg

 

This project is an update to the binary clock that I used on my desk. The new version has a lot of new features including RGB leds(WS2812), a bigger microcontroller(The Olimexino-5510 board), capacitive touch and light sensor.

My first idea was to have something based on the MSP430G2553, a couple of WS2812 leds and capacitive touch. But after comparing the work i would have to do, and very few rewards to the Olimexino-5510 functionality I quickly reconsidered. The Olimexino-5510 provides quite a few things I wanted:

  • MSP430F5510
  • Battery Charger
  • USB capabilities
  • Arduino Form Factor

So all I had to do was make a nice board that went on top with the stuff I wanted for the clock functionality.

WS2812 RGB LEDs
The main feature of the Clock is the 6x3 WS2812 RGB led matrix. These leds contain a little controller that accept a serial protocol for the color data and they handle the PWM. They're also chainable meaning that only one pin(D11, LED-DATA) is required to quite all of them. In my using @@oPossum's library

Power Supply
The Olimexino-5510 has a connector for a battery. But it just connects the battery to the 5V rail, the battery could go as low as 3V. The WS2812 aren't meant to run that low, specifically the Blue led get a lot dimmer. In order to fix this I incorporated a SMPSU that can get 5V from the battery voltage. It could in theory handle as much as 2A. The design was done with TI Webench, all parts are the same as the suggested ones. I had to modify the Olimexino a little to actually give me the raw battery voltage on the shield connector, on battery there's no voltage on the 5V pin, i assumed there was. It all works quite well now except it's kinda whiny.

The WS2812 leds are very bright, so in the darkness this might be a problem. One could dim them by sending them a darker color but this reduces resolution. Q2's purpose is to PWM is the 5V that the LEDs in order to dim them externally. This essentially gives another scaling factor for the brightness. It's a similar principle to how dynamic contrast works in TVs. Unfortunatelly this did not work as I wanted, the mosfet was too slow to PWM the leds fast enough without aliasing. My next design will probably contain a mosfet driver.

Capacitive Touch Pads
I have 4 pads acting as buttons. I originally connected them directly to some pins assuming I had PinOsc hardware like on the value line. Unfortunately I discovered this was not the case too late. I fixed it by adding 2 resistors between each of the pairs. This allows me to do a pretty crappy RC measure. It still works quite good though, i can get about 200 discrete values of the reading. As suggested by TI I had a non solid ground plane of the backside to reduce the intrinsic capacitance.

Light Sensor
The shield also has a light sensor, meant to measure ambient brightness. One can use this to make the display's brightness match the room. The sensor is connected via I2C, since neither the Arduino nor the Olimexino-5510 have I2C exposed on the pins I will have to do a software solution for this. The TCS34725FN sensor is also capable of measuring RGB color; I'm sure something fun can be accomplished using that. Of course I managed to do the footprint wrong for this, so it required some cutting traces to swap some pins; after that it worked just fine.

Eagle Files
I also have the schematics in PDF format.

Code
The current code is mostly made to prove the hardware. It could use a lot more work for the UI.
Features

  • Clock Functionality with fading
  • SMPSU Off demo
  • Capacitive Touch Demo
  • Light Sensor Demo
  • USB CDC ported from Energia that i used for debugging so far

Everything was compiled with msp430-gcc. I uploaded the firmware using the new f5529 launchpad board due to the fact that mspdebug does not support the olimexino usb bootloader.

Parts
Most parts I got from digikey, except the Olimexino-5510, the beefy 6600mAh battery and the WS2812 leds. I got a pretty good price for the LEDs from Alibaba at only 13 cents each.
I ordered the board through Elecrow, I really needed it to be black.

Meta
My old clock was this boring thing with an attiny44, using a matrix of green leds.
post-324-0-46652200-1388110476_thumb.jpg
I originally started this version(v2.0) as a school project, but I wanted to share it.
Due to the many issues I had I'll probably make a version 2.1(if i fix the shield) or a v3 if I make a standalone board. I'm open to ideas.
I still have quite a few board leftover(about 7), i'm open to sending them to people if postage is cheap/free/easy.
Imgur album for non-users.

post-324-0-04544200-1388110157_thumb.jpg

post-324-0-84351000-1388110159_thumb.jpg

post-324-0-31008300-1388110163_thumb.jpg

post-324-0-34977400-1388110166_thumb.jpg

post-324-0-29565400-1388110178_thumb.jpg

post-324-0-68988200-1388110182_thumb.jpg

post-324-0-31086400-1388110186_thumb.jpg

post-324-0-37880700-1388111714_thumb.jpg

Link to post
Share on other sites

@@amstan [...] Anyway.. can you make this for the Launchpad too? I'm not sure if the Olimex-5510 follows the Boosterpack specs. I can help you sell these through the Store.

I could, but there are a few problems i though of:

  • The design I have right now can be battery powered. None of the launchpads have that unless you use the new fuel tank booster pack. Maybe that's an option. I could also integrate the battery charger on my board(same chip from the olimexino).
  • I need 5V for the RGB leds, the original 20-pin launchpad only have low current(less than 100mA) at 3.3V. Even though the original launchpad could probably drive the display just fine, it will have to be a 40 pin booster pack. Perhaps i could add a 5V pin for external powering(maybe from the fuel tank booster pack, if used with the original launchpad).

Stuff like this makes me lean more on a standalone board maybe.

 

So far I designed this with not a lot of input from others. It would be nice if I had some feedback:

  • Do you guys like the smpsu? If removed one could still kinda drive the leds(blue still lights up at 3.3V), but some kind of software would have to compensate for the color(and full white will not be possible anymore).
  • The PWM for the dimmer. I still think this is required, dimming all leds in order to achieve a higher brightness resolution at lower intensities. I order for this to work properly it should be capable of PWMing the 5V rail at at least 100kHz(to avoid aliasing with the built in ws2812 leds). The 5V rail uses 500mA when all leds/channels are on. Is this a worthwhile thing to include, given that i already failed implementing it in v2.0

As i mentioned earlier, one of the reasons I did this project was for a class in school. I attached the report I submitted for that in case anyone wants even more details about it.

PS: Yay, i'm on the frontpage.

tr1-report-withdiagrams.pdf

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...