Color changing coaster has a built-in drink detector

[Robert] put together his own illuminated coasters that know when they hold a drink. They look fantastic, thanks to professionally produced PCBs and a layered, laser-cut acrylic case. They’re much like the pagers given to restaurant-goes who are waiting for tables, but this version is much fancier (and doesn’t include the vibrating/paging feature).

The RGB-LED board is a previous project which was developed using eight surface mount RGB LED modules around a circular board. It uses an ATmega168 paired with an MBI5168 constant-current LED sink driver. The coaster enclosure gave him room for a few more items, like the pair of AA batteries which work in conjunction with a boost converter to power the device. It also houses an IR reflectance sensor which is used to detect the presence of a drink on the coaster. This is important since an on-occupied coaster looks like it would be blindingly bright if there wasn’t a glass to diffuse the intensity of the LEDs.

He mentions that incandescent light bulbs mess with the IR reflectance sensor. But there must be some way to account for ambient conditions with the code, right?

LED tutorial demystifies several control techniques

Controlling LEDs is really quite simple. As you know, they need to be current limited which is as easy as applying Ohm’s law to your given set of values. To make things even more even there’s a slew of constant current LED driver chips out there that can be had for a song. But do you have any idea how those constant current circuits work? If not, then [Giorgos Lazaridis’] guide on LED driving and controlling methods will bring you up to speed in no time.

He starts out with the most basic concept, how to light an LED using proper current limiting resistors. But from there he moves on to the juicy bits. He builds a transistor-based constant current driver, then adds voltage regulation for the circuit as seen in the schematic on the left. He moves on to the more robust and efficient method on the right which pairs a MOSFET with that transistor circuit. This is the technique found on each pin of many of those constant current drivers and functions well regardless of the voltage input level.

He’s been producing videos to go along with these articles. After the break you can watch the episode that accompanies the schematic on the left. [Read more…]