Sunday, November 25, 2018

PROJECT: Solar LED Heart Ornament

LINK TO PROJECT PACK

TL;DR: Made a cool ornament for wife, scroll down to bottom for some cool pictures & videos ;^)

Another year another lot of important dates that warrant a gift for the wife. This year I decided to try and use the SPV1040 to charge a supercapacitor during the day, and have the super capacitor drive a "breathing" LED circuit during the night. Why use a supercapacitor? Well the idea is that I want this thing to work for a long time, like in our retirement age long time. So with all that waffle out of the way here is how I went about it:


Solar-cell, IXYS KXOB22-04X3F

NOTE: IXYS KXOB22-04X3F has been superseded by KXOB25-04X3F, the Gen 2 solar-cell offers a higher power output (22mW vs 20mW) as well a a higher efficiency (25% vs 22%). Sadly sourcing the new part is difficult, hence why I decided to stick with the KXOB22-04X3F. Also here is a good table of other IXYS solar-cells.

Though I have a big variety of solar-cells (some of which I even made myself, see picture below) this time I wanted to use something that came from a legitimate manufacturer. My aim was to find a solar-cell that had a small form factor while at the same time offering a high power output and a long life expectancy (factors that tend to go against each other).
In the end I decided to go with the IXYS KXOB22-04X3F as this little solar-cell packed quite the punch and even came with an extensive datasheet. Plus this is a monocrystalline solar-cell and these are well known for their high efficiency and long life spans.


Solar DCDC, ST SPV1040

NOTE: If you have a closer look at the SPV1040 datasheet you will find that the lowest power solar-cell they used is 250mW, while the solar-cell I chose had a peak power of 20mW. I suspect this caused the DCDC converter not operate at it's full potential (see further graphs), so if you plan to use this IC make sure to choose a beefy solar-cell to go with it.

This section acts as an intermediate step between the solar-cell and the supercapacitor:
If you are not aware it's not the best idea to charge a supercapacitor directly with a solar-cell, to give a few reasons why:

  1. The circuit will be inefficient as most of the time the solar-cell will not be operating at peak power, translating to longer charge times.
  2. There is no voltage or current control, and if your solar-cell is powerful enough it is likely to shorten the life of the supercapacitor.
  3. The supercapacitor will only charge to the open-circuit voltage (Voc) of the solar-cell, in most cases this is not enough. 

Hence you introduce an intermediate power conversion step, which in this (and most other) cases is a solar DCDC converter. The converter I went with (SPV1040) is quite a nifty beast. It's most powerful feature is the ability to track the maximum power point of the solar-cell (mppt) and adjust it's input impedance accordingly. This is useful as if you have a look at a typical solar-cell IV/PV curve you will see that the peak power point occurs at a single current/voltage/impedance, hence when illumination conditions change this converter is able to respond accordingly.

The other key function of the DCDC converter is to boost the output voltage (Vout) to 4.2V, which is then used to charge the supercapacitor through a schottky diode. The purpose of the diode is to stop the supercapacitor from discharging through the Vout setting resistor network (R4 & R6). Also the peak charging current of the supercapacitor is set by R1 to 50mA, and initial fast charging of the supercapacitor is enabled through DS1.

Lastly I tried to characterize the DCDC converter to figure out just how efficient it really is. One thing I quickly learned is that you can't simply connect this DCDC convert to a power supply (PSU) as it expects to see a solar-cell like input. A trick to get around this is to place a forward biased diode across the input of the PSU, as in this configuration the silicon junction of the diode as similar to a solar-cell. The other thing to note is that the following plots are very crude, as I only had a single multimeter (EEVblog 121GW) that could log the input/output power. Still the results give a good indication of how the circuit operates, and interestingly also show the different charging stages. For example if the supercapacitor voltage is low enough then most of the initial charging is done through DS1 which brings up the supercapacitor voltage to Voc, after this the DCDC converter takes over and does the rest:

Supercapacitor, AVX SCMS22C255PRBA0

NOTE: AVX changed the PN as I was writing this post, the only thing that changed is the tolerance. Old PN (SCMS22C255MRBA0) had a tolerance of ±20%, new PN (SCMS22C255PRBA0) has a tolerance of +100% -0%.

Besides a small form factor my main reason for choosing a supercapacitor over a typical battery is lifetime, as I wanted the ornament to be functional in the next 30years. If we were to compare some popular battery chemistries it would be pretty easy to see why supercapacitors come out on top in this scenario:

Brand Part # Chemistry Cycles Condition
VARTA 56427 201 018 Lithium Polymer 500 1.4A charge & 0.7A discharge
VARTA 56455 201 012 Lithium Ion 500 0.66A charge/discharge
PANASONIC VL-3032/VCN Lithium Vanadium Pentoxide 1000 For 10% DoD
MAXELL ML 2016 T6 Lithium Manganese Dioxide 1500 For 10% DoD @ 2.5mA discharge
VARTA 55604303059 Nickel Metal Hydride 1000
YUASA 3DH4-0LA4 Nickel Cadmium 1000
AVX SCMS22C255PRBA0 Supercapacitor 500000 Cycled between 5V & 2.5V

As you can see a typical battery will advertise ~1500 charge/discharge cycles before capacity drops below a certain threshold (this is typically 80% of initial capacity). Given that the ornament will complete one cycle per day this means it would reach this threshold within ~4years. Whereas with the supercapacitor I have chosen the capacity will drop to 70% of initial value after ~1370years, however this figure is not accurate as it does not account for other factors like voltage/temperature/dielectric aging...

A last note, AVX have released a fairly good whitepaper on this family of supercapacitors. You can read the full text here & here, the gist of it is:
  1. Operating at a lower voltage can drastically increase lifetime. An extreme example AVX presented was driving a supercapacitor at an ambient temperature of 85°C (this is the extreme part) with the voltage being 5V & 4V. At 5V the capacity drops to 70% after 2000hrs, however if the voltage is reduced to 4V then this figure improves to 4000hrs. Coincidentally driving the capacitor at a lower voltage also improves ESR stability:
  2. The conclusion states temperature dependence pretty well: "When derated to typical operating temperatures between 25°C and 45°C these parts are expected to last more than 20 years".

Illumination Trigger & LED Driving Circuit

This section is quite simple:
First off an NPN phototransistor (KPS-3227SP1C) drives an N-channel MOSFET (PMV20XNEA), I use this phototransistor to detect when the ornament is in a dark environment (no sunlight). When light is present the gate of the MOSFET is pulled low to ~0.4V above GND, enough to turn it OFF. When there is no light then the gate of the MOSFET is pulled high to the supercapacitor voltage, this turns the MOSFET ON which enables the oscillator circuit by providing a connection to GND. Earlier revisions of the illumination trigger circuit tried using the solar-cell as an input, however this was unreliable as the voltage of the solar-cell was always controlled by the DCDC converter.

Next the LED (KPTR-3216SURCK) is driven by a simple Ring Oscillator, which slowly fades the LED in/out in a breathing like manner thanks to the super low oscillation frequency of 59mHz (that's right milli). The reason why I went with this oscillator configuration is that it can work down to 1V, this is plenty enough for the LED which stops being bright at ~1.7V. If you are interested in having an oscillator circuit that can operate at a much lower voltage then I recommend having a look at some JFET based oscillators.

NOTE: At first I though that I was using a BJT Phase Shift Oscillator, however orolo & Hero999 from EEVblog pointed out that it's actually a Ring Oscillator. Also orolo explains the circuit operations quite well:
"When Q4 is saturated, Q6 must be off to keep Q4's base high. Since Q4 is saturated, its collector is low, which will turn Q5 off. As Q5 turns off, its collector goes up, which then turns Q6 on. As Q6 turns on and goes into saturation, Q4 is turning off. 

So the thing goes:
Q4(sat), Q5(turn off), Q6(turn on) → Q4(turn off) Q5(turn on) Q6(sat) → Q4(turn on) Q5(sat) Q6(turn off) → Q4(sat) Q5(turn off) Q6(turn on) → etc."

Lastly here are some results from LTspice which show how the circuit behaves with depleting supercapacitor voltage. If you want to see other results or try to run the simulation yourself then have a look inside the project pack:

Extra Pictures

Altium schematic:

Altium PCB:

SOLIDWORKS Visualize renders:
NOTE: Here is a good tutorial on how to render SolidWorks animations in Visualize.

Monday, October 15, 2018

PROJECT: Heating-platform Mod

LINK TO PROJECT PACK

So my ReflowR has gone kaput. After contacting Lafras (the guy who designed & made the unit) it turns out the heating element is at fault as the element resistance is OC. Luckily he was a cool enough dude to send me a free replacement.

After doing a bit more digging I found that the ReflowR uses a mica core heating element which compared to a ceramic heating element (like the one in your 3D printer) has a few disadvantages:

  1. Mica cores are easier to damage, this is physically speaking
  2. Mica cores have a slower heat up rate
  3. Mica cores are not capable & suitable for high temperature operation, apparently you don't want to run the core >480°C as things start to break down

Picking the Heating-platform

After even more digging it turns out you can buy a fully assembled hot-plate, some of which use a cylindrical ceramic heating element:

I decided to go with the ZB2020JR as it:
  1. Uses a ceramic heating element
  2. Has a pretty good power per area. Others heaters offered a higher wattage but I had a feeling their numbers were skewed
  3. Has a proper PID controller (ZB102-6411)
  4. Has enough room for upgrades ;^)

Modding the Heating-platform

I wanted to control the unit via my PC so I also bought the PC410 which is a PID controller with an RS232 port.
NOTE: TTL and RS232 are not the same thing!!! Though their logic might be similar their signal levels are completely different, sparkfun has a good article on this.

I found out that the original PID controller (ZB102-6411) drove the ceramic heating elements directly with an internal Hongfa HF152F (16A 250VAC) relay. Since the relay inside the PC410 is only rated to 3A 250VAC I got the Opto 22 240D25-17 Solid State Relay, this thing is rated to 25A 240VAC so will have no trouble driving the heating elements (with appropriate cooling!!!).
UPDATE: If we use the magical P=VI formula it turns out the heating elements draw approx 3.5A, so the 25A SSR is a bit over kill. 

With all that said here are some pictures of the modding process:
  • The original wiring inside the unit was actually pretty good, all wires were crimped, marked and insulated properly:
  • Here is what the old (ZB102-6411) & new (PC410) PID temperature controllers look like:
  • Front hole expanded & PC410 loaded. The HOT POPO PLATE 9000 is starting to take shape:
  • And finally insides completed:
NOTE: If you want to control the hot-plate via RS232 or front panel (prog mode) you have to short pin 14 & 15 else the program will be halted as soon as it's started. See section 12.4 of PC410 manual (pg28).


Trying the Heating-platform

Turns out there are a bunch of programs out there that can talk with the PC410, most of which are clones of one another. The two programs I liked were:

BGA Mods Rework Software v1.1
This one is very minimalist but is also very easy to use. The only thing to be aware of is that the software expects to see the PC410 on COM1.

PSOFT Rework Station Controller v2.3.1
This program has way more features like: COM port configuration, heater duty cycle, alarm config... Also it is designed for rework stations that have a top & bottom heater, so was a bit overkill for what I was doing.


After going through PID self-tuning (section 9 of PC410 manual, pg21) I then did a bunch of tests to see just how different the surface temperature of a PCB and the hot-plate really are:

Turns out it's not that much (as you would hope) if the two are in direct contact, you only start running into large drops (~70°C) if there is a bit of an air gap between the PCB and the hot-plate, for example when using a non-uniform skillet.

Now the plan is to reflow a bunch of loaded PCB's and figure out the optimal technique/profile =^..^=

Monday, August 13, 2018

UPDATE: 3D Printed Solder Fume Extractor & Reflow Soldering

Here are a couple of smallish projects I have just completed:

3D Printed Solder Fume Extractor

A while back I made a solder fume extractor which overtime had become a bit too bulky for my table, plus it was only using an activated carbon filter.

Turns out if you want to do any real filtering/removal of fumes you need to use a HEPA filter as this is capable of actually capturing the 0.5µm - 1.0µm particles rather than just removing the odor.

Also if you really want to get fancy you could have a multi-filter setup. For example you could have a pre-filter/HEPA/activated carbon combo, here your pre-filter enhances the lifetime of the HEPA filter, the HEPA filter removes the super small particles, while the activated carbon filter removes the volatile organic compounds that cause odor.

As size was a key constraint for me I had decided to just use a HEPA filter with a powerful computer fan (DELTA PFB1212GHE). To generate the PWM signal which controlled the fan I used an ATtiny13. As this MCU does not have as much grunt compared to say an ATtiny45/85 you have to get efficient with your code, here is a good tutorial on this. Come to think of it, an easier way to control the fan would be by using a 555 timer circuit.

With all that said, if you want to make/modify one yourself you can get the CAD files here.


UPDATE: Have made an attachment that holds an activated carbon filter, so now the fume filtering is a 2 step process. The CAD files link has all the relevant info


Reflow Soldering

If you recall my 2018May10 update I was in the process of designing a supa sekrit board. Well not long ago the PCB, paste stencil, & parts have finally arrived. So here is a quick overview of how the assembly went down.

1. First off the board was cleaned with some IPA and wedged between a couple of vero/strip-boards to make sure it didn't move around:

2. Then I aligned the Polyimide Film stencil (OHS Sencils). The board is mostly 0805's with the most complex component being a 0.5mm pitched QFN. First time working with Polyimide Film too, next time will probably get a Stainless Steel stencil to make alignment and paste release easier.

3. The solder paste I used was the Chip Quick SMD4300AX10 (leaded), this was deposited with the I-Extruder to minimize waste.

4. To level the paste I used the provided spreader which was basically a plastic card:

5. Lifting off the stencil. Most pads have good coverage, only the 0.5mm pitched QFN had issues as we will see later on:

6. Finally all components were loaded and solder paste reflowed on the ReflowR:

Here are some closeups of the joints as well. I have a feeling my temperature profile is a bit too high, as using leaded paste should give a shinier finish. Also a few of the QFN pads were a bit low on solder paste, suspect this was because stencil was not aligned (see the solder balls between pads):

Doing a quick functional test shows that the circuit is working, just need to delve a bit deeper into it and capture some waveforms and what not

Wednesday, June 20, 2018

UPDATE: Virtual Reality Fun

Last weekend we bought a Virtual Reality headset, a 2nd hand Lenovo Explorer which is one of the variants of the Windows Mixed Reality headsets
Besides using it to play really immersive video games another cool thing you could use it for is viewing 3D models. Since my wife and I tend to build shelves to save space in our tiny apartment here is how our workflow could change

First off my wife would do a sketch of a possible design with some rough dimensions:

I would key this into a program like SolidWorks:

Then we could play around with design variations in VR to get a better idea of how it all fits together:
NOTE: See below for how to import a SolidWorks model into VR

And finally we build the thing:

Importing SolidWorks file into Mixed Reality Portal

The easiest way to view a SolidWorks model in VR is to export it as an OBJ file using this macro, also see here on how to install macros into SW. Before you do make sure that the model orientation is correct as you can only rotate in 2 axis in the Mixed Reality Portal

Now put on your headset and open the Mixed Reality Portal, here you can import the OBJ file using Mixed Reality Viewer. If you have trouble importing the object try making it less complex, for example with above model I had to remove the 3D printer for it to import properly

Once your model is there scale it manually until it looks right, we found an easy way of doing this is by physically holding an object you know the size of and scaling it to that

Thursday, May 10, 2018

UPDATE: Various Projects

Not enough time/energy (yay cold) to do a whole write-up, so here is a quick update on what we have been up to:
  1. A while back I ordered a new 3D printer, a Prusa i3 MK3. This gave us the motivation to make some bookshelves that would house the unit along with our other "clutter". Once my partner finished the design I keyed it into SolidWorks, that way we could see how it all fitted together before actually building it. After we were happy it was on to cutting the wood, and wowsers there was so much cutting that we had to make a cover for our circular-saw to catch all the dust. One last interesting point, the shelves were mostly made from wood we had found on the street, we only had to get a couple of meters or extra wood for the bottom rails. Anyway here is how it came out:
  2. I have finally joined the dual monitor club :D After upgrading my laptop screen I had a spare 1366 x 768 panel lying around, so I decided to try and make this into a 2nd monitor. If you have ever seen the port of a laptop screen you would know that you can't just plug it directly into a DVI/HDMI/VGA port, instead you have to use an adapter board. After contacting a seller they said that this board would be compatible with my screen (M125NWR3). If you plan on doing this yourself my advice is to contact the seller, as there is no "one size fits all" converter board. Finally you can get the SolidWorks & STL files here, and here is what the assembly looks like:
  3. Lastly I am working on a small project with a mate. Can't say what it is yet but can say that PCB design is coming along nicely, just need to finish off the last PCB section and then we can place an order for the boards & parts. I also received my ReflowR a while back, so am super excited to try it out with this.


Saturday, February 17, 2018

RESEARCH: Behavior of QX5252F (and probably CL0116)

Intro

The QX5252F (and it's brother CL0116) are a joule-thief type LED driver that can also use a solar cell to charge a 1.2V rechargeable battery (use YX8018 if you want 2.4V). Here I share my findings to try and figure out how this IC works.


Solar Cell Characterization

First off here is the IV & PV curve of the (shoddy) solar cell I made up. The test was done on a hot summer day with clear skies, so results are rough and don't use an exact 1000W/m² lamp.
As you can see peak power (~390mW) occurs at ~1.7V (~230mA).


QX5252F Tests

Circuit

I used the exact same circuit as shown in the datasheet which you can see here:

L = 100uH

Initially I tried setting the inductor (L) to 100uH, interestingly this limited the battery current to ~40mA. This might be relevant to table on pg3 of datasheet, though this table shows how you can set LED current by using different inductor values.

L = 20uH

I then lowered the inductor to 20uH, this time current was not limited and the battery got a much better charge. Also the battery I used had a capacity of 1200mWhr and the QX5252F managed to charge the battery to 925mWhr (77%) for the day.

SBAT to VBAT Diode Drop

From further tests I concluded a few of things:
  1. The battery is charged directly by the solar-cell via a Schottky diode, hence the voltage drop varies with current. What this means is that at a low charging current you have a higher efficiency and at a high charging current you see a lower efficiency; for example with above data the peak efficiency (98.1%) occurred at a current of 0.01mA, while the lowest efficiency (83.8%) occurred at 136.44mA, also the overall efficiency for the day was 86.9% which is pretty close to the datasheet value of 90%
  2. The QX5252F does not have maximum power point tracking (MPPT). Interestingly enough the peak power (230mW) for the 20uH test occurs at Vsolar-cell ~= 1.7V which if you look at the PV curve (different light conditions) is also the peak power voltage. I think this is more to do with me getting lucky with the solar-cell arrangement, as when I used the same solar-cell on a YX8018 while trying to charge a 2.4V battery the circuit would peak at 10mA before steadily dropping to 1mA (see graph below, terrible charging efficiency).
  3. Strangely the inductor value seems to set a charging current limit for the battery, I am not sure how this works as I thought charging the battery occurred via the schottky diode. Also the oscilloscope did not show any switching DCDC converter behavior when charging the battery (light hitting solar-cell). 
  4. When the battery is discharging the operational frequency of the QX5252F is ~133kHz. This is when the joule thief part of the IC springs into action.

Conclusion

The QX5252F is a pretty nifty IC which makes building a simple solar harvesting circuit very easy. A few small downsides is that:
  • You are limited to a single 1.2V battery, though you might get away with using a YX8018 and a higher Voc solar cell
  • You have to choose solar-cell that has a Voc of at least 2.4V (2x1.2V) for it to work properly
  • As you would expect it does not have MPPT, not a biggie at this price point
Also the inductor sets the peak battery charging current (not expected) as well as the peak LED current (expected). I might have had my data logging circuit wrong, so will have to redo this step in the future