Solar Controller Reverse Engineered In Both Directions

Hackaday Solar Hacks -

[Jared Sanson] has a solar power setup on his beach house, consisting of 6 panels and a 24V battery bank, supplied by Outback Inc. Their chargers and inverters pair over a seemingly proprietary connection with a controller known as the MATE. The MATE has a standard serial output which gives some details about the operation, but [Jared] wasn’t getting the detailed information they could get from the controller’s screen. This meant it was time to reverse engineer the proprietary connection instead, which [Jared] calls MateNET.

The controller interfaces with the chargers over a Cat5 cable. [Jared] initially suspected RS-485, but it turned out to be regular serial at 0-24V logic levels, at 9600 baud, 9n1. To figure out the pinout, [Jared] went through the MATE circuitry with a fine-toothed comb, discovering an ATMEGA32. Since both the MATE’s user output & its connection to the other equipment are both serial, a logic mux is used to split the ATMEGA32’s single UART between the two serial connections. With the physical layer sorted, it was time to figure out how the protocol worked.

The first step was to capture some packets from the running system, with the MATE connected to an MX charge controller. There was some difficulty in that the MateNET system uses the 9th bit to indicate the start of packets – [Jared]’s PC sniffing setup ignored this as a parity bit. By matching the contents of the captured packets with what was displayed on the screen, it was possible to determine fields containing status, battery voltage, and solar panel voltage. The rest of the packet wasn’t easily understood, however, and [Jared] decided to change tack.

Using Python to emulate the MX charge controller, packets were sent to the MATE with varying contents, and the screen monitored for changes. This spoofing approach made the contents of the packets much easier to determine. It was important to note the checksum used in the packets to make sure the MATE considered the data valid. [Jared] went further, trying to spoof other hardware with his Python code. The MATE helped out, indicating when packets from different hardware were shorter than expected, or otherwise malformed, helping them to guess the proper format. This work all got wrapped up into pymate, a Python emulator of a MATE controller.

With the protocol figured out, it was time to wrap the project up. Running pymate on a Carambola2 Linux board, the packets get processed and eventually stored in a PostgresSQL database on a remote server. Combining this with the stunning Grafana open-source graphing library allows [Jared] to view his system’s status with some very pretty graphical aids, by way of a Github fork that allows the library to grok SQL.

It’s a tidy project with a very professional-looking end product and allows [Jared] to easily monitor his solar setup remotely. Power monitoring hacks are very popular – we’ve even seen it done with webcams monitoring power meters with Python.

Filed under: solar hacks

Get Ready for the Great Eclipse of 2017

Hackaday Solar Hacks -

On August 21, 2017, the moon will cast its shadow across most of North America, with a narrow path of totality tracing from Oregon to South Carolina. Tens of millions of people will have a chance to see something that the continental US hasn’t seen in ages — a total eclipse of the sun. Will you be ready?

The last time a total solar eclipse visited a significantly populated section of the US was in March of 1970. I remember it well as a four-year-old standing on the sidewalk in front of my house, all worked up about space already in those heady days of the Apollo program, gazing through smoked glass as the moon blotted out the sun for a few minutes. Just watching it was exhilarating, and being able to see it again and capitalize on a lifetime of geekiness to heighten the experience, and to be able to share it with my wife and kids, is exciting beyond words. But I’ve only got eight months to lay my plans!

Where and When

First, the basics. Totality will cross the Pacific coast at 17:15 UTC just north of Depoe Bay, Oregon. It will proceed across southern Idaho into Wyoming – Grand Teton and Yellowstone visitors will have quite a treat – then Nebraska, a tiny corner of Kansas, Missouri, small slivers of Illinois and Kentucky, across Tennessee and a fraction of North Carolina, finally heading out to sea between Charleston and Myrtle Beach, South Carolina at 18:49 UTC. Need to see how close you are to totality and when you can expect the eclipse to start? NASA has put together a handy interactive Google Map for just that purpose.

 NASA eclipse web siteThe Eclipse of 2015. Source: NASA eclipse web site

Your first task is to decide where you’re going to watch events unfold. Assuming you want to witness totality, quite a few major cities are in or very near the path – Salem, Oregon; Boise, Idaho; Lincoln, Nebraska; Kansas City and St. Louis; and Nashville, Tennessee. Viewing opportunities will abound in and around these cities, so it won’t be much of a chore to step outside at the appointed hour. However, I’ve heard that the sight of the moon’s shadow racing across the land is especially exciting if you can get somewhere elevated. So on the 21st you’ll find me sitting on the top of Menan Butte outside of Rexburg, Idaho, watching the shadow approach across the plains to the west.

It’s worth noting that the path of totality east of the Mississippi is within a reasonable day’s drive of about half the population of the United States. If you need to travel to get to totality, you’ll need to think ahead, because you’re going to be competing with a lot of other eclipse watchers in addition to the usual summer travelers. Destination locations, like national parks and major resort areas, are likely to be booked. In fact, it may be too late already — I can’t find a hotel room in Idaho Falls for that weekend to save my life. Looks like we’ll be camping by the side of the road.

How to Observe  Sky and TelescopeEclipse glasses are a must. Source: Sky and Telescope

Once you decide where to be and make the appropriate sacrifices to the weather deity of your choice for clear skies, what are you going to do? Most people will be content with just watching, but no matter where you go there are likely to be a ton of people and a party atmosphere, so be prepared to be sociable.

For direct viewing before totality, you’ll want to think about eye safety. At more populated viewing sites, vendors will no doubt be doing a brisk business selling eclipse glasses at incredible markups, so you might want to order yours ahead, and maybe have a few extras to share with unprepared watchers. A shade 14 welding helmet filter will also do the trick, as will fully exposed and developed black and white photo film, as long as it’s a silver-based film. Pinhole cameras are a good choice too, but you’ll need at least a meter focal length to project a decent image. If you don’t feel like toting a refrigerator box around, projecting the image from a telescope or binoculars onto a screen is a good way to go too.

And don’t forget to bring a flashlight – it’ll be as dark as night for the few minutes that it takes for the moon’s shadow to pass.

Eclipses Aren’t Just for Watching

Hackers and space geeks might not be content to just watch, of course. Personally, I’ll be tending an array of cameras to capture the event, as I suspect many others will. Many ham radio operators will be trying to use daytime ionospheric skip to work long-distance contacts during the eclipse, and there are some coordinated efforts to conduct experiments during the eclipse. Others with a scientific bent and the right resources might choose to replicate Sir Arthur Eddington’s confirmation of Einstein’s General Relativity during a 1919 solar eclipse; the bright star Regulus in the constellation Leo will be close enough to the sun to allow measurement of the gravitational lensing Einstein predicted. And you might even be able to get funding for public outreach efforts to enhance the viewing experience.

No matter how you choose to spend Eclipse Day 2017, enjoy it. If you do happen to miss it, don’t worry — the US gets treated to another total eclipse in 2024.

And if you happen to find yourself on Menan Butte outside of Rexburg, Idaho, come on over and say hi.

Filed under: Current Events, Featured, news, Original Art, solar hacks

Off-Grid Travel — Setting Up a Solar System

Hackaday Solar Hacks -

When you’re living out of a vehicle, or even just traveling out of one, power quickly becomes a big concern. You need it for lights, to charge your various devices, to run your coffee maker and other appliances, and possibly even to store your food if you’ve got an electric refrigerator. You could do what many RV owners do: rely on campgrounds with electrical hookups plus a couple of car batteries to get you from one campground to the next. But, those campgrounds are pricey and often amount to glorified parking lots. Wouldn’t it be better if you had the freedom to camp anywhere, without having to worry about finding somewhere to plug in?

That’s exactly what we’re going to be covering in this article: off-grid power on the road. There are two major methods for doing this: with a portable gas generator, or with solar. Gas generators have long been the preferred method, as they provide a large amount of power reliably. However, they’re also fairly expensive, cumbersome, noisy, and obviously require that you bring along fuel. Luckily, major advances in solar technology over the past decade have made it very practical to use solar energy as your sole source of electricity on the road.

The Goal

Whenever you’re starting a new project, it’s always important to clearly define your goal. This is never more true than when you’re going to be relying on the outcome for your personal well being. So, first, we’re going to discuss what the average overland traveler wants and needs for power. The most obvious first requirement is lighting.

Luckily, efficient LED lighting is pretty ubiquitous these days. It’ll probably take less than 50 watts to completely light up your vehicle with 12V LED lighting. Most modern televisions will use a similar amount of energy.

Next up, you’re going to want to be able to run at least a few basic appliances. For us here at Hackaday, a coffee maker is at the top of that list. Unfortunately, coffee makers use a lot of power — a Keurig can use up to 1500 watts while heating up. Other appliances use similarly high amounts of power. A microwave will use roughly 1200 watts while running, and a toaster oven uses even more.

Characterizing Your Needs This chart, provided by WAGAN, lists some common appliances and their power consumption (though TV power consumption has been dramatically reduced in recent years)This chart, provided by WAGAN, lists some common appliances and their power consumption (though TV power consumption has been dramatically reduced in recent years)

Then there are the really high energy consumption appliances, such as air conditioners and heaters. Both of these require a lot of power to run, and also need to be run for long periods of time. While it is technically possible to run both from a solar setup, it would require a massive investment in solar panels and batteries for storage. In that case, a generator would be more cost-effective.

So, for the sake of brevity, let’s say you’ve decided to forego the air conditioner (or will only use it when you have access to shore power). The heater, water heater, and refrigerator will all be run off of propane. That leaves you with a setup that will only be consuming ~100 watts most of the time, and occasionally will peak close to 2,000 watts when the appliances are in use. Now let’s talk about what you’ll need to buy to make that happen.

The Equipment

There are four main components that are going to be going into your solar system: a converter, an inverter, batteries, and the solar panels themselves. Virtually all RVs (and vehicles in general) are set up to run 12V DC electricity. This is so they can be run directly from something like a standard car battery. Most of your appliances and other household devices, however, are powered by the 120V AC you generally get from your wall outlets.


This is where the inverter comes into play. It takes 12V DC from your batteries and turns it into 120V AC, so that you can run all of your normal household devices. That said, the process isn’t perfectly efficient, which means you should try to use the 12V system as much as you can (for instance, for the LED lighting). Inverters will also consume some power even when nothing is being run through them, so it’s best to shut them off completely when not in use.

As we covered in the last section, you’ll probably want an inverter capable of 1,500 to 2,000 watts of continuous output. Not all inverter output is the same even though the power ratings may match. Pure Sine Wave inverters are more expensive, but provide power that is much closer to “real” AC power available from an outlet. Some appliances will have problems running off of the less expensive Modified Square Wave inverters (and could possibly even be damaged). If you’re not sure which you’ll need, it’s probably best to spend a little more on a Pure Sine Wave model.


The opposite of an inverter is a converter — it turns 120V AC into 12V DC. These are necessary for charging your batteries from shore power (a mains outlet), and for running your 12V system from shore power. Virtually all RVs will have a converter already built into the electrical system, but you’ll need to purchase one if you don’t already have one and want the option to charge your batteries from an outlet.

Solar Panels

With the solar panels themselves, you’re really only limited by how much space you have available and how much money you have. The more watts you can afford (and fit onto your rig), the better. While some panels are slightly more efficient than others, they’re all pretty close to each other right now. Which means it’s mostly about how many square feet you have available and how much money you’re willing to spend. Most people will need 150 watts at a minimum, with something like 600 watts being ideal.

Earthroamer, a leader in off-grid expedition vehicles, provides a 3,000 watt solar panel array on their XV-LTS model.Earthroamer, a leader in off-grid expedition vehicles, provides a 1,200 watt solar panel array on their XV-LTS model.

How much you’ll actually need is pretty difficult to guess, however. A 150 watt panel, for example, will only actually provide 150 watts under perfect conditions (clear day, sun directly overhead, etc.). In general though, you can probably expect to actually get 1/3 to 1/2 of the rated watts during daylight hours on average. This will obviously vary based on weather conditions, time of year, and how you position the panels. You’ll also need a solar charger to go with the panels, but these are inexpensive and are generally just matched to the wattage of your solar array.


Finally, you’re going to need batteries with which to store all of this power. All of this equipment was designed specifically to run off of standard 12V car batteries, but they aren’t actually the most ideal battery for the application. Car batteries are meant to provide a huge amount of starting amperage (to start your car’s engine), and aren’t meant for the kind of long slow drain you want for a solar setup. There are batteries designed specifically for solar setups, but a solution that’s both ideal and economical is to use golf cart batteries.

Golf cart batteries are mass produced and optimized for deep cycle use.Golf cart batteries are mass produced and optimized for deep cycle use.

Golf cart batteries are good at storing a lot of energy and are generally inexpensive. However, most come in 6V instead of 12V. That means that you’ll need at least two wired in series to get to 12V (multiple pairs can be wired in parallel). You’ll want to choose the number of batteries based on your expected usage. A good rule of thumb is to have enough to run your system for a day or two without recharging, which should be enough to carry you through situations where your solar panels aren’t outputting much power (in bad weather, for instance).

The Setup

There are three ways to charge the batteries on this system:

  1. With the solar panels, which will always be happening passively when there is enough sunlight to generate some current.
  2. From your vehicle’s alternator, which you only want happening when the vehicle is actually running (to avoid draining your car battery).
  3. With shore power, which is ideal for quickly charging the batteries when you’ve got access to mains electricity.

Charging your batteries with the solar panels will happen completely in the background. Your solar charger should always been connected to the batteries, that way you’ll be gathering and storing energy anytime there is sunlight. If your batteries are already full, the solar charger will simply keep them topped off with a trickle.

Taking advantage of your car’s alternator to charge the batteries is similarly simple. If your vehicle is wired to pull a trailer, then you’ve already got what you need. Just connect a plug with 12V and ground wired up, and have those wires run into your battery bank. Whenever the vehicle is running, some power from the alternator will be used to charge your batteries. For most vehicles, this won’t be a huge amount of power, but it’s good to take advantage of everything you have available.


Using shore power gets a little more complicated, because it’s easy to create a loop that will run your charge/discharge system constantly. The converter will take mains electricity (120V AC “shore” power), and convert it into 12V DC to charge the batteries and run your 12V electronics. However, if your inverter is connected, it’s going to attempt to turn that right back into 120V AC. Furthermore, if the inverter output isn’t isolated from your shore power circuit, you’re going to create a loop where the inverter then feeds the converter, and the converter feeds the inverter. This is a never-ending loop that will, at best, drain your batteries, and at worst could damage your equipment.

This means that your entire system essentially needs to have two “modes” — one for when you’re connected to shore power, and one for when you’re not. When you’re connected to shore power, that should feed directly into your vehicle’s 120V system (to power your appliances) and into the converter to charge your batteries and run the 12V system. When you’re disconnected from shore power, the inverter should be reintroduced (and the converter disconnected), and your 120V system should be run from that.

You can handle that kind of circuit setup in one of three ways: manually (physically unplugging the inverter when you plug into shore power), with a switch, or with a relay. Manually is, obviously, the cheapest and simplest, but you carry the risk of forgetting to do it. And, depending on where your equipment is stored, it might be difficult to physically get to. A switch is a good option for solving the latter problem, but you still have to remember to flip it when you connect or disconnect from shore power. A relay solves both problems, and requires no effort on your part, but you’ll need the electrical know-how to wire it up (which shouldn’t be a problem for Hackaday readers).

 Living In My Car]A complete mobile system overview [Image Source: Living In My Car]No matter which option you choose, what’s important is that the inverter and converter should never be running at the same time. When you’re connected to shore power, the inverter should be disconnected and the converter connected, and your 120V circuit should be connected directly to shore power. When you’re disconnected from shore power, the inverter should be connected and the converter disconnected, and your 120V circuit should be connected to the inverter’s output.

On the subject of output, we’ve already mentioned that you’re going to have two primary circuits: a 12V circuit and a 120V circuit. The 12V circuit will be connected directly to the batteries, and will feed anything that runs on 12V (LED lights, water pumps, heater igniters, etc). This circuit can use inexpensive fuse blocks designed for cars or RVs. Keep in mind that wire gauge is important here, especially if you’re going to be running a lot on the 12V circuit, so choose your wire size appropriately for the amperage and wire length.

The 120V circuit will be connected to the inverter’s output (and switched to mains when you’re on shore power). This will power any of your household type devices. The inverter itself will have it’s own fuses, but keep in mind that those won’t be part of the circuit when you’re on shore power. So, it’s prudent to fuse the entire circuit after the point where it switches to mains electricity.

The Execution

As described, this system is designed to be as passive as possible. If everything is set up properly, you shouldn’t have to do anything other than use your appliances and devices like you would expect. That’s especially true if you used a relay for switching to shore power. In that case, the only thing you have to do is plug your rig into a mains outlet if it’s available. Everything else should be humming along happily in the background.

That said, there are a few things you should pay attention to and check from time to time. The first seems obvious, but just be conscious of your energy usage. For example, there is no sense in brewing an entire pot of coffee if you’re only going to drink one cup. You should learn very quickly what uses a lot of power, and what you want to prioritize.

Next is basic maintenance. This kind of system actually requires very little maintenance, but it’s a good idea to occasionally monitor your batteries to make sure they’re healthy. Basically, just take a look and see if they seem to be charging and discharging consistently and predictably. You should also take the time to clean your solar panels every now and then, to make sure you’re getting as much power as you can out of them.

Finally, periodically check your wiring to make sure it’s all secure. We’re going to assume you, as a Hackaday reader, know how to properly set up wiring, but when it’s being jostled on the road it’s possible for things to come lose. The last thing you want is a fire caused by a short somewhere.

Other than that, the most important thing you can do is enjoy the freedom of off-grid travel! We’ve even covered how to build your own travel trailer if you’re itching to get on the road. Have any tips of your own, or cool stories about your travels? Be sure to share them in the comments below!

Filed under: car hacks, solar hacks
Subscribe to aggregator - Solar