Circadian Lighting For The Home Via Home Assistant

Artificial lighting is great, in that it lets us work and live well into the night. However, our bodies are dependent on the natural lighting cycles of the sun as part of their basic operation, and artificial lighting can interfere with this. [Tyler Cipriani] decided to use Home Assistant with some smart lights to try and make home lighting more suitable for our natural circadian rhythms.

The basic intent was to give the home bright white/blueish light during the day, matching the sun’s output. The light would then be altered to warmer yellow/red tones in the evening. The eye has cells that respond to blue light to regulate our circadian rhythms with the presence of the sun, so reducing blue light at night may help reduce disruption to sleep and other body processes.

Home Assistant has a Circadian lighting component available built specifically for this task. It’s a useful smart home tool for achieving such a job, too, as it readily works with a wide variety of hardware from different vendors. In [Tyler]’s case, light switches are Zigbee devices that talk to Home Assistant via a Zigbee2MQTT hookup and a Combee Zigbee gateway. Lights around the home are a mixture of Philips Hue devices and other brands of smart lights.

[Tyler] states the effects are “subtle but noticable.” He notes that it’s easier to feel sharp and work during the day, but harder to continue the lighting warms and dims at night. He points out that this is a design feature to help keep him on a healthy sleep schedule.

We’ve seen other circadian rhythm lights before. In fact, NASA uses them on the ISS, but you can build your own for a lot less than they spent. If you’ve got your own circadian lighting hacks, don’t hesitate to drop us a line!

Hackaday Links Column Banner

Hackaday Links: November 13, 2022

Talk about playing on hard mode! The news this week was rife with stories about Palmer Luckey’s murder-modified VR headset, which ostensibly kills the wearer if their character dies in-game. The headset appears to have three shaped charges in the visor pointing right at the wearer’s frontal lobe, and would certainly do a dandy job of executing someone. In a blog post that we suspect was written with tongue planted firmly in cheek, Luckey, the co-founder of Oculus, describes that the interface from the helmet to the game is via optical sensors that watch the proceeding on the screen, and fire when a certain frequency of flashing red light is detected. He’s also talking about ways to prevent the removal of the headset once donned, in case someone wants to tickle the dragon’s tail and try to quickly rip off the headset as in-game death approaches. We’re pretty sure this isn’t serious, as Luckey himself suggested that it was more of an office art thing, but you never know what extremes a “three commas” net worth can push someone to.

There’s light at the end of the Raspberry Pi supply chain tunnel, as CEO Eben Upton announced that he foresees the Pi problems resolving completely by this time next year. Upton explains his position in the video embedded in the linked article, which is basically that the lingering effects of the pandemic should resolve themselves over the next few months, leading to normalization of inventory across all Pi models. That obviously has to be viewed with some skepticism; after all, nobody saw the supply chain issues coming in the first place, and there certainly could be another black swan event waiting for us that might cause a repeat performance. But it’s good to hear his optimism, as well as his vision for the future now that we’re at the ten-year anniversary of the first Pi’s release.

Continue reading “Hackaday Links: November 13, 2022”

A 386 motherboard with a custom ISA card plugged in

Emulate Any ISA Card With A Raspberry Pi And An FPGA

One of the reasons the IBM PC platform became the dominant standard for desktop PCs back in the mid-1980s was its open hardware design, based around what would later be called the ISA bus. Any manufacturer could design plug-in cards or even entire computers that were hardware and software compatible with the IBM PC. Although ISA has been obsolete for most purposes since the late 1990s, some ISA cards such as high-quality sound cards have become so popular among retrocomputing enthusiasts that they now fetch hundreds of dollars on eBay.

So what can you do if your favorite ISA card is not easily available? One option is to head over to [eigenco]’s GitHub page and check out his FrankenPiFPGA project. It contains a design for a simple ISA plug-in card that hooks up to a Cyclone IV FPGA and a Raspberry Pi. The FPGA connects to the ISA bus and implements its bus architecture, while the Pi communicates with the FPGA through its GPIO ports and emulates any card you want in software. [eigenco]’s current repository contains code for several sound cards as well as a hard drive and a serial mouse. The Pi’s multi-core architecture allows it to run several of these tasks at once while still keeping up the reasonably high data rate required by the ISA bus.

In the videos embedded below you can see [eigenco] demonstrating the system on a 386 motherboard that only has a VGA card to hook up a monitor. By emulating a hard drive and sound card on the Pi he is able to run a variety of classic DOS games with full sound effects and music. The sound cards currently supported include AdLib, 8-bit SoundBlaster, Gravis Ultrasound and Roland MT-32, but any card that’s documented well enough could be emulated.

This approach could also come in handy to replace other unobtanium hardware, like rare CD-ROM interfaces. Of course, you could take the concept to its logical extreme and simply implement an entire PC in an FPGA.

Continue reading “Emulate Any ISA Card With A Raspberry Pi And An FPGA”

DIY USB Charging The Right Way

Since the widespread adoption of USB 1.1 in the 90s, USB has become the de facto standard for connecting most peripherals to our everyday computers. The latest revision of the technology has been USB 4, which pushes the data rate capabilities to 40 Gbit/s. This amount of throughput is mindblowing compared to the USB 1.x speeds which were three to four orders of magnitude slower in comparison. But data speeds haven’t been the only thing changing with the USB specifications. The amount of power handling they can do has increased by orders of magnitude as well, as this DIY USB charger demonstrates by delivering around 200 W to multiple devices at once.

The build comes to us from [tobychui] who not only needed USB rapid charging for his devices while on-the-go but also wanted to build the rapid charger himself and for the charger to come in a small form factor while still using silicon components instead of more modern gallium nitride solutions. The solution he came up with was to use a 24 V DC power supply coupled with two regulator modules meant for solar panel installations to deliver a staggering amount of power to several devices at once. The charger is still relatively small, and cost around $30 US dollars to make.

Part of what makes builds like this possible is the USB Power Delivery (PD) standard, which has enabled all kinds of electronics to switch to USB for their power needs rather than getting their power from dedicated, proprietary, and/or low-quality power bricks or wall warts. In fact, you can even use this technology to do things like charge lithium batteries.

Continue reading “DIY USB Charging The Right Way”

Dial-Up Internet Over WhatsApp

As we returned from Supercon 2022, we noticed many airlines offer free in-flight messaging. While the messages are handy for complaining about the seat size, it isn’t quite as exciting as access to the internet. In the air, we wondered how hard it would be to tunnel an internet connection over messaging. Funny enough, [Aleix Rodríguez Alameda] has a project that does exactly that by tunneling traffic over Whatsapp.

In [Aleix]’s case, cell carriers are pretty stingy with internet data when traveling in South America but often give unlimited WhatsApp data. So, ahead of time, two accounts are set up. A server is on one account and acts as a proxy to the broader internet and listens to messages to the server account. Then when in a restricted access setting, the client connects with a WebSocket and sends messages. The real trick for turning the WhatsApp messages into an internet connection the client can use is exposing a port from a local nodeJS web server. It connects to the WhatsApp API through a WebSocket and then acts as a proxy. Then, you set up traffic to be redirected through that port with curl or Firefox.

Packets are split to prevent you from sending too many messages, as in their testing, [Aleix]’s accounts were banned quickly. You shouldn’t expect massively fast speeds, as 300kbps was pretty typical during testing, which according to Wikipedia, is about what dial-up got with V.44 compression.

Which is around the same speed as TCP/IP tunneled over NRF23L01 radios.

Go Fly A Kite

Harvesting energy from the wind has been a commercially viable way of generating clean energy for around three decades now. Wind turbines are a reliable, proven technology but they do have some downsides, one of which is that since there’s more wind higher above the ground this usually means tall, expensive towers. There is a way around this problem, though, which is using kites to generate energy instead of a fixed turbine.

While kite generators aren’t a new idea, [Benjamin] has been working on this kite generator which has a number of improvements over existing kite generators. Like other kite generators, this one uses a tether to spin a generator which is located on the ground. But while this is similar to other kite systems, this prototype has a much simpler design and sweeps a much larger area while in flight. It also has an autopilot with multiple independent steering systems, which [Benjamin] says will allow it to stay in flight for months at a time provided there is enough wind. If there isn’t, it can land reliably, and launching it is relatively fast and simple as well.

While kites do have some obvious downsides compared to fixed turbines including a single point of failure at the tether and a large amount of cleared area to operate, they have plenty of advantages as well. They’re smaller, simpler, require no complicated yaw system, and can be easily maintained on the ground. In fact, it’s possible to build very simple kite generators out of nothing more than a hobby kite and some readily-available electrical components.

Continue reading “Go Fly A Kite”

RFID Sticker On Bike Helmet Grants Garage Access

[Glen] might describe his project of opening his garage door by way of an RFID sticker on his bike helmet as simple, but some of the interfacing he needed to do was quite complex. He walks through the project from beginning to end, and there’s plenty to learn from.

When designing an RFID access control system, one has to decide what kind of reader and what kind of tags one wishes to use. They all function more or less the same way, but there are a lot of practical considerations to take into account such as cost, range, ease of use, and security options. After a lot of research, [Glen] decided on inexpensive sticker-style tags and a compatible reader supporting credentials with an ISO14443 UID that could be suitably mounted on a building’s exterior.

The actual opening of the door was the simple part, done by interfacing to a spare remote.

Breakout boards with ready-to-use code libraries exist for some RFID readers, but that wasn’t the case for the reader [Glen] had. He ended up rolling his own code to handle communication with the reader, with a Microchip PIC18F45K50 doing all the work of reading tags and performing access control. His code is on the project’s GitHub repository, and if you also find yourself needing to interface to a reader that uses the Wiegand protocol, you might want to give it a look.

Controlling the actual garage door was the easy part. All that took was soldering two wires across the switch contacts of a spare garage door opener remote, and using a relay to close the contacts. Simple and effective. You can see it in action in the short video, embedded below the break.

Overhead door access control might be a simple concept, but it comes in all shapes and sizes when enterprising hackers start looking for solutions. We’ve seen garage doors given the DIY IoT treatment, and even seen access controlled by a car’s headlamp flashes, which actually turned out to be more secure than it sounds.

Continue reading “RFID Sticker On Bike Helmet Grants Garage Access”