Simple Christmas Tree Christmas Tree Ornament

When the only tool you have is a hammer, every problem looks like a nail. An LED ornament for the Christmas tree can be built in any manner of simple, easy implementations. You certainly don’t need an ARM Cortex M4 CPU running at 120MHz having a mouthful of three letter features like FPU, ETM, ETB, ECC, RWW, TCM, EIC, AES, CAN bus and much, much more. But [Martin Held] built a super simple LED Christmas tree ornament using the ATSAME51 series micro-controller, which he regularly works with and had on hand, and lots of bi-color LEDs. He already had schematic symbols and programmers for the device from other projects where he uses it more extensively, so putting it all together in time for the festive season was that much faster for him, despite the fact that the micro-controller was most likely the cheapest part of the BOM, besides the passives.

At this point it might be tempting to argue that it would have been so much simpler to use addressable LED’s, such as the WS2812B or the APA102C. You can drive them using a more basic micro-controller, and not require so many GPIO pins. But using such “smart pixel” LED’s for hand assembled prototypes can sometimes lead to unexpected results. If they are not stored in sealed tape/reel form, then storage conditions can have an adverse effect leading to dead pixels. And, they need a specific baking procedure before being soldered. Doing that for a few LEDs at home can be tricky.

So for the LED’s, he again went a bit off the beaten path, selecting to use three different color styles of bi-color LED’s with easy to hand-solder, 1206 footprints. This allows him to get a fairly random mix of colors in the completed ornament.

The LED array is pseudo-charlieplexed. One terminal of each LED goes to a GPIO pin on the micro-controller and the other terminal of all the LED’s are connected to a single complimentary pair of N-channel/P-channel MOSFETs — connected in totem-pole fashion. Depending on which MOSFET is switched on via a GPIO pin driving the gate pin high or low, the second terminal of each LED gets connected to either supply or ground. In combination with the GPIO pins being driven high/low, this allows the bi-color LED to be biased in either direction. Getting each LED to emit one color is simple enough — setting all LED GPIOs low, and MOSFET gate GPIO high will bias the LEDs in one direction. Reverse the GPIO logic, and the LEDs will be biased in the other direction. If this is done slow enough, the two colors can be differentiated easily. If the driving logic is made fast, changing states every 10us, the two separate colors merge to form a third hue. With some clever bit of code, he also adds some randomness in the GPIO output states, resulting in a more appealing twinkling effect. [Martin] does a detailed walk through in the video embedded below.

If you have the same bunch of parts lying around and wish to replicate the project, be warned that the KiCad source files will need some work to clean up errors — [Martin] was in a hurry and knew what he was doing so there are some intentional mistakes in the schematic such as using the same symbol for the N-channel and P-channel MOSFETs, and uni-directional LED symbol in place of the bi-directional one. And for programming, you will need one of these pricey pogo-pin style cables, unless you decide to edit the PCB before sending off the Gerbers.

[Martin] built just three of these bespoke ornaments, retaining one and giving away the other two to a neighbour and a co-worker. But if you would really like to build a tree ornament with addressable LEDs, then check out the Sierpinski Christmas Tree which can be cascaded to form an array of tree ornaments.

Continue reading “Simple Christmas Tree Christmas Tree Ornament”

The Internet Of Christmas Tree Watering

There’s nothing quite like a real Christmas tree, but as anyone who’s had one will know there’s also nothing like the quantity of needles that a real tree can shed when it runs short of water. It’s a problem [RK] has tackled, with a Christmas tree water level monitor that has integration with Adafruit’s cloud service to give a handy phone notification when more watering is required.

The real interest in this project lies in the sensor development path. There are multiple ways of water level sensing from floats and switches through resistive and light scattering techniques, but he’s taken the brave step of using a capacitive approach. Water can be used as a dielectric between two parallel metal plates, and the level of the water varies the capacitance. Sadly the water from your tap is also a pretty good conductor, so the first attempt at a capacitive sensor was not effective. This was remedied with a polythene “sock” for each electrode constructed with the help of a heat sealer. The measurement circuit was simply a capacitive divider fed with a square wave, from which an Adafruit Huzzah board could easily derive an amplitude reading that was proportional to the water level. The board then sends its readings to Adafruit.io, from which a message can be sent to a Slack channel with the notification enabled. All in all a very handy solution.

Plant care is a long-running theme in Hackaday projects, but not all of them need a microcontroller.

Rheoscopic Holiday Ornaments

We had to look it up on Wikipedia – “Rheoscopic fluid means ‘current showing’ fluid. Such fluids are effective in visualizing dynamic currents in fluids, such as convection and laminar flow. They have microscopic crystalline platelets such as mica, metallic flakes, or fish scales, in suspension in a fluid such as water or glycol stearate.” And so it seems [Will Donaldson] has figured out a great way to Animate Christmas Ornaments using Rheoscopic Fluid, just in time for the holiday season.

Making the fluid is pretty simple, and uses just a few readily available materials – distilled water, rheoscopic fluid concentrate and your choice of food colouring. The hardware is dead simple too – clear, spherical baubles with lids and core-less DC motors such as used in mini and nano drones, to agitate the fluid. You can use cell phone vibration motors too, but [Will]’s experimentation suggests that the level of agitation is not a lot.

To make a bauble, you fill it with the fluid, hot glue the motor to the lid, close the lid such that the motor and its agitator are dunked in the fluid, and dab a generous amount of hot melt glue to seal it all shut. Then, hook it up to a suitable power supply and get enchanted by the mesmerising movements of the rheoscopic fluid in the bauble. The agitator is just a plain ol’ drone propeller forced in to a shape that is narrow enough to be pushed through the neck of the bauble. It’s a seasonal ornament, so don’t expect the motors to last long being submerged in the rheoscopic fluid. [Will]’s contraptions have not yet failed after a couple of days, and it may be safe to estimate that the motors may last about a week or two at most. Of course, YMMV depending on if you used distilled water or plain tap water and other factors.

As [Will] suggests, if you prefer slower swirls, or random agitation, then it’s best to hook up a micro-controller and motor driver for fancy effects. At this point, it may be tempting to think of embedding LED’s inside the baubles, but doing so reduces the rheoscopic effect since it relies on reflecting light shining on it from the outside. The video embedded after the break has all the build details.

It’s a great way to teach some science to the kids during the holidays and maybe even get them to help with the project. And don’t assume this is just a cheap Christmas trick. Artist Paul Matisse has invented an art device/technique based on rheoscopic fluids which he calls “Kalliroscope©”. He patented it in 1968, and has sold Kalliroscope artworks throughout the world since then. From his website “A Kalliroscope is a device for viewing fluid currents. Kalliroscopes are both works of art and intuitively educational displays of the scientific principles of fluid dynamics. They are glass and steel constructions containing a current-visualizing fluid.” We’re not sure how priceless those works of art are, but it’s safe to assume you need deep pockets to buy one. So go ahead, turn your Christmas Tree in to a work of Art !

Continue reading “Rheoscopic Holiday Ornaments”

A Relay-Based Pseudorandom Number Generator

There are a great variety of ways to build a random number generator, and similarly many ways to generate numbers that appear random, but in a pure mathematical sense generally aren’t. [Daniel Valuch] built a Christmas decoration that does the latter, displaying the results on an attractive flashing ornament.

The build relies on a 16-bit linear feedback shift register, or LFSR. The LFSR generates a stream of numbers, with each number dependent on the previous state of the register. Thus, the numbers generated are pseudorandom, not truly random, and depend on the initial seed value of the system. [Daniel] built the shift register using relays, which create a lovely clacking sound as the register operates, and LEDs, which glow depending on the values in the register.

The result is a cute Christmas ornament that blinks in a deterministic fashion, and has a great old-school look due to the exposed copper of the PCB and the retro LED colors used. The project also serves as a great way to learn about shift registers and basic relay logic, though the latter is rarely used these days for serious purposes. We’ve covered the topic before, too. Video after the break.

Continue reading “A Relay-Based Pseudorandom Number Generator”

Sims-Style Plumb Bob Broadcasts Your Mood

While there are a lot of objects from the Sims that we wish were real, we probably wish more than anything that everyone had a mood indicator hovering above their heads at all times. It would make working from home go a lot more smoothly, for instance. [8BitsAndAByte] made this Bluetooth-controlled plumb bob as part of their Sims Halloween costume, but we think it has real day-to-day value as this pandemic wears on, either as a mood ring or a portable free/busy indicator.

The hardware is about as simple as it gets — an Adafruit Feather nRF52 Bluefruit controls a pair of NeoPixel rings, one for each half of the translucent 3D-printed plumb bob. Power comes from a 500mAh battery, and all the electronics are situated inside of an attractive hat. Check out the build video after the break.

There’s more than one way to use color to convey information. This seven-segment temperature display does it with thermochromic film.

Continue reading “Sims-Style Plumb Bob Broadcasts Your Mood”

Halloween Pumpkin Scares With An Evil Eye

These days, a classic Jack O’ Lantern just doesn’t cut the mustard. Kids are expecting to be scared by high-quality animatronics at a minimum. This haunting work by [Zero To Infinity] might just do the trick.

A real pumpkin is pressed into service in this build, with the usual threatening grin and candlelit interior. However, where it differs is in its single, animated eye. The eye itself is constructed of a pingpong ball, drawn upon with markers for a creepy bloodshot look. A pair of servos allow the eye to twitch and roll, under the command of an Arduino Nano. For further interactivity, an ultrasonic sensor is used to only trigger the pumpkin when it senses a person approaching.

It’s a fun holiday build that also serves as a great primer on how to work with servos and microcontrollers. We can imagine a more advanced setup using more sensors and pumpkins to train multiple eyes on the unsuspecting visitor. If that’s not scary enough, perhaps just make your pumpkins breathe fire instead. Video after the break.

Continue reading “Halloween Pumpkin Scares With An Evil Eye”

Haunted TV Does Mirror Scares With Raspberry Pi

Hallowe’en may be over for another year, but that just means you’ve got more time to prepare your build for next time. [gocivici] has a fun twist on the classic mirror scare that might be just up your alley.

The build starts with an old black and white TV, hooked up to a Raspberry Pi 3. The Pi films the scene in front of the television through a camera secreted into the screen’s headphone jack, and displays it on screen. The camera feed is run through OpenCV, which runs face and eye detection algorithms to determine when a person is looking at the screen. Based on a basic timer script, when a viewer has looked long enough, a ghostly apparition is displayed, lurking behind the viewer. When the user looks over their shoulder, the apparition quickly disappears, as per the classical horror trope.

It’s a fun build that would make an excellent set piece for your next Hallowe’en party. For extra effect, be sure to secret it down a dark hallway with some IR LEDs illuminating the scene for the camera only. If you prefer something with a little more whimsy, consider these animated singing pumpkins instead. Video after the break.

Continue reading “Haunted TV Does Mirror Scares With Raspberry Pi”