User Tools

Site Tools


tutorials:make:solarlogger:index.html

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tutorials:make:solarlogger:index.html [2012/04/16 17:06]
daigo [Introduction]
tutorials:make:solarlogger:index.html [2016/01/28 18:05] (current)
Line 1: Line 1:
-   +This tutorial ​has moved to [[http://learn.adafruit.com/​portable-solar-charging-tracker|http://learn.adafruit.com/​portable-solar-charging-tracker]]
-==== Introduction ​ ==== +
- +
-<class center>​ +
-{{vimeo>​13936259}} +
-</​class>​ +
- +
- +
-This is actually not any sort of product or public project (!) - its something I designed to help me evaluate solar panels and how they act when charging batteries. [[http://​voltaicsystems.com/​diy/​measuring-power-flow-with-two-multi-meters/​|Normally this requires a lot of multimeters]] and its a bit of a pain to do if you have to constantly change out panels. So I decided I would build a specialized tool that would assist me. Here is what I wanted! +
- +
- +
-  *Portable! Its hard to test solar panels inside +
-  *Ability to log to an SD card for long-term data analysis (to be added later) +
-  *Keep track of the solar panel voltage +
-  *Keep track of the battery voltage +
-  *Keep track of how much current is going thru the panel to the charger \\  +
- +
-I figured if I had to build this, someone might find my notes useful. However, this documentation is primarly intended to demonstrate [[http://​www.adafruit.com/​index.php?​main_page=product_info&​cPath=17&​products_id=271|how to use the enclosure we carry in the adafruit shop.]] +
- +
-[[http://​www.ladyada.net/​images/​solarlogger/​assembled.jpg|{{ ​ http://​www.ladyada.net/​images/​solarlogger/​assembled_t.jpg?​nolink&​500x385 ​ |}}]] +
- +
- +
- +
-This design is intended for ~6V panels, single Lithium Polymer cells and chargers. It can very easily be adapted to any kind of panel and charger, you'll just need to adjust the resistor dividers and such! +
- +
-[[http://​www.ladyada.net/​images/​solarlogger/​sensorend.jpg|{{ ​ http://​www.ladyada.net/​images/​solarlogger/​sensorend_t.jpg?​nolink&​500x284 ​ |}}]] +
- +
-Please note, this project **isnt** a solar-powered datalogger. You do need to power it with batteries, its only meant for analysis of panels! +
-==== Parts necessary ​ ==== +
-The Arduino, case and display: +
-  *[[http://​www.adafruit.com/​index.php?​main_page=product_info&​cPath=17&​products_id=50|Arduino Duemilanove]] +
-  *[[http://​www.adafruit.com/​index.php?​main_page=product_info&​cPath=17&​products_id=271|Enclosure for Arduino]] +
-  *[[http://​www.adafruit.com/​index.php?​main_page=product_info&​cPath=37&​products_id=181|16x2 LCD]] +
-  *[[http://​www.adafruit.com/​index.php?​main_page=product_info&​cPath=37&​products_id=181|0.1"​ header and potentiometer to go with the LCD, if you buy from the Adafruit shop they'​re included]] +
-  *[[http://​www.adafruit.com/​index.php?​main_page=product_info&​cPath=17_21&​products_id=243|Datalogging shield]] or [[http://​www.adafruit.com/​index.php?​main_page=product_info&​cPath=17_21&​products_id=51|prototyping shield]] (we don't actually do any datalogging in this tutorial, so if you just want to view and not track, a protoshield will work just fine.) +
-  *[[http://www.adafruit.com/​index.php?​main_page=product_info&​cPath=33&​products_id=266|Premium female jumper wires]] (You can also just use plain wire, but we wanted to be able to detach the LCD with ease) +
- +
-The analog electronics! +
- +
- +
-  *[[http://​www.ladyada.net/​wiki/​partselector/​resistors#​w_5_carbon|3 x 10K resistors]] +
-  *1 x 4.7K resistor +
-  *[[http://​www.ladyada.net/​wiki/​partselector/​resistors#​w_5_carbon|1 x 15K resistors]] +
-  *[[http://​www.ladyada.net/​wiki/​partselector/​resistors#​w_5_carbon|1 x 1.0K resistor]] +
-  *[[http://​www.ladyada.net/​wiki/​partselector/​terminals?​s[]=3.5mm|3 x 3.5mm terminal blocks]] +
-  *[[http://​search.digikey.com/​scripts/​DkSearch/​dksus.dll?​Detail&​name=605HR100E-ND|0.1 ohm (current sense) resistor]] +
-  *[[http://​www.ladyada.net/​wiki/​partselector/​ic?​s[]=ts922#​op_amps|8-pin DIP dual rail-to-rail input/​output opamp (TS922 works well)]] +
-  *[[http://​www.ladyada.net/​wiki/​partselector/​sockets|8-pin DIP socket for opamp]] +
-  *[[http://www.ladyada.net/​wiki/​partselector/​connectors#​audiovideo|3 x mono 3.5mm phono jacks]] +
-  *[[http://​www.ladyada.net/​wiki/​partselector/​connectors#​audiovideo|3 x mono 3.5mm phono plugs]] +
- +
-Then of course, the stuff to log. You can subsitute other types of batteries & chargers +
- +
- +
-  *[[http://​www.adafruit.com/​index.php?​main_page=product_info&​cPath=44&​products_id=262|6V 1W solar panel]] +
-  *[[http://​www.adafruit.com/​index.php?​main_page=product_info&​cPath=44&​products_id=259|Lipoly charger]] +
-  *[[http://​www.adafruit.com/​index.php?​main_page=product_info&​cPath=44&​products_id=258|Lithium poly battery]] +
- +
-If you want to take it outside you'll need a portable ​power source, we like AA's but you can also use a 9V if you're not going to be out long +
- +
- +
-  *[[http://​www.adafruit.com/​index.php?​main_page=product_info&​cPath=44&​products_id=248|6 x AA battery holder]] +
-  *[[http://​www.adafruit.com/​index.php?​main_page=product_info&​cPath=44&​products_id=67|9V holder with switch]] +
-  *[[http://​www.adafruit.com/​index.php?​main_page=product_info&​cPath=44&​products_id=80|9V battery clip]]  +
-==== Analog stuff  ==== +
- +
- +
-There'​s a little bit of analog stuff going on. The two easiest parts to understand parts is the voltage dividers made of **R1**& **R2** and **R3** & **R4**. **R1**&​**R2** take the 6V solar panel voltage and divide it by two (just make R1 = R2) so that the input to the analog converter is under 3.3V. Likewise, **R3** & **R4 **take the as-high-as 4.2V lipoly voltage and divide it by 3/5 to get it down to under 3.3V so we can track that voltage. +
- +
- +
- +
-The more complex part is the op amp that is used to measure the current draw. We stick a 0.1 ohm resistor between the negative wire of the solar panel and ground, so that we can measure the current going though the panel by measuring across the resistor. 1 Amp of current gets turned into 100mV (our panel can't do much more than 300mA which would be 30mV) This is low enough that doesn'​t affect the solar panel'​s charging ability. However, 30mV is really low and thats the maximum we expect from the panel. We use a //​non-inverting//​ amplifer that amplifies that voltage to a bigger and easier to manage voltage. In particular. This amp multiplies the voltage by **1 + R6**/**R7** = 48x! That turns our 30mV max signal into 1.5V. The reason we don't amplify more is that I want to be able to use bigger panels that can provide 500mA or more, so a little headroom will be handy +
- +
- +
- +
-In general, I used resistors I had lying around on my desk (except the 0.1 ohm, that value is important) so feel free to adjust the values +
- +
-{{  http://​www.ladyada.net/​images/​solarlogger/​schem.png?​nolink&​644x646 ​ |}} +
- +
- +
- +
-Now to the soldering iron! This is actually the most annoying part. If you don't need datalogging - just the LCD feedback, you'll be happier if you solder this onto a protoshield as theres way more space. Click on the pictures for zoomed in shots. To solder, we bend over the wires and carefully solder together before clipping. Its sometimes a bit tough to follow so go slow and check your work at each step. +
- +
- +
- +
-Note that we tie **ARef** to 3.3v for more stable analog readings - especially when using battery-powered portable loggers! +
- +
-[[http://​www.ladyada.net/​images/​solarlogger/​analog.jpg|{{ ​ http://​www.ladyada.net/​images/​solarlogger/​analog_t.jpg?​nolink&​500x354 ​ |}}]] +
- +
-[[http://​www.ladyada.net/​images/​solarlogger/​analogbottom.jpg|{{ ​ http://​www.ladyada.net/​images/​solarlogger/​analogbottom_t.jpg?​nolink&​500x356 ​ |}}]] +
- +
-[[http://​www.ladyada.net/​images/​solarlogger/​analog2.jpg|{{ ​ http://​www.ladyada.net/​images/​solarlogger/​analog2_t.jpg?​nolink&​500x418 ​ |}}]] +
- +
- +
-==== Casing ​ ==== +
-I'll start by prepping the case. For the botom, snap in the pieces to cover the two holes +
- +
-[[http://​www.ladyada.net/​images/​solarlogger/​casebottom.jpg|{{ ​ http://​www.ladyada.net/​images/​solarlogger/​casebottom_t.jpg?​nolink&​500x385 ​ |}}]] +
- +
- +
- +
-Place the Arduino so it lines up with the mounting holes +
- +
-[[http://​www.ladyada.net/​images/​solarlogger/​arduninoplace.jpg|{{ ​ http://​www.ladyada.net/​images/​solarlogger/​arduninoplace_t.jpg?​nolink&​500x385 ​ |}}]] +
- +
-Attach! Use two screws, the third wont fit because the Arduino drill is too small +
- +
-[[http://​www.ladyada.net/​images/​solarlogger/​arduinoscrew.jpg|{{ ​ http://​www.ladyada.net/​images/​solarlogger/​arduinoscrew_t.jpg?​nolink&​500x385 ​ |}}]] +
- +
- +
-==== LCD  ==== +
-Get the LCD out of the packaging. You'll need some sort of 10K potentiometer. We will use some header and premium socket jumpers but you can skip that part and just solder direct wires. +
- +
-[[http://​www.ladyada.net/​images/​solarlogger/​lcdprep.jpg|{{ ​ http://​www.ladyada.net/​images/​solarlogger/​lcdprep_t.jpg?​nolink&​500x385 ​ |}}]] +
- +
-Solder the header in, then we clip the unused data pins to avoid confusion +
- +
-[[http://​www.ladyada.net/​images/​solarlogger/​lcdheader.jpg|{{ ​ http://​www.ladyada.net/​images/​solarlogger/​lcdheader_t.jpg?​nolink&​500x283 ​ |}}]] +
- +
-[[http://​www.ladyada.net/​images/​solarlogger/​lcdbot.jpg|{{ ​ http://​www.ladyada.net/​images/​solarlogger/​lcdbot_t.jpg?​nolink&​500x261 ​ |}}]] +
- +
- +
- +
-Connect the LED backlight lines to the LCD logic power lines +
- +
-[[http://​www.ladyada.net/​images/​solarlogger/​lcdpwr.jpg|{{ ​ http://​www.ladyada.net/​images/​solarlogger/​lcdpwr_t.jpg?​nolink&​500x247 ​ |}}]] +
- +
- +
- +
-Ground the RW pin (its not used +
- +
-[[http://​www.ladyada.net/​images/​solarlogger/​rwjumper.jpg|{{ ​ http://​www.ladyada.net/​images/​solarlogger/​rwjumper_t.jpg?​nolink&​500x293 ​ |}}]] +
- +
- +
- +
-And get rid of that pin as well as pins #1 and #2 (they are close to the mounting post so we'll connect to pins #15 and #16 instead +
- +
-[[http://​www.ladyada.net/​images/​solarlogger/​headertrim.jpg|{{ ​ http://​www.ladyada.net/​images/​solarlogger/​headertrim_t.jpg?​nolink&​500x214 ​ |}}]] +
- +
- +
- +
-Connect the 10K pot to 5V, pin 3 and ground +
- +
-[[http://​www.ladyada.net/​images/​solarlogger/​pot.jpg|{{ ​ http://​www.ladyada.net/​images/​solarlogger/​pot_t.jpg?​nolink&​500x322 ​ |}}]] +
- +
-And clip pin 3 +
- +
- +
- +
-  +
- +
-[[http://​www.ladyada.net/​images/​solarlogger/​potheader.jpg|{{ ​ http://​www.ladyada.net/​images/​solarlogger/​potheader_t.jpg?​nolink&​500x238 ​ |}}]] +
- +
- +
- +
-Now we have the used 8 pins, from left to right: ground, power, D7 thru D3, RS and EN. Connect sockets +
- +
-[[http://​www.ladyada.net/​images/​solarlogger/​sockets.jpg|{{ ​ http://​www.ladyada.net/​images/​solarlogger/​sockets_t.jpg?​nolink&​500x301 ​ |}}]] +
- +
- +
- +
-And clip the other end +
- +
-[[http://​www.ladyada.net/​images/​solarlogger/​cables.jpg|{{ ​ http://​www.ladyada.net/​images/​solarlogger/​cables_t.jpg?​nolink&​500x384 ​ |}}]] +
- +
- +
-==== LCD connect and test  ==== +
- +
- +
-Start with connecting up power, red goes to +5V and black goes to ground. [[http://​www.ladyada.net//​../​learn/​lcd/​charlcd.html|Perform the tests in the LCD tutorial to verify the contrast pot works]] +
- +
-[[http://​www.ladyada.net/​images/​solarlogger/​lcdpower.jpg|{{ ​ http://​www.ladyada.net/​images/​solarlogger/​lcdpower_t.jpg?​nolink&​500x333 ​ |}}]] +
- +
- +
- +
-Connect the remaining wires as such:  +
- +
- +
-  *EN -> Digital #2 +
-  *RS -> Digital #3 +
-  *D4 -> Digital #4 +
-  *D5 -> Digital #5 +
-  *D6 -> Digital #6 +
-  *D7 -> Digital #​7[[http://​www.ladyada.net/​images/​solarlogger/​lcdwired2.jpg|{{ ​ http://​www.ladyada.net/​images/​solarlogger/​lcdwired2_t.jpg?​nolink&​500x333 ​ |}}]] +
- +
- +
- +
-[[http://​github.com/​adafruit/​Solar-charging-tracker|Then try out the LCD by uploading the sketch ]]You should get the LCD working even if its not displaying anything. +
- +
-{{  http://​www.ladyada.net/​images/​solarlogger/​lcd1_t.jpg?​nolink&​500x128 ​ |}} +
- +
-{{  http://​www.ladyada.net/​images/​solarlogger/​lcd2_t.jpg?​nolink&​500x135 ​ |}} +
- +
- +
-==== Mechanical ​ ==== +
- +
- +
-Now to connect the external panel and batteries and such. The terminal blocks are OK but not very elegant. Instead, I will use pluggable connectors. [[http://​www.ladyada.net/​wiki/​partselector/​connectors#​audiovideo|Audio connectors will work well here and I only need 2 pins (ground and signal) per connection so mono 3.5mm headphone plugs and jacks are an inexpensive an easy-to-get solution.]] Be sure to get panel-mount jacks! +
- +
-[[http://​www.ladyada.net/​images/​solarlogger/​connectors.jpg|{{ ​ http://​www.ladyada.net/​images/​solarlogger/​connectors_t.jpg?​nolink&​500x364 ​ |}}]] +
- +
- +
- +
-Start with the JST cable that goes to the charger output (to measure the lipo. Unscrew the plug, slip thru the wire, Then solder each pin to crimpies. As a rule, you should always make '​sleeve'​ or '​ring'​ ground and '​tip'​ positive signal. Keeps things easy to track! +
- +
-[[http://​www.ladyada.net/​images/​solarlogger/​jstphono.jpg|{{ ​ http://​www.ladyada.net/​images/​solarlogger/​jstphono_t.jpg?​nolink&​500x414 ​ |}}]] +
- +
- +
- +
-Crimp, making sure not to short the wires. This can be a bit challenging so use a multimeter to test! +
- +
-[[http://​www.ladyada.net/​images/​solarlogger/​jstphono2.jpg|{{ ​ http://​www.ladyada.net/​images/​solarlogger/​jstphono2_t.jpg?​nolink&​500x269 ​ |}}]] +
- +
- +
- +
-[[http://​www.ladyada.net//​solarlipo/​index.html|Next,​ the miniB usb cable is stripped and the red and black wires pulled out]]. We also use some heatshrink to protect the end of the cable +
- +
-[[http://​www.ladyada.net/​images/​solarlogger/​usbphono.jpg|{{ ​ http://​www.ladyada.net/​images/​solarlogger/​usbphono_t.jpg?​nolink&​500x356 ​ |}}]] +
- +
- +
- +
-Crimp +
- +
-[[http://​www.ladyada.net/​images/​solarlogger/​usbcrimp.jpg|{{ ​ http://​www.ladyada.net/​images/​solarlogger/​usbcrimp_t.jpg?​nolink&​500x342 ​ |}}]] +
- +
- +
- +
-Heatshrink! +
- +
-[[http://​www.ladyada.net/​images/​solarlogger/​usbshrink.jpg|{{ ​ http://​www.ladyada.net/​images/​solarlogger/​usbshrink_t.jpg?​nolink&​500x241 ​ |}}]] +
- +
-Next, the jacks. Connect any stranded wire to the sleeve and tip connections as shown +
- +
-[[http://​www.ladyada.net/​images/​solarlogger/​phonosolder.jpg|{{ ​ http://​www.ladyada.net/​images/​solarlogger/​phonosolder_t.jpg?​nolink&​500x342 ​ |}}]] +
- +
- +
- +
-We like heatshrink! +
- +
-[[http://​www.ladyada.net/​images/​solarlogger/​phonoshrink.jpg|{{ ​ http://​www.ladyada.net/​images/​solarlogger/​phonoshrink_t.jpg?​nolink&​500x326 ​ |}}]] +
- +
- +
- +
-Connect the jacks to the terminal blocks +
- +
-[[http://​www.ladyada.net/​images/​solarlogger/​phonowired.jpg|{{ ​ http://​www.ladyada.net/​images/​solarlogger/​phonowired_t.jpg?​nolink&​500x385 ​ |}}]] +
- +
-Now is a good time to test, before finishing it all up! Verify you're getting reasonable voltages from the panel and lipoly battery. If you can get near a window, see if you can get the battery charging +
- +
-[[http://​www.ladyada.net/​images/​solarlogger/​test.jpg|{{ ​ http://​www.ladyada.net/​images/​solarlogger/​test_t.jpg?​nolink&​500x333 ​ |}}]] +
- +
- +
- +
-  +
- +
- +
-==== Finishing ​ ==== +
-Of course, we want the panel mount jacks to be panel mounted. Grab the box end piece. Its made of ABS... +
- +
-[[http://​www.ladyada.net/​images/​solarlogger/​boxend.jpg|{{ ​ http://​www.ladyada.net/​images/​solarlogger/​boxend_t.jpg?​nolink&​500x216 ​ |}}]] +
- +
-Which means they'​re very easy to drill or machine! +
- +
-[[http://​www.ladyada.net/​images/​solarlogger/​boxdrill.jpg|{{ ​ http://​www.ladyada.net/​images/​solarlogger/​boxdrill_t.jpg?​nolink&​500x385 ​ |}}]] +
- +
-[[http://​www.ladyada.net/​images/​solarlogger/​phonos.jpg|{{ ​ http://​www.ladyada.net/​images/​solarlogger/​phonos_t.jpg?​nolink&​500x385 ​ |}}]] +
- +
-We have a label maker so we made nice little labels! +
- +
-[[http://​www.ladyada.net/​images/​solarlogger/​sensorend.jpg|{{ ​ http://​www.ladyada.net/​images/​solarlogger/​sensorend_t.jpg?​nolink&​500x284 ​ |}}]] +
- +
-The other side gets the precut case that covers the Arduino power and programming slot. +
- +
-[[http://​www.ladyada.net/​images/​solarlogger/​arduinoend.jpg|{{ ​ http://​www.ladyada.net/​images/​solarlogger/​arduinoend_t.jpg?​nolink&​500x276 ​ |}}]] +
- +
-Ready to go! Here I show how I can try different panels by connecing alligator chips. The lipo input is from the passthrough connection on the charger. As the panel charges the battery I can track the voltages and current +
- +
-[[http://​www.ladyada.net/​images/​solarlogger/​assembled.jpg|{{ ​ http://​www.ladyada.net/​images/​solarlogger/​assembled_t.jpg?​nolink&​500x385 ​ |}}]] +
/home/ladyada/public_html/wiki/data/attic/tutorials/make/solarlogger/index.html.1334596009.txt.gz · Last modified: 2016/01/28 18:05 (external edit)