Once a program has been debugged and works properly, it might be time to start optimizing it. A common way of doing this is a method called profiling – watching a program execute and counting the amount of computing time each step in the program takes. This is all well and good for most programs, but gets complicated when processes execute on more than one core. A profiler may count time spent waiting in a program for a process in another core to finish, giving meaningless results. To solve this problem, a method called casual profiling was developed.
In casual profiling, markers are placed in the code and the profiler can measure how fast the program gets to these markers. Since multiple cores are involved, and the profiler can’t speed up the rest of the program, it actually slows everything else down and measures the markers in order to simulate an increase in speed. [Daniel Morsig] took this idea and implemented it in Go, with an example used to demonstrate its effectiveness speeding up a single process by 95%, resulting in a 22% increase in the entire program. Using a regular profiler only counted a 3% increase, which was not as informative as the casual profiler’s 22% measurement.
We got this tip from [Greg Kennedy] who notes that he hasn’t seen much use of casual profiling outside of the academic world, but we agree that there is likely some usefulness to this method of keeping track of a multi-threaded program’s efficiency. If you know of any other ways of solving this problem, or have seen causal profiling in use in the wild, let us know in the comments below.
While we often think we are clever designers, living things often meet or beat the best human designs. It is easy to forget that nature even has living lightbulbs, among them the firefly. Researchers from Penn State decided to compare how fireflies create light and found that they deal with a problem similar to LEDs. The insight may lead to an increase in efficiency for LEDs, which is currently about 50%.
The problem is that some light generated never gets out of the LED (or the firefly’s body). Some light inevitably reflects back into the device. One known mitigation for this is creating a tiny texture pattern on the LED surface which allows more light to escape. These are typically a V-shaped structure etched into the surface. This isn’t news to the firefly, however, which has similar structures on their lanterns as do some other light-generating animals (apparently glowing cockroaches are a thing). However, the organic structures differ from LED textures in an important way.
You’ll remember [Christoph]’s giant 3D-printed BLDC motor from a recent post where he gave the motor a quick test spin. That the motor held together under load despite not being balanced is a testament to the quality of his design and the quality of the prints. But not wishing to tempt fate, and having made a few design changes, [Christoph] wisely chose to perform a static balancing of the rotor. He also made some basic but careful measurements of the motor’s parameters, including the velocity constant (Kv) using an electric drill, voltmeter, and tachometer, and the torque using a 3D-printed lever arm and a kitchen scale. All his numbers led him to an overall efficiency of 80%, which is impressive.
The common household wall wart is now under stricter regulation from the US Government. We can all testify to the waste heat produced by many cheap wall warts. Simply pick one at random in your house, and hold it; it will almost certainly be warm. This regulation hopes to save $300 million in wasted electricity, and reap the benefits, ecologically, of burning that much less fuel.
We don’t know what this means practically for the consumer. Will your AliExpress wall warts be turned away at the shore now? Will this increase the cost of the devices? Will it make them less safe? More safe? It’s always hard to see where new regulation will go. Also, could it help us get revenge on that knock-off laptop adapter we bought that go hot it melted a section of carpet?
However, it does look like most warts will go from a mandated 50-ish percent efficiency to 85% and up. This is a pretty big change, and some hold-out manufacturers are going to have to switch gears to newer circuit designs if they want to keep up. We’re also interested to hear the thoughts of those of you outside of the US. Is the US finally catching up, or is this something new?
Solar panels are an amazing piece of engineering, but without exactly the right conditions they can be pretty fickle. One of the most important conditions is that the panel be pointed at the sun, and precise aiming of the panel can be done with a solar tracker. Solar trackers can improve the energy harvesting ability of a solar panel by a substantial margin, and now [Jay] has a two-axis tracker that is also portable.
The core of the project is a Raspberry Pi, chosen after [Jay] found that an Arduino didn’t have enough memory for all of the functionality that he wanted. The Pi and the motor control electronics were stuffed into a Pelican case for weatherproofing. The actual solar tracking is done entirely in software, only requiring a latitude and longitude in order to know where the sun is. This is much easier (and cheaper) than relying on GPS or an optical system for information about the location of the sun.
Be sure to check out the video below of the solar tracker in action. Even without the panel (or the sun, for that matter) the tracker is able to precisely locate the panel for maximum energy efficiency. And, if you’d like to get even MORE power from your solar panel, you should check out a maximum power point tracking system as well.
After adding a few LED light strips above his desk, [Bogdan] was impressed with the results. They’re bright, look awesome, and exude a hacker aesthetic. Wanting to expand his LED strip installation, [Bogdan] decided to see if these inexpensive LED strips were actually less expensive in the long run than regular incandescent bulbs. The results were surprising, and we’ve got to give [Bogdan] a hand for his testing methodology.
[Bogdan]’s test rig consists of a 15 cm piece of the LED strip left over from his previous installation. A Taos TSL2550 ambient light sensor is installed in a light-proof box along with the LED strip, and an AVR microcontroller writes the light level from the sensor and an ADC count (to get the current draw) of the rig every 6 hours.
After 700 hours, [Bogdan]’s testing rig shows some surprising results. The light level has decreased about 12%, meaning the efficiency of his LED strip is decreasing. As for projecting when his LEDs will reach the end of their useful life, [Bogdan] predicts after 2200 hours (about 3 months), the LED strip will have dropped to 70% of their original brightness.
Comparing his LED strip against traditional incandescent bulbs – including the price paid for the LED strip, the cost of powering both the bulb and the strip, the cost of the power supply, and the time involved in changing out a LED strip, [Bogdan] calculates it will take 2800 hours before cheap LEDs are a cost-effective replacement for bulbs. With a useful life 600 hours less than that, [Bogdan] figures replacing your workshop lighting with LED strips – inexpensive though they are – isn’t an efficient way to spend money.
Of course with any study in the efficiency of new technology there are bound to be some conflating factors. We’re thinking [Bogdan] did a pretty good job at gauging the efficiency of LED strips here, but we would like to see some data from some more expensive and hopefully more efficient LED strips.
First of all, it’s not shocking to find out that rooms with no sunlight produced negligible energy during that time. When you think about it, if they had been gathering a statistically significant amount wouldn’t that mean the lighting used in those rooms was incredibly inefficient? In other words, there’s no way you need to be making that much light.
But he did find that proper positioning in rooms that catch sunlight during the day can result in usable energy for small loads. He established that a 0.5 Watt panel harvested just a bit more than half of what a 1 Watt panel did. But perhaps the most useful discovery was that it’s quite a bit more efficient to have a charging circuit store energy in a battery rather than directly powering a fixed load.
It will take us a few more viewings to really decide what we can take away from the experiment for our own projects. But we appreciate [Mathieu’s] quest for knowledge and his decision to put this information out there so that others can learn from it.