Friday, July 9, 2021

Making A Solar-Cell Tester


The Solar Cell Tester

Now to a quick real example that will make use of all of the above. I recently decided to characterize a bunch of small solar panels that I had in my junk drawer. This means adjusting the load on the panel and noting down the voltage generated by the panel and the current through the load. I hooked up two multimeters and wrote down some numbers, but this is obviously a job for a microcontroller.


As is clear from the image, this is a quick lash up. The larger chunk of copper-clad has a current-measurement resistor and a pair of resistors configured as a voltage divider to step down the panel voltage to something the 3.3 V ADC can handle.

Dangling off that is the (silvered) variable load circuit, which is entirely sub-optimal: a MOSFET dissipates the heat by being turned half on by a PWM’ed voltage fiiltered by that 100 uF capacitor. The 9 V battery and optoisolator were cobbled on to ensure a high enough voltage to fully open the MOSFET, which wanted more than 3.3 V. This horrible, but functional, load circuit was a later addition — the first version just had a potentiometer here, until that got smoked by running too much current through it.

The pushbuttons are used to start and stop recordings from the device out on the balcony without having to run back inside. The procedure was to alligator-clip in a new panel, and hold the white button while it made recordings. The small black button is pressed once to demarcate a new cell’s data. The data goes back to my laptop over UART serial through an ESP8266 running esp-link as a transparent WiFi serial bridge, seen in the upper left, right next to the recycled laptop batteries. Hot glue and cardboard round out the high-tech build.

To the Datasheet!

This kind of quick and hands-on tool-building is where Forth shines. The Jeelabs Forth libraries already have some functions that simplify the ADC setup, but they actually didn’t work for me, so I turned to the datasheet. The bare minimum that one needs to get the ADC working is to turn on the ADC peripheral clocks, enable the ADC unit, and then select the ADC sampling time. We might also want to run the ADC calibration procedure to make sure our readings are correct. This is all the sort of low-level detail that you’d have to do with any microcontroller — or lean on a library that does it for you.

Previous Post
Next Post

Hello, I'm Abdulkafiy Abdulkabir Ishola...............................nothing much to know more about me in details......?

0 comments: