Using Google Calendar For Machines To Keep Track Of Human Days

Daily triggers for automation are simple in theory, unless it needs to keep track of the calendar that humans actually live by. Seasonal changes, shifting public holidays, or just being on vacation are all exceptions you may need to account for. [Jeremy Rode] likes using Google Calendar to stay on top of events, so he created CalendarScraper, a simple script to make his machines use it too.

Jeremy needed a timer for his spa heater that would reduce costs by only switching it on when his local time-of-use-based electricity rates were favorable. The rates varied based on the time of day, day of the week, and even seasons and public holidays. Instead of trying to set up everything manually in a cron job, he created a short and easy-to-modify JavaScript script to keep track of events on a Google Calendar.

We’ve seen some other projects that pull data from Google Calendar, including a recycling day reminder, and even a physical desktop calendar.

Scripting Coils For PCB Motors

PCB inductors are a subject that has appeared here at Hackaday many times, perhaps most notably in the electromagnetic exploits of [Carl Bugeja]. But there is still much to be learned in the creation of the inductors themselves, and [atomic14] has recently been investigating their automatic creation through scripting.

A simple spiral trace is easy enough to create, but when for example creating a circular array of coils for an electric motor there’s a need for more complex shapes. Drawing a trapezoidal spiral is a surprisingly difficult task for a script, and we’re treated to a variety of algorithms in the path to achieving a usable design.

Having perfected the algorithm, how to bring it into KiCAD?  The PCB CAD package has its own Python environment built-in, but it’s not the most flexible in which to develop. The solution is to write a simple JSON interpreter in KiCAD, and leave the spiral generation to an external script that passes a JSON. This also leaves the possibility of using the same code in other PCB packages.

You can watch the whole video below the break. Meanwhile for more PCB electromagnetics, watch [Carl Bugeja]’s 2019 Supercon interview.

Continue reading “Scripting Coils For PCB Motors”

A solar inverter that asks for a password on its display

Decompiling Software To Fix An Old Solar Inverter

It’s a fact of life that electronic devices become obsolete after a few years. Sometimes this is because technology has moved on, but it can also happen that a perfectly functional device becomes near-useless simply because the original manufacturer no longer supports it. When [Buy It Fix It] found a pair of second-hand Power-One Aurora solar inverters, he ran into an issue for which he needed access to the service menu, which happened to be password-protected. The original manufacturer had ceased to exist, and the current owner of the brand name was unable to help, so [Buy It Fix It] had to resort to reverse engineering to find the password.

Thanks to the Wayback Machine over at the Internet Archive, [Buy It Fix It] was able to download the PC software bundle that originally came with the inverters. But in order to access all features, a password was required that could only be obtained by registering the unit with the manufacturer. That wasn’t going to happen, so [Buy It Fix It] fired up dnSpy, a decompiler and debugger for .NET programs. After a bit of searching he found the section that checked the password, and by simply copying that section into a new program he was able to make his own key generator.

With the service password now available, [Buy It Fix It] was able to set the inverter to the correct voltage setting and hook it up to his solar panels. Interestingly, the program code also had references to “PONG”, “Tetris” and “tiramisu” at various places; these turned out to be Easter eggs in the code, containing simple versions of those two games as well as a photo of the Italian dessert.

Inside the software archive was also another program that enabled the programming of low-level functions within the inverter, things that few users would ever need to touch. This program was not written in .NET but in C or something similar, so it required the use of x32dbg to look at the machine code. Again, this program was password-protected, but the master password was simply stored as the unencrypted string “91951” — the last five digits of the manufacturer’s old phone number.

The inverter was not actually working when [Buy It Fix It] first got it, and his repair video (also embedded below) is also well worth watching if you’re into power electronics repair. Hacking solar inverters to enable more features is often possible, but of course it’s much easier if the entire design is open source.

Continue reading “Decompiling Software To Fix An Old Solar Inverter”

WheatSystem Is A Homebrew 8-Bit OS

[Esperantanaso] has long been involved in producing homebrew 8-bit computers. His various builds could all achieve different things, but he grew frustrated that applications written for one could not be easily run on another. He recently took a big leap forward in this area, though, cooking up his own 8-bit operating system called WheatSystem.

The work initially began with BreadSystem, which relied on applications existing in bytecode. This would then be run by the BreadSystem OS which would handle the requisite conversion to the machine code of the system it ran on. However, the work quickly got out of hand when it came to implementing advanced features like the file system and floating-point handling. BreadSystem was looking likely to be too heavy to run on lightweight 8-bit systems.

That led to the development of WheatSystem, which kept the bytecode runtime environment, unified heap, and a memory permission system from BreadSystem. Fancier features like granular memory permissioning, automatic garbage collection, and file system directories were dropped.

WheatSystem quickly became a basic and functional OS. To demonstrate it, [Esperantanaso] created WheatBox 55A1, a small homebrew computer based on the ATmega328. It readily runs simple applications like a prime number generator or a basic RPG.

Creating one’s own OS is no mean feat, even at the 8-bit level. We’ve seen it done before, and it never fails to impress.

Continue reading “WheatSystem Is A Homebrew 8-Bit OS”

Hacking Developers With A Cat Feeder: Who’s A Good Kitty?

Most of us probably know the drudgery of getting through some coding work, with just tedious hours of monkeying around stretching ahead of us. What if this tedium were to be interrupted by an occasional reward when we did something productive, like pushing a commit or other measure of progress? That’s roughly the concept that [John Partee] started off with when his gaze fell upon one of those automated cat feeders. Cat or developer, who doesn’t like to hear the tinkle of a tasty treat falling into their bowl?

The target pet feeder is a PetKit Fresh Element Solo, which allows for objects with a size of 12×12 mm (any orientation) to be fed through the feeding mechanism. Fortunately [John]’s favorite dark chocolate-covered almonds treat fit these requirements, and he set to work to figure out the REST API call needed to trigger a manual feeding event on the cat feeder device, employing the existing PyPetKit Python library that does the heavy lifting of connecting to and communicating with PetKit’s servers, as the feeder is of course an IoT device.

This means that the event flow still depends on PetKit’s “cloud”, which may inspire some enterprising hackers to make a stand-alone version, the development of which may be assisted by [John]’s solution through a regular treat. Before taking such a solution into use, be sure to discuss it with any pets you have, as they may not quite comprehend why there’s no reward for them whenever the *tinkle* sound occurs.

Continue reading “Hacking Developers With A Cat Feeder: Who’s A Good Kitty?”

Exploring The Cutting Edge Of Desktop ARM Hardware

While the x86 architecture certainly isn’t going away anytime soon, it seems that each year more and more of our computing is done on ARM processors. It started with our smartphones, spread into low-cost Chromebooks, and now Apple’s gone all-in with their M1/M2 chips. But so far we haven’t seen too much movement in the desktop space, a fact which has arguably slowed the development of ARM-compatible software and operating systems.

But that doesn’t mean there aren’t options out there, and no, we don’t mean using a Raspberry Pi. [Wooty-B] has been documenting their efforts to switch over to a ARM desktop, which makes for fascinating reading even if you’re currently comfortable with your architecture choices. The key is the HoneyComb LX2K, a Mini-ITX ARM development board that offers enough expansion and raw power to meet most daily computing needs…assuming you’re willing to put in the effort. Continue reading “Exploring The Cutting Edge Of Desktop ARM Hardware”

Git Your PCBs Online

Last time, I’ve shown you how to create a local Git repository around your PCB project. That alone provides you with local backups, helping you never lose the changes you make to your files, and always be able to review the history of your project as it developed.

However, an even more significant part of Git’s usefulness is the ability to upload our creations to one of the various online Git repository hosting services, and keep it up to date at all times with a single shell command. I’d like to show you how to upload your project to GitHub and GitLab, in particular!

Continue reading “Git Your PCBs Online”