Friday, December 9, 2016

Arduino: Micro Processing Renewable Energy - Part 1 continued - Reading Voltages


As discussed previously, the Arduino has a 10-bit resolution on its analog read capabilities. That means it can read a voltage between 0 and 5 volts and report a value between 0 and 1,023. If it read with 8-bit resolution, it would generate a value between 0 and 255. If we divide the maximum voltage of 5 volts by the highest resolution value (5/1,023 and 5/255) we get 0.00488 and 0.01960. That number represents the milivolts (mV) for each step in the range. For example, if we have a 8-bit input and we read a value of 134, then that represents 2.6264 volts (134 x 0.01960).

This looks like plenty of resolution. It is obvious from the above examples that 10-bit has 4 times the resolution as 8-bit, but how do you tell if you have enough resolution? Well, it depends on your application. If you are trying to detect if voltage is present, then 1-bit would be enough. That bit could be a 0 or a 1, ON or OFF. But, what if you needed something more precise?

For example, you are trying to charge LiFePo4 batteries and you want to stop charging at exactly 3.65 volts. You definitely want to tell the difference between 3.64 and 3.66 volts to do that. In other words, you need 1/100th of a volt resolution, or 10 mV resolution. If we are using an 8-bit analog input, then the first step after zero volts would be 0.0196 volts, or 19.6 mV. And since 19.6 mV is larger than our minimum requirement of 10 mV, then 8-bits just won't work. But, 0.00488 volts or 4.88 mV would work just fine.

Voltage Range

So, using a 10-bit analog input will give us a resolution of 4.88 mV when we are reading 0 to 5 volts. But, what if we want to read up to 15 volts? If we take 15 volts and divide by 1,023 steps, we get 14.6 mV which is larger than our previous requirement of 10 mV. The problem gets worse with higher ranges. If we tried to read 0 to 60 volts, we would get a final resolution of 58 mV.

There are some tricks you could use to fix your range so it is more tight. For example, when we measure a 12 V battery, we expect a range of about 10 to 15 volts. That is a 5 volt range, it just happens to start 10 volts too high. Alas, there is a way to fix that!

We can just add a 10 volt zener diode to the circuit. It will drop about 10 volts off of the input, resulting in 0 to 5 volts going to the Arduino.

You could also make a circuit like below to read up to a 48 volt battery bank, which could be upwards of 60 volts. In that case, the 40 to 60 volts would be sent through a pot that would be adjusted until 40 volts in would equal 10 volts out. The zener diode would knock off that 10 volts. But, what would the high end of that range be? Since the pot was adjusted to make 40 volts into 10 volts, there is a 4 times reduction in the pot being used as a voltage divider. That means 60 volts is translated to 15 volts. This works perfectly as an input to the 10 volt zener and will give us 0 to 5 volts as the circuits final output.

You also might want a more modular circuit that can take an input from different battery bank sizes. This circuit is meant to measure one battery bank at a time. If you want to measure more than one at a time, duplicate this circuit and apply it to several different Arduino input pins.

Be aware that R4 is only useful when your zener is reverse biased at something less than 10 volts. A typical zener is rated at 5%. That means a 10 volt zener could start passing reverse current at anywhere from 9.5 to 10.5 volts. But, whatever voltage that zener starts at, it will be consistent at a given temperature. For example, if your zener conducts at 9.7 volts, it will always start conducting reverse current at 9.7 volts. So, you could go through a batch and test zeners until you get ones that are the closest to what you want. In this circuit, you should go slightly under 10 volts instead of over. If you have a true 10 volts coming in to R4 and your zener doesn't start conducting until 10.3 volts, no amount of playing with R4 will make up that 0.3 volts.

Some of you are wondering why I chose the 1k resistor (R1) before the zener diode.  Well, I'm assuming a worse case connection is 60 volts into the 12 volt input that has been calibrated for a 12 volt battery. I'll get 50 volts coming out of D4 zener and D2 will redirect 45 volts to ground. And, 45 volts divided by 1000 ohms is 0.045 or 45 mA. The power would be current times volts, or 0.045 amps x 45 volts = 2.025 watts. I'm using a 4 watt zener and I like to limit the power to about half. If you were using a 1 watt, then you would want at least a 4k resistor for R1.

Then Take A Look At This!

Wednesday, June 22, 2016

Solar Tracker

Making a solar tracker for a solar cooker or solar panels is easier than you may think. You could design one that uses a micro-controller or complex circuit. But, it can also be done with JUST small solar panels and a DC motor.

The concept is simple. You have two or four small identical panels that are each powerful enough to spin a small DC motor. There is a divider between the panels that cast a shadow when the unit is not pointing directly at the sun. The panel that doesn't have a shadow cast on it produces all the power and turns the motor. As the shadow starts to minimize, the other side's panel starts applying reverse current to the motor and slowing it down.

You could have more than one panel each side, as shown below.

Something to remember is that the motor will have to be geared down so the output is lower. Or you can find a geared motor, such as a windshield wiper motor. You could also use a smaller motor and just use a string wrapped several times around the spindle or capstan of the motor. The rest of the string would wrap around a wooden pulley or disk from both sides. And, of course, the string would be stretched taut.

Monday, June 20, 2016

Make your own powerful and simple alcohol stove

I uploaded a couple of videos testing this stove and some people have asked for instructions on making this. It is very quick and easy to make. Have fun!


Wednesday, June 15, 2016

Weird way to furl a windmill

I was watching a video on youtube where supergokue1 was running a double windturbine on one mast and connecting the motors in series to get more voltage. The test didn't produce as much voltage as he had hoped, but I had an interesting idea about furling this windmill under higher wind conditions.

SuperGokue1 on

The idea involves a physics concept called gyroscopic precession. This is a phenomenon occurring in rotating bodies in which an applied force is manifested 90 degrees later in the direction of rotation from where the force was applied. We use the right hand rule to determine the torque direction or spin vector.

Applying the right hand rule to the double windmill, based on direction of blade rotation, means that the spin vector is a force acting outward towards the wind. Each blade set is doing that so both forces are balanced. But, what if you design one of the blades so it spun in the opposite direction? And, then, you make the tail smaller? 

The result would be that higher winds will cause the windmill to yaw out of the wind slightly. This will slow the blades down, then gyroscopic procession will decrease as the blades start to spin back into the wind and the process repeats...until a sweet spot is found. This should work nicely for small fast spinning wind turbines. This should protect them in higher winds. Just imagine 40 mph winds while the wind turbine is furled sideways at a 45 degree angle and still producing safe power.

Sunday, June 12, 2016

Survival Lilly Survives Canada

Survival Lilly came to Canada....and survived. She spent about a week in the bush, practicing her bushcraft and survivalist skills. The helicopter picked her yesterday, and yes, she was in one piece. Unfortunately, we have to wait a few days to see her video updates. I can't wait to see those.

We gave her a ride to the BC-Ferries terminal today. I have a nice Survival Lilly patch to show off now. But, don't worry, she left with a Canadian flag patch of her own. Now, she is off to her next secret survival spot to live the adventure. Rock on Lilly!