Tag Archives: hacking

Are You Down With MPPT? (Yeah, You Know Me.)

Solar cells have gotten cheaper and cheaper, and are becoming an economically viable source of renewable energy in many parts of the world. Capturing the optimal amount of energy from a solar panel is a tricky business, however. First there are a raft of physical prerequisites to operating efficiently: the panel needs to be kept clean so the sun can reach the cells, the panel needs to point at the sun, and it’s best if they’re kept from getting too hot.

Along with these physical demands, solar panels are electrically finicky as well. In particular, the amount of power they produce is strongly dependent on the electrical load that they’re presented, and this optimal load varies depending on how much illumination the panel receives. Maximum power-point trackers (MPPT) ideally keep the panel electrically in the zone even as little fluffy clouds roam the skies or the sun sinks in the west. Using MPPT can pull 20-30% more power out of a given cell, and the techniques are eminently hacker-friendly. If you’ve never played around with solar panels before, you should. Read on to see how!

Power Points

Let’s start at the ends. The specs for any cell will include an open-circuit voltage and a short-circuit current that it produces under a given illumination. If you don’t have the spec sheet, you can measure these yourself. Connecting a voltmeter to the cell and putting it in the sun measures the former, and swapping out an ammeter and measuring the current measures the latter. So far, so good. But neither of these configurations produces any power, and power delivered over time is what charges up your batteries.

solarcellPower equals voltage times current, P=IV. The open-circuit power is zero because no current is flowing, and the short-circuit power is zero because there’s no voltage difference across the terminals (ideally). Somewhere between these extremes of infinite resistance and zero resistance lies the maximum power point.

Finding it by yourself is as easy as attaching a variable load resistor to the solar panel and noting down the voltage across and current through the resistor at various resistances. Write I with V down as you vary the load resistance and pick the highest value. Done! (Yellow is the current vs. voltage curve, and green is the power.)

If you’re doing this by hand, the first thing to mention is the power handling capacity of the resistor that you’re using to measure the current. A big twenty-watt panel is going to literally burn through a standard 1/4 watt resistor faster than you can say “what’s that smell?”. [Julian Ilett], in his lengthy YouTube video series on creating an Arduino-powered MPPT battery charger, uses a large array of miniature bulbs (LAMB) that he can screw into their sockets to vary the load. We’ve also seen various controllable dummy-load projects ranging from small to very large. That’s ideal, but it’s a project in itself.

cheesy_current_sink

For a quick lash-up that will work for small-to-medium cells, you could do worse than a potentiometer manually controlling the current through a heatsinked power MOSFET. This circuit doesn’t offer precise control of the current, but you don’t need it either, and heck, it only requires two parts and is good for a few watts. It won’t work below the gate threshold of the FET, which was around 3.5 V, so it’s only good for bigger panels or bright sun.

Stay in the Zone

Once you have a good idea about how your panel runs under various loads, you can start designing a system to optimize this for you, and switch out the dummy load for something useful like a battery. An MPPT automates the above current and voltage measurements and includes a voltage converter to keep the solar panel running at its maximum power rating. If we’re interested in charging batteries at a lower voltage than the cell’s maximum power voltage, this converter can be as simple as a buck converter: a fast switch, a large inductor, and a freewheeling diode (or second switch).

buck_circuit_diagramWe usually think of a buck converter as taking an unknown input voltage and stepping it down to a fixed lower output voltage by varying a PWM duty cycle. Here, the PWM is set to maintain the desired voltage on the input from the solar panel so that it’s operating at peak power. Whatever charge passes from the panel into the inductor eventually makes its way downstream to the battery, minus switching and resistive losses in the inductor.

TI has an app note (PDF) that describes possible control strategies in overview. These can be as simple as operating the panel at 80% of it’s open-circuit voltage, or as complicated as sweeping the full range and picking the maximum directly. Just be aware that any adaptive strategy has to take into account that external lighting conditions can be changing continuously as the controller is trying to find the peak.

In particular, if you choose what TI calls a “perturb and observe” strategy — varying the panel voltage a little bit and observing whether more or less power results — changes in the light hitting the panel can make a perturbation look like it improves the panel’s efficiency when really it was just a cloud fading away. Indeed, in [Julian]’s video on automating the power controller you can see it falling into this trap, and we suspect it’s because his algorithm reacts too frequently. A slower feedback loop would be better in our opinion: you don’t mind losing a tiny bit of total power by failing to account for every crow that flies over the panel, but still you do want to drop the buck ratio when it becomes cloudy over a few minutes. There’s tons of room here for experimentation.

With Great Power…

Nature controls the inputs, and your MPPT controls the solar panel’s working voltage to maximize power. The downstream voltage and current are left to fluctuate. If you’re doing something forgiving like charging a lead-acid battery, you can pretty much just dump straight into the battery, taking care to shut off the solar panel when the battery is fully charged. Other than possible overcharge, which you could guard against by reading the battery voltage, a car battery will soak up whatever current you hand it.

img_9195If you’re charging up a battery with more sensitive chemistry, you may need further voltage or current limiting. We’re currently experimenting around with cheap eBay 5 V lithium-ion chargers and old laptop batteries. [Rusdy] has more real-world data on his e-bike charging setup, but there he’s using a step-up converter to charge higher-voltage battery packs.

A panel-to-battery MPPT and charge controller that makes charging lithium-ion batteries simple and efficient is obviously a great thing to have. We’ve had a number of MPPT charger projects on Hackaday.io and they’ve even done well in the Hackaday Prize. There are many open designs out there for you to draw inspiration from, or just copy.

An MPPT is a great intermediate project in power electronics — you’ll learn something about current measurement and get to build your own boost or buck converters. There’s lots of room for data logging and optimization of control algorithms in firmware if that’s your thing. You can start with a small panel and parts from your junk box, or modify eBay parts. And in the end, you get your batteries charged “for free”. How cool is that?

Are you working on an MPPT project right now? If so, let us know!

Filed under: Engineering, green hacks, Hackaday Columns, how-to

from Blog – Hackaday http://ift.tt/2macHMG
via IFTTT

Neural Network Composes Music; Says “I’ll be Bach”

[carykh] took a dive into neural networks, training a computer to replicate Baroque music. The results are as interesting as the process he used. Instead of feeding Shakespeare (for example) to a neural network and marveling at how Shakespeare-y the text output looks, the process converts Bach’s music into a text format and feeds that to the neural network. There is one character for each key on the piano, making for an 88 character alphabet used during the training. The neural net then runs wild and the results are turned back to audio to see (or hear as it were) how much the output sounds like Bach.

The video embedded below starts with a bit of a skit but hang in there because once you hit the 90 second mark things get interesting. Those lacking patience can just skip to the demo; hear original Bach followed by early results (4:14) and compare to the results of a full day of training (11:36) on Bach with some Mozart mixed in for variety. For a system completely ignorant of any bigger-picture concepts such as melody, the results are not only recognizable as music but can even be pleasant to listen to.

MIDI describes music in terms of discrete events, and individual note starts and stops are separate events. Part of the reformatting process involved representing each note as a single ASCII character, thereby structuring the music more like text and less like keyboard events.

The core of things is this character-based Recurring Neural Network which is itself the work of Andrej Karpathy. In his words, “it takes one text file as input and trains a Recurrent Neural Network that learns to predict the next character in a sequence. The RNN can then be used to generate text character by character that will look like the original training data.” How did [carykh] actually use this for music? With the following process:

  1. Gather source material (lots and lots of MIDI files of Bach pieces for piano or harpsichord.)
  2. Convert those MIDI files to CSV format with a tool.
  3. Tokenize and reformat that CSV data with a custom Processing script: one ASCII character now equals one piano key.
  4. Feed the RNN with the resulting text.
  5. Take the ouput of the RNN and convert it back to MIDI with the reverse of the process.

[carykh] shares an important question that was raised during this whole process: what was he actually after? How did he define what he actually wanted? It’s a bit fuzzy: on one hand he wants the output of the RNN to replicate the input as closely as possible, but he also doesn’t actually want complete replication; he just wants the output to take on enough of the same patterns without actually copying the source material. The processing of the neural network never actually “ends”; [carykh] simply pulls the plug at some point to see what the results are like.

Neural Networks are a process rather than an end result and have varied applications, from processing handwritten equations to helping a legged robot squirm its way to a walking gait.

Thanks to [Keith Olson] for the tip!

Filed under: digital audio hacks, musical hacks

from Blog – Hackaday http://ift.tt/2m9mMcP
via IFTTT

Can You Bull’s-Eye A Womprat With A Bean Bag?

As it turns out, a simple game of cornhole — aka, bean bag toss — can have some pretty high stakes. If you lose a round playing on this Death Star trench run cornhole table, the Rebel Alliance may pay the price.

Designed and built by [Hyperdynelabs], the table is set up to play a number of audio clips from the movie with accompanying light effects. Details on how it was made are scant, but there are at least three strips of RGBW LEDs — two that run the length of the board and one inside the exhaust port — an Arduino(presumably), and some sort of wireless connectivity to receive commands.

But it’s not just the electronic effects that make this one great. The physical build itself really nails the Death Star trench run look. This is thanks to artful use of greebles — it’s the same technique which can turn a Nissan into a Z-Wing.

When you make a shot worthy of Luke Skywalker, you’re treated to an impressive lightshow and the sound of the Death Star exploding. For a particularly bad turn, you can have the table charge up and make a show of firing back, or taunt the player if their shot goes wide.

The lights and magic are reminiscent of an arcade machine, which suits the hit-or-miss style of play for this particular board. If cornhole is new to you, or you want to start preparing for a proper BBQ bonanza, check out our feature on some summer DIY projects.

Filed under: misc hacks

from Blog – Hackaday http://ift.tt/2nyqvNW
via IFTTT

PiSound, The Audio Card For The Raspberry Pi

Kids today are being loud with their ‘drum machines’ and ‘EDM’. Throw some Raspberry Pis at them, and there’s a need for a low-latency sound card with MIDI and all the other accouterments of the modern, Skrillex-haired rocker. That’s where PiSound comes in.

Of course, the Pi already comes with audio out, but that’s not enough if you want to do some real audio processing. You need audio in as well, and while you’re messing around with that, adding some high-quality opamps, ADCs, DACs, and some MIDI would be a good idea. This is what the PiSound is all about.

[Pranciskus], the guy who has been working on the PiSound for a while now, developed this multitool for audio on a tiny Linux system. One of the killer features on the PiSound is ‘The Button’, a simple tact switch that runs a script if the button is pressed, another script if the button is held down, and two more if the button is pressed two or three times. This is actually a pretty nifty UI, and we wouldn’t mind seeing this on a few more Pi accessories.

If you’d like to see some example projects using the PiSound, there example MIDI controllers, networked audio players, and some goofing around with LV2 plugins over here.

Filed under: Raspberry Pi

from Blog – Hackaday http://ift.tt/2nfQNYd
via IFTTT

A Wordsearch Twist on the Word Clock

We love seeing new takes on existing ideas, and [Danny] certainly took the word clock concept in an unusual direction with his Wordsearch Clock. Instead of lighting up words to spell out the time, [Danny] decided to embrace the fact that the apparent jumble of letters on the clock face resembles a word search puzzle.

In a word search puzzle, words can be found spelled forward or backward with letters lined up horizontally, diagonally, or vertically. All that matters is that the correct letters are in a line and sequentially adjacent to one another. [Danny]’s clock lights up the correct letters and words one after the other, just as if it were solving a word search puzzle for words that just happen to tell the correct time. You can see it in action in the video, embedded below.

[Danny] went the extra mile in the planning phase. After using a word search puzzle generator tool to assist in designing the layout, he wrote a Processing sketch to simulate the clock’s operation. Visually simulating the clock allowed him to make tweaks to the layout, identify edge cases to address, and gain insight into the whole process. If you’re interested in making your own, there is a GitHub repository for the project.

Word Clocks are a great place to see innovation; you can go small like this micro word clock, you can push the concept for all it’s worth by adding heaps of weather data, or just go the extra mile on presentation like this walnut-finish clock.

Filed under: clock hacks

from Blog – Hackaday http://ift.tt/2mygKh3
via IFTTT

Toy Car Pumps the Wheels with Balloon Power

We’ve had our eye on [Greg Zumwalt]. He’s been working on some very clever 3D-printed mechanisms and his latest prototype is an air engine for a toy car. You can supply the air for the single cylinder with a compressor, or by blowing into it, but attaching an inflated balloon makes the system self-contained.

Last week we saw the prototype of the engine by itself, and wondered if this had enough power to drive a little train engine. We were almost right as here it is powering the front wheels of a little car.

This isn’t [Greg’s] first rodeo. He’s been working on self-contained locomotion for a while now. Shown here is his spring-driven car which you pull backwards to load the spring. It’s a common feature in toys, and very neat to see with the included 3D-printed spring hidden inside of the widest gear.

That print looks spectacular, but the balloon-powered prototype tickles our fancy quite a bit more. Make sure you have your sound on when you watch the video after the break. It’s the chuga-chuga that puts this one over the top. [Greg] hasn’t yet posted files so you can print your own (it’s still a prototype) but browse the rest of his designs as you wait — they’re numerous and will bring an even bigger smile to your face. Remember that domino-laying LEGO bot [Mathias Mandel] built a few years back? [Greg] has a printable model for it!

Filed under: 3d Printer hacks, transportation hacks

from Blog – Hackaday http://ift.tt/2m7hFK4
via IFTTT

Old Batteries Yield Thermite and Manganese

Some people collect stamps, some collect coins, some even collect barbed wire. But the aptly named [Plutonium Bunny] is an element collector, as in one who seeks a sample of as many elements on the periodic table as possible. Whatever, we don’t judge – after all, there are more than a few Hackaday readers who collect lots of silicon, right?

So what’s a collector to do when he gets to the 25th place on the periodic table? Easy – harvest manganese from alkaline batteries with a thermite reaction. There’s a surprising amount of manganese in depleted alkaline batteries, which of course are easy to come by in bulk. The chemistry of [Plutonium Bunny]’s process is pretty straightforward and easy to reproduce with common ingredients, but you’ll want to be careful with a few steps – chlorine gas is not something to trifle with. The basic idea is to solubilize and purify the manganese dioxide from the other materials in the battery cathodes, recrystallize it, and mix it with aluminum powder. The aluminum acts as the fuel, the manganese dioxide is the oxidizer, and once the satisfyingly exothermic reaction shown in the video below is over, the collector-grade elemental manganese can be chipped away from the aluminum oxide slag.

So once you’ve got a few manganese nuggets, what can you do with them? Not much really – it turns out the oxides recovered from the battery are far more useful for things like supercapacitors. But it’s still a neat trick.

Filed under: chemistry hacks

from Blog – Hackaday http://ift.tt/2m6MQoK
via IFTTT