Color Changing Clock Gets A Pi Zero Heart

Hackaday reader [Don] dropped by the tip line recently to let us know about the latest version of his color-changing LCD clock project. This is his second version of the hardware which makes some pretty big improvements over the original, including moving from the Pi B to the Pi Zero and an internal simplification of the wiring. He mentions the next revision of the project will focus on Google Home integration, which should be interesting to see.

As a father of two pre-school age children, he was looking for a way to help his kids understand the concept of time and scheduled activities. Colors and shapes come fairly easy to children of this age, but time and how it relates to the day is a bit more difficult for them especially as their comprehension of numbers is still developing. [Don] reasoned that even if they couldn’t read the numbers on the clock yet, if he had the display change colors to indicate different periods of the day (sleep, play, cleanup, etc), it would not only keep them on schedule, but reinforce the meaning of the numbers on the screen.

ShiftBrite installed in the projector.

The project was made infinitely easier by a lucky find at a local retailer. For $10 he got a kid-friendly looking clock that utilized a simple projector to backlight the LCD display. This meant [Don] would just need to swap out the stock lighting module for a controllable RGB LED, and the hardware modifications would essentially be complete.

Even the Pi Zero fits perfectly inside the case of the clock, the only modification necessary was cutting a little hole in the back for the Pi’s micro USB port. His earlier version used an external Pi B connected to the clock via CAT5, so getting it all integrated into the one device is a huge improvement, especially when little kids are involved. Moving the Pi and its 5 V pins into the clock itself also allowed [Don] to drop the voltage regulator required previously.

With the basic hardware for a color changing LCD clock together, the rest of the project was just a matter of software. After some research, [Don] came across RPi-ShiftBrite by [Hive13] and made his own fork which added some features necessary for his project, namely the ability to quickly set the ShiftBrite to a specific color on the command line. To schedule the color changes, he used the very slick minicron: a web-based tool to create and monitor Linux cron jobs.

The Pi itself does not actually interface with the clock, and with no onboard RTC it’s necessary to keep it updated with NTP or else the times will become desynchronized. It can be necessary to sync the Pi’s clock to the Internet as often as every hour to make sure the colors shift at the appropriate times. The addition of a RTC module like the DS1307 could alleviate this issue and might be something to consider for a future revision.

All told, a fantastic project and something we’ll be sure to keep our eyes on as it progresses. We’ve seen our share of unique Raspberry Pi powered clocks, and even a few color changing ones, but this approach is easily the most straight-forward we’ve seen.

Continue reading “Color Changing Clock Gets A Pi Zero Heart”

Raspberry Pi Ain’t Afraid Of No Spectre And Will Not Meltdown

While there’s broad agreement that Meltdown and Spectre attacks are really bad news at a fundamental level, there is disagreement on its immediate practical impact in the real world. Despite reassurance that no attacks have been detected in the wild and there’s time to roll out the full spectrum of mitigation, some want to find protection right now. If you’re interested in an usable and easy to set up modern desktop that’s free of Meltdown or Spectre threats, a Raspberry Pi can provide the immunity you seek.

[Eben Upton] explained the side channel attacks using fragments of Python for illustration, which was an enlightening read independent of the Raspberry Pi pitch. While these ARM cores perform speculative instruction fetches, they don’t speculatively execute them or modify the cache. Under the current circumstances, that makes all the difference in the world.

A clever security researcher may yet find a way to exploit speculative fetches in the future, and claiming that Raspberry Pi has superior security would be a stretch. The platform has its own set of security problems, but today Meltdown/Spectre is not among them. And that just might be enough to sway some decisions.

If you need to stay in the x86 world, look over what it’d take to to rewind back to an Intel 486.

Thanks to [D00med] for sharing the link in a comment to our overview article.

Bark Back IoT Pet Monitor

Does your pet get distressed when you’re not home? Or, perhaps their good behaviour slips when you’re not around and they cause a ruckus for the neighbours. Well, [jenfoxbot] has just such a dog, so she built a ‘bark back’ IoT pet monitor to keep an eye on him while she’s out.

The brains and backbone of the pet monitor is the ever-popular Raspberry Pi 3. A Sparkfun MEMS microphone breakout board listens for any unruly behaviour, with an MCP3002 analog to digital converter chip reading the mic input. Some trial-and-error coding allowed her to set a noise threshold that — once exceeded — will trigger an audio file, shushing her dog. It also logs events and uploads any status updates to a CloudMQTT server to be monitored while away from home. Her Imgur build album can be found here, and the GitHub project page is here if you want to build your own!

Check out the demo video after the break, that was probably confusing for her good dog, Marley.

Continue reading “Bark Back IoT Pet Monitor”

An IoT Christmas Tree For Your Hacker-Mas Celebrations

Smart Christmas trees may soon come to mean something more than a fashionably decorated tree. Forging ahead with this new definition, [Ayan Pahwa], with help from [Akshay Kumar], [Anshul Katta], and [Abhishek Maurya] turned their office’s Christmas Tree into an IoT device you can watch live!

As an IoT device, the tree relies on the ever-popular ESP8266 NodeMCU — activated and controlled by Alexa, as well as from a web page. The LEDs for the tree — and the offline-only tree-topper controlled by an Arduino Pro Mini — are the similarly popular Neopixels.

For those viewing online, a Raspberry Pi and camera have been attached to this project to check out the tree’s lighting. To make that possible, [Pahwa] had to enlist the use of ngrok to make the Pi’s –normally — LAN-only camera server accessible over the internet. The aforementioned web page was coded in Javascript/CSS and hosted on a server running an instance of Ubuntu 16.04.

Continue reading “An IoT Christmas Tree For Your Hacker-Mas Celebrations”

Laptop With Raspberry Pi Inside Learns To Speak Battery

Early in November we took a look at a one of the best Raspberry Pi laptops we had ever seen, using the shell of a Sony VAIO. Laptops used to be hulking beasts, and that played into [Frank Adams’] hands as he got rid of the motherboard and had enough space to replace it with a Raspberry Pi and a few other support boards. This took advantage of the laptop’s screen, keyboard, LEDs, etc. But what’s a laptop without battery power? [Frank] hadn’t cracked that nut until now.

Inside of Sony VAIO laptop turned Raspberry Pi computer
VAIO battery and charging PCB seen to lower left

Adding battery power is trickier that it sounds, but [Frank] managed to get the Raspberry Pi to talk to the original Sony VAIO internal battery. His work on the project is shared, but this part of the story is best found starting on page 29 of his PDF project details.

Using the original battery is a good move since it’s designed to fit and has a charger ready to interface with the port on the laptop case. But these batteries have logic inside them, and there’s the rub. Communications use the 2-wire System Management Bus (SMBus) which is well documented. But the when trying to use the Pi’s I2C [Frank] couldn’t figure out to send a repeated start command.

He ended up writing his own C program that bit-bangs the communications he needed and now has the Pi speaking to the battery and listening to what it hears coming back. Reading through his description of this is fun since he includes his observations from a logic analyzer captures. He suspects an occasional bad read is due to Linux interrupting code execution. He watches for and catches these bad reads in software and can now reliably read all the battery vitals.

The hack leaves him with a system that functions in much the same way the original computer did: plug it in and it charges. He did add some hardware that lets him take a voltage reading from the battery using an ADC on the Teensy that was already present to control the keyboard and case LEDs. This adds a small constant draw on the battery, but for now he doesn’t leave the battery connected when the laptop is not in use.

If you’d like to read our original coverage of this laptop, here it is.

Fast 3D Printing With Raspberry Pi — But Not How You Think

Although we tend to think of 3D printers as high-tech toys, most of them are not especially powerful in the brain department. There are some exceptions, but most 3D printers run on either an 8-bit Arduino or some Arduino variant with a lot of I/O. There are a few 32-bit boards, but if you grab a random 3D printer, its brain is going to be an 8-bit AVR running something like Marlin or Repetier. It isn’t uncommon to see a Raspberry Pi connected to a printer, too, but — again, in general — it is a network interface that handles sending G-code to the 8-bit controller that runs the stepper motors. Would it make more sense to do things like parse G-code, map out curves, and set accelerations in the relatively powerful Raspberry Pi and relegate the 8-bit AVR to just commanding motors and heaters? [KevinOConnor] thinks so, and he wrote Klipper to prove it.

Klipper is mostly written in Python and it does most of the functions of traditional 3D printing firmware. It communicates with the onboard microprocessor by providing a schedule of when to do what tasks. The microprocessor then handles the timing and things like motion control for the axes and extruder. Klipper can control multiple microprocessors with no trouble and keeps them in synchronization, so you could have a processor for your extruder and one for each stepper, for example. You can use Klipper with a Cartesian machine, a delta, or a Core XY-style printer.

Continue reading “Fast 3D Printing With Raspberry Pi — But Not How You Think”

A Laser Cut Arcade Cabinet For Ants

Most of us would probably like to have an arcade cabinet at home, but it’s hard to justify the space they take up. Sure it’s an awesome conversation starter when friends are over, and you might even play it regularly, but at some point you’ll look over at the corner and realize there’s probably something more practical you could be doing with that particular section of the room.

Perhaps the solution is to just make a smaller one. You could do one at half scale, or even desktop sized. But why stop there? Why not make one so small that you could put the thing in a drawer when you don’t need it? While it might be more of an academic experiment than a practical entertainment device, [RedPixel] has managed to create just such an easily concealable arcade cabinet out of a Pi Zero and laser cut wood. At only 83 mm high, this may well be the smallest functional arcade cabinet ever made (at least for now).

All of the cabinet parts were drawn in Inkscape and cut out of 3 mm plywood. The buttons and joystick are wired directly to the Pi Zero’s GPIO pins and configured with Adafruit-retrogame. The display is a SPI ILI9163, which [RedPixel] previously documented on his site.

The Pi is running the ever-popular RetroPie, which allows this tiny arcade cabinet to emulate 1000’s of console and arcade games, assuming you can deal with the controls anyway. While [RedPixel] has uploaded a video of his lilliputian cabinet running an emulator, there’s no video of him actually playing the thing. While we don’t doubt that it functions as advertised, gameplay on such a tiny array of inputs must be very difficult.

This may be the smallest functional arcade cabinet to date, but it isn’t without challengers. We’ve covered a number of very impressive builds that manage to invoke the look and feel of a hulking coin-up despite fitting neatly on your desk.

Continue reading “A Laser Cut Arcade Cabinet For Ants”