Assessing The Energy Efficiency Of Programming Languages

Programming languages are generally defined as a more human-friendly way to program computers than using raw machine code. Within the realm of these languages there is a wide range of how close the programmer is allowed to get to the bare metal, which ultimately can affect the performance and efficiency of the application. One metric that has become more important over the years is that of energy efficiency, as datacenters keep growing along with their power demand. If picking one programming language over another saves even 1% of a datacenter’s electricity consumption, this could prove to be highly beneficial, assuming it weighs up against all other factors one would consider.

There have been some attempts over the years to put a number on the energy efficiency of specific programming languages, with a paper by Rui Pereira et al. from 2021 (preprint PDF) as published in Science of Computer Programming covering the running a couple of small benchmarks, measuring system power consumption and drawing conclusions based on this. When Hackaday covered the 2017 paper at the time, it was with the expected claim that C is the most efficient programming language, while of course scripting languages like JavaScript, Python and Lua trailed far behind.

With C being effectively high-level assembly code this is probably no surprise, but languages such as C++ and Ada should see no severe performance penalty over C due to their design, which is the part where this particular study begins to fall apart. So what is the truth and can we even capture ‘efficiency’ in a simple ranking?

Continue reading “Assessing The Energy Efficiency Of Programming Languages”

Ceramic stove (credit: Felix Reimann)

Same Taste With Less Energy: Optimizing The Way We Cook Food

Preparing food is the fourth most energy-intensive activity in a household. While there has been a lot of effort on the first three — space heating, water heating, and electrical appliances — most houses still use stoves and ovens that are not too dissimilar to those from half a century ago.

More recent technologies that make cooking more efficient and pleasant have been developed, such as induction heating. Other well-known and common appliances are secretly power savers: microwaves and electric kettles. In addition, pressure cookers enable the shortening of cooking times, and for those who like dishes that take hours to simmer, vacuum-insulated pans can be a real energy-saver.

Continue reading “Same Taste With Less Energy: Optimizing The Way We Cook Food”

Revolving Doors Aren’t Just Annoying, They’re Energy Saving Too

While most of us have been content with swing and sliding doors for the vast majority of our needs around the home, the revolving door remains popular in a wide variety of contexts.

It’s a confounding contraption that always feels ready to snatch and ensnare the unwary user. However, these doors do have certain benefits that have allowed them to retain popularity in many public buildings around the world. Let’s dive in to why below.

Continue reading “Revolving Doors Aren’t Just Annoying, They’re Energy Saving Too”

Solar Pi Zero E-Paper Photo Frame Waits For The Right Moment

One of the biggest advantages of electronic paper is that it doesn’t require a constant power source to display a static image. Depending on the application, this can lead to a massive energy savings compared to more traditional display technologies. Of course, the electronics that actually drive the display are another story entirely. You need to reduce the energy requirements of the whole system if you really want to stretch your battery life.

So when [Giacomo Miceli] wanted to put together this solar powered e-paper photo frame, he had to come up with some creative ways to curb the energy consumption of the Raspberry Pi Zero that runs the show. While the 10.3 inch 1872 × 1404 panel would only require the occasional burst of power to flick over to a new image, the Pi would be a constant drain on the internal battery pack. Considering he wanted the frame to recharge from ambient light with an array of small solar panels, that simply wouldn’t do.

The solution came in the form of a PiJuice HAT and some scripts that decide how often the Pi is to be powered on based on the current battery level. If there’s enough power, it might be every hour or so. But the lower the charge, the longer the delay. When the energy situation is particularly dire, the Pi might only be turned on every couple of days. With the Pi off and the e-paper not drawing any power, all of the energy produced by the solar panels can be devoted to recharging the frame’s 1,000 mAh battery.

When the Pi does get booted up, it quickly connects to a server to download a new image and update the display. After that, it ascertains the current battery level and determines how long the PiJuice should wait before turning it back on. After these tasks are complete, it will turn itself off until the next scheduled event. All told, [Giacomo] says the Pi is only up and running for about a minute each time the image is refreshed on the e-paper. He says the system has been running for six weeks now, with the battery level occasionally dipping down to 40% or so before it climbs back up.

Admittedly the energy consumption of the frame could be cut drastically by replacing the Raspberry Pi with a simple microcontroller, but we appreciate the creativity. Besides, the power and flexibility afforded by the Pi means this frame could be taught quite a few new tricks with some updated software.

Exploring The Science Behind Dirty Air Filters

Obviously, if the air filters in your home HVAC system are dirty, you should change them. But exactly how dirty is dirty? [Tim Rightnour] had heard it said that if you didn’t change your filter every month or so, it could have a detrimental effect on the system’s energy consumption. Thinking that sounded suspiciously like a rumor Big Filter™ would spread to bump up their sales, he decided to collect his own data and see if there was any truth to it.

There’s a number of ways you could tackle a project like this, but [Tim] wanted to keep it relatively simple. A pressure sensor on either side of the filter should tell him how much it’s restricting the airflow, and recording the wattage of the ventilation fan would give him an idea on roughly how hard the system was working.

Now [Tim] could have got this all set up and ran it for a couple months to see the values gradually change…but who’s got time for all that? Instead, he recorded data while he switched between a clean filter, a mildly dirty one, and one that should have been taken out back and shot. Each one got 10 minutes in the system to make its impression on the sensors, including a run with no filter at all to serve as a baseline.

The findings were somewhat surprising. While there was a sizable drop in airflow when the dirty filter was installed, [Tim] found the difference between the clean filter and mildly soiled filter was almost negligible. This would seem to indicate that there’s little value in preemptively changing your filter. Counter-intuitively, he also found that the energy consumption of the ventilation fan actually dropped by nearly 50 watts when the dirty filter was installed. So much for a clean filter keeping your energy bill lower.

With today’s cheap sensors and virtually infinite storage space to hold the data from them, we’re seeing hackers find all kinds of interesting trends in everyday life. While we don’t think your air filters are spying on you, we can’t say the same for those fancy new water meters.

Karakuri Kaizen: Hacks For The Factory Floor

Anyone who has an interest and/or career in manufacturing would have heard of Kaizen, generally a concept to continuously improve your process everywhere. Under that huge umbrella is Karakuri Kaizen, encouraging workers on the factory floor to adopt a hacker mentality and improve their own work stations. It is right up our alley, manufacturer or not, making this overview by Automotive News an entertaining read.

Karakuri could be translated as “mechanism”, but implies something novel in the vein of English words gadgets, gizmos, or dare we say it: hacks. Karakuri has a history dating back to centuries-old wind-up automatons all the way to modern Rube Goldberg contraptions. When applied to modern manufacturing (as part of factory training) it encourages everyone to devise simple improvements. Each might only shave seconds off assembly time, but savings add up in due time.

Modern global manufacturing is very competitive and survival requires producing more efficiently than your competitors. While spotlights of attention may be focused on technology, automation, and construction of “alien dreadnoughts”, that focus risks neglecting gains found at a smaller and simpler scale. Kaizen means always searching for improvements, and the answer is not always more technology.

Several points in these articles asserted purely mechanical karakuri are far less expensive than automated solutions, by comparing price tags which are obviously for industrial automation equipment. We’d be curious to see if our favorite low cost tools — AVR, PIC, ESP32, and friends — would make future inroads in this area. We’ve certainly seen hacks for production at a much smaller scale.

Embedded below the break is a short video from Toyota showing off a few karakuri on their factory floor.

Continue reading “Karakuri Kaizen: Hacks For The Factory Floor”

Hackaday Prize Entry: Dave Thomas’ Desert Dryer

It seemed utter madness — people living in hot desert climates paying to heat air. At least it seemed that way to [David Thomas] before he modified his tumble dryer to take advantage of Arizona’s arid environment.

Hanging the wash out to dry is a time-honored solution, and should be a no-brainer in the desert. But hanging the wash takes a lot of human effort, your laundry comes back stiff, and if there’s a risk of dust storms ruining your laundry, we can see why people run the dryer indoors. But there’s no reason to waste further energy heating up your air-conditioned interior air when hot air is plentiful just a few meters away.

[David]’s modification includes removing the gas heating components of the dryer and adding an in-line filter. He explains it all in a series of videos, which at least for his model, leave no screw unturned. It’s not an expensive modification either, consisting mostly of rigid dryer hose and copious amounts of aluminum duct tape. He mentions the small fire that resulted from failing to remove the gas igniter, so consider yourself warned. The intake filter and box were originally intended for a house air-conditioning system, and required only minimal modifications.

This is a great build, being both cheap and easy to implement as well as being environmentally friendly without requiring a drastic change to [David]’s lifestyle. It makes us wish we had a similar endless supply of hot air.

The HackadayPrize2016 is Sponsored by: