Smartphone Controlled Periodic Table Of Elements

It wouldn’t be much of a stretch to say that here at Hackaday, we’re about as geeky as they come. Having said that, even we were surprised to hear that there are people out there who collect elements. Far be it from us to knock how anyone else wishes to fill their days, but telling somebody at a party that you collect chemical elements is like one step up from saying you’ve got a mold and fungus collection at home. Even then, at least a completed mold and fungus collection won’t be radioactive.

But if you’re going to spend your spare time working on a nerdy and potentially deadly collection, you might as well put it into an appropriate display case. You can’t just leave your Polonium sitting around on the kitchen counter. That’s the idea behind the interactive periodic table built by [Maclsk], and we’ve got to admit, if we get to put it in a case this awesome we might have to start our own collection.

A large portion of this project is building the wooden display case itself as, strangely enough, IKEA doesn’t currently stock a shelving unit that’s in the shape of the periodic table. The individual cells and edge molding are made of pine, the back panel is MDF, and the front of the display is faced off with thin strips of balsa to cover up all the joints. Holes were then drilled into the back of each cell for the LED wiring, and finally the entire frame was painted white.

Each cell contains an WS2812B RGB LED, which at maximum brightness draws 60mA. Given the 90 cells of the display case, [Maclsk] calculated a 5.4A power supply would be needed to keep everything lit up. However, he found a 4A power supply that made his budget happier, which he reasons will be fine as long as he doesn’t try to crank every cell up to maximum at the same time. Control for the display is provided by an Arduino Nano and HC05 Bluetooth module.

The final piece of the project was the Android application that allows the user to control the lighting. But it doesn’t just change colors and brightness, it’s actually a way to visualize information about the elements themselves. The user can do things like highlight certain groups of elements (say, only the radioactive ones), or light up individual cells in order of the year each element was discovered. Some of the information visualizations are demonstrated in the video below, and honestly, we’ve seen museum displays that weren’t this well done.

We last caught up with [Maclsk] when he created a very slick robotic wire cutting machine, which we can only assume was put to work for this particular project. Too bad he didn’t have a robot to handle the nearly 540 soldering joints it took to wire up all these LEDs.

[via /r/DIY]

Continue reading “Smartphone Controlled Periodic Table Of Elements”

Remember Your Birthday For Fifty Years

Our Coin Cell Challenge competition has turned up some amazing entries, things that we wouldn’t have thought possible from such meagre power sources. Take [Vishnu M Aiea]’s entry for instance, a device which he claims can light up as a birthday reminder every year for up to fifty years.

At its heart is a modified Arduino Nano clone that draws a measured 608 nA from a CR2450N. From the specification of the cell he has calculated the 50 year maximum figure, as well as a possible 29 years for a CR2032 and 64 years for a CR2477. He does however note that this does not take self-discharge into account, but you can probably afford a new battery in a decade or so.

The Arduino clone carefully selected for its “P” version low-power processor has had its serial bridge IC removed to achieve this power consumption, as well as a voltage regulator and some discrete components. Interestingly he notes that the ATMega168P is even more frugal than its 328 cousin, so he’s used the former chip. A selection of internal flags are set for minimal power consumption, and the internal oscillator is selected to use as low a clock speed as possible. There is an Intersil ISL1208 low power RTC chip mounted on a piece of stripboard to provide the timing, and of course an LED to provide the essential birthday alert.

When the LED lights for the big day there’s always the hope you’ll receive another coin cell, this time powering an edge-lit musical birthday card.

 

Automating Your Door For $20

We love the doors on Star Trek’s Enterprise. We should have known they were human-operated though because they were too smart. They would wait for people, or fail to open when someone was thrown against them during a fight. [SieuweE] has a much more practical automatic door that he calls ArduDoor.

You might guess from the name it uses an Arduino. It also uses a windshield wiper motor which is perfect since it is high-torque and low speed. You might even be able to pick one up for little or nothing if you frequent the junkyards.

Continue reading “Automating Your Door For $20”

Man-in-the-Middle Jog Pendant: Two Parts Make Easier Dev Work

In a project, repetitive tasks that break the flow of development work are incredibly tiresome and even simple automation can make a world of difference. [Simon Merrett] ran into exactly this while testing different stepper motors in a strain-wave gear project. The system that drives the motor accepts G-Code, but he got fed up with the overhead needed just to make a stepper rotate for a bit on demand. His solution? A grbl man-in-the-middle jog pendant that consists of not much more than a rotary encoder and an Arduino Nano. The unit dutifully passes through any commands received from a host controller, but if the encoder knob is turned it sends custom G-Code allowing [Simon] to dial in a bit acceleration-controlled motor rotation on demand. A brief demo video is below, which gives an idea of how much easier it is to focus on the nuts-and-bolts end of hardware when some simple motor movement is just a knob twist away.

Continue reading “Man-in-the-Middle Jog Pendant: Two Parts Make Easier Dev Work”

Entropy And The Arduino: When Clock Jitter Is Useful

What do you do, when you need a random number in your programming? The chances are that you reach for your environment’s function to do the job, usually something like rand() or similar. This returns the required number, and you go happily on your way.

A shift register configured as a pseudo-random number generator.
A shift register configured as a pseudo-random
number generator. [by KCAuXy4p CC0 1.0]
Except of course the reality isn’t quite that simple, and as many of you will know it all comes down to the level of randomness that you require. The simplest way to generate a random number in software is through a pseudo-random number generator, or PRNG. If you prefer to think in hardware terms, the most elementary PRNG is a shift register with a feedback loop from two of its cells through an XOR gate. While it provides a steady stream of bits it suffers from the fatal flaw that the stream is an endlessly repeating sequence rather than truly random. A PRNG is random enough to provide a level of chance in a computer game, but that predictability would make it entirely unsuitable to be used in cryptographic security for a financial transaction.

There is a handy way to deal with the PRNG predictability problem, and it lies in ensuring that its random number generation starts at a random point. Imagine the  shift register in the previous paragraph being initialised with a random number rather than a string of zeros. This random point is referred to as the seed, and if a PRNG algorithm can be started with a seed derived from a truly unpredictable source, then its output becomes no longer predictable.

Selecting Unpredictable Seeds

Computer systems that use a PRNG will therefore often have some form of seed() function alongside their rand() function. Sometimes this will take a number as an argument allowing the user to provide their own random number, at other times they will take a random number from some source of their own. The Sinclair 8-bit home computers for example took their seed from a count of the number of TV frames since switch-on.

The not-very-random result of a thousand analogRead() calls.
The not-very-random result of a thousand analogRead() calls.

The Arduino Uno has a random() function that returns a random number from a PRNG, and as you might expect it also has a randomSeed() function to ensure that the PRNG is seeded with something that will underpin its randomness. All well and good, you might think, but sadly the Atmel processor on which it depends has no hardware entropy source from which to derive that seed. The user is left to search for a random number of their own, and sadly as we were alerted by a Twitter conversation between @scanlime and @cybergibbons, this is the point at which matters start to go awry. The documentation for randomSeed() suggests reading the random noise on an unused pin via analogRead(), and using that figure does not return anything like the required level of entropy. A very quick test using the Arduino Graph example yields a stream of readings from a pin, and aggregating several thousand of them into a spreadsheet shows an extremely narrow distribution. Clearly a better source is called for.

Noisy Hardware or a Jittery Clock

As a slightly old-school electronic engineer, my thoughts turn straight to a piece of hardware. Source a nice and noisy germanium diode, give it a couple of op-amps to amplify and filter the noise before feeding it to that Arduino pin. Maybe you were thinking about radioactive decay and Geiger counters at that point, or even bouncing balls. Unfortunately though, even if they scratch the urge to make an interesting piece of engineering, these pieces of hardware run the risk of becoming overcomplex and perhaps a bit messy.

The significantly more random result of a thousand Arduino Entropy Library calls.
The significantly more random result of a thousand Arduino Entropy Library calls.

The best of the suggestions in the Twitter thread brings us to the Arduino Entropy Library, which uses jitter in the microcontroller clock to generate truly random numbers that can be used as seeds. Lifting code from the library’s random number example gave us a continuous stream of numbers, and taking a thousand of them for the same spreadsheet treatment shows a much more even distribution. The library performs as it should, though it should be noted that it’s not a particularly fast way to generate a random number.

So should you ever need a truly random number in your Arduino sketch rather than one that appears random enough for some purposes, you now know that you can safely disregard the documentation for a random seed and use the entropy library instead. Of course this comes at the expense of adding an extra library to the overhead of your sketch, but if space is at a premium you still have the option of some form of hardware noise generator. Meanwhile perhaps it is time for the Arduino folks to re-appraise their documentation.

The subject of entropy and generating random numbers is one that has appeared on these pages many times. [Voja Antonic] made a in-depth study using uninitialized RAM as an entropy source for microcontrollers. If you have an insatiable appetite for understanding Linux entropy, we point you at [Elliot Williams]’ comprehensive examination of the subject.

[Arduino image: DustyDingo Public domain]

The Majesty Of Saturn’s Rings Lighting Your Abode

[Modustrial Maker] is at it again with another seriously cool LED visualizer. This time around, he’s built pair of pendant lights inspired by the rings of Saturn.

The rings are made mostly of walnut plywood using a circle router jig to make the cut easier. If you are inspired to make these for yourself, [Modustrial Maker] is clear — the order in which you cut out the pieces of the rings is absolutely critical. The pieces are glued together — with any edges sanded smooth — and edgebanding applied using a hot air gun due to the curved surface before staining. Duplicate for the second (or more if you so choose!) rings. Be forewarned — a little geometry will be needed to find anchor points that will keep the rings properly balanced.

[Modustrial Maker] suggests an off-the shelf LED controller to handle the visualizations and lighting effects, but he used an Arduino Mega clone as the brains — code available here, a MonkeyJack MAX9814 electret mic, and a four-channel RF remote/transceiver to control the different modes. Pulsing along to the music, these rings make for sleek lighting indeed.

Continue reading “The Majesty Of Saturn’s Rings Lighting Your Abode”

GhettoLED boombox with LED strips lighting up speakers

This Boombox Hack Is Lit

Old boomboxes make great hacks. Their design is iconic; yes they look dated but that really just builds on the nostalgic urge to have one hanging around. Plus their big cases simply invite adding things inside in a way impossible with contemporary electronics.

[Danc0rp] hacked his JVC M70 boombox to make the speakers glow with animated light, bumping VU meters, and a pulsing horizontal bar above the tape deck. The effect is superb. The cones of the speakers act like a projection surface and the grilles hide the LEDs until they activate, and enhance the effects once unleashed. It is one of the best LED speaker hacks we’ve ever seen.

Custom board with Arduino UNO
Custom board with Arduino UNO

The light effects are provided by LED strips, which for the speakers are attached just inside the outer rim. The brains behind it all is an Arduino UNO. To connect to it, he soldered components to a blank Arduino prototyping board. That board takes input from the boombox’s line-out and does some filtering (an attempt to address some ground noise) before passing the signal on to the Arduino. That board also interfaces between the Arduino and the LED strips. The schematic is available on his GitHub page. He’d like to replace the board with a custom PCB instead and is looking for design help.

The result is not only beautiful but professional looking too. This makes us wonder why boomboxes don’t come this way. See it for yourself in the video below.

Continue reading “This Boombox Hack Is Lit”