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. 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)


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


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.


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

Saturday, January 20, 2018

PROJECT: Solar Picture Frame

Quick update. This year we decided to give our family a solar powered photo frame that used a 3D printed photo from our wedding. Here is how it all works:
  1. During day time sun shines on photo making it visible, sun also shines on solar panel
  2. CL0116/QX5252/YX8018 senses sun is present and decides to charge the battery
  3. During night time CL0116/QX5252/YX8018 senses sun is gone and decides to turn ON the LED’s which in turn illuminates the photo from the back
For the circuit refer to this post from 2015. You will need to replace D1/C1/R1 with a string of LED's in parallel, and play around with L1 till you get the best brightness per current, for me this was 47uH.

Anyway, here is a video of me testing the assembly in SolidWorks before 3D printing the models:

And here is the end result:

Friday, January 5, 2018

PROJECT: Slow Motion Frame

This/last year (2017/2018) I decided to make a slow motion frame to celebrate our Anniversary/Xmas/New Year/Valentines/Birthday... lots of birds with one stone ;^)

Here & here is the tutorial I followed. How the frame works is that the electromagnet causes the flower (or what ever you attach) to vibrate at a certain base frequency (say 79.8Hz), if you then strobe the LED's at say ±0.1Hz to 5Hz to the base frequency you will get an interesting optical illusion, the flower will seem to be moving in slow motion.

And here is a video showcasing it working, as well as some progress photos of the build:


Saturday, September 23, 2017

PROJECT: Portable Solar USB Charger

With the wedding world tour coming up and after seeing THIS post by CodeSamurai I was inspired to make a solar USB charger. The countries we planned to go to were about to hit summer so the idea of being able to charge your phone/camera with the power of sunlight sounded pretty neato.

Here is a link to project files (Notes, Altium, SOLIDWORKS, LTspice...)

Project Criteria

I had built up enough experience with LTspice at work so decided to play around with some of the more efficient (but expensive) DC-DC converters out there. My criteria for a winning IC were as follows:
  • First DC-DC converter (Solar) must have some sort of maximum power point tracking.
  • First DC-DC converter must have 1.0V < Vin < 6.0V, this was a limit of the solar cell I wanted to use.
  • First DC-DC converter must have Iin > 0.50A, again limited by the solar cell.
  • First DC-DC converter must have η > 90%, don’t forget this is load dependant.
  • Second DC-DC converter (USB) must have 0.5V < Vin < 6.0V, initially I wanted to operate from a 1S2P NiMH battery.
  • Second DC-DC converter must have Iout > 0.50A, as I wanted something that could do rapid charging.
  • Second DC-DC converter must have η > 90%, again don’t forget this is load dependant.

To save you some time here is a table of all the IC’s I had a look at for the first and second DC-DC converters, the two IC’s I went with are highlighted in green:
From a performance perspective I wanted the final product to meet a couple of other requirements:
  • I wanted the charger to be rugged in terms of components used, if it could still work after 10 years I would be satisfied. So for rechargeable batteries I decided to go with NiCd’s as this chemistry has had a long time to mature and so has the best charge/discharge curves compared to NiMH & Lithium (through the worst energy density).
  • I wanted the overall efficiency to be as high as possible (95%), so I went over-kill on components by using: super low resistance inductors & polymer electrolytic capacitors.

Characterisation – Solar Cell  

Next up I scavenged eBay for a solar cell that was: roughly 110mm x 70mm, and had the highest advertised peak power output. After receiving the solar cell, I did some rough tests to figure out what the actual peak power output was and where it hanged around in terms of Vout & Iout.

For the characterisation I used the very precise and accurate sun as my light source (on a hot summers day with minimal overcast of course), so in all honesty the graph that follows is more of a rough estimate which was good enough for me at this stage. As it turned out the peak power point was ~0.61W and hung around 4.3V @ 0.14A.

Characterisation – Battery Pack    

To characterise the NiCd pack (2S1P) I charged & discharged it several times at 1A. While doing this I also recorded the total accumulated charge (mAh) and pack voltage (V) versus time, and hence got the following curves.
Knowing this I was then able to approximate the battery capacity at a given pack voltage, which I should mention is only true when the battery has a 1A load. This information is useful if you want to get a rough value for the State of Charge (SoC), which I attempt to do with my circuit.


With the important components chosen the next step was to simulate the circuit using LTspice, and as it turned out running a few simulations brought up some key findings:
  • My initial design was based around charging two NiCd’s in parallel (1S2P) which meant both IC’s had to work from 1.2V (nominal). It turns out that working with such a small input/output voltage really hampers the efficiency, as rearranging the batteries from 1S2P (1.2V) to 2S1P (2.4V) improves peak efficiency of the LTC3130 (solar) from 45.2% to 72.5%, while for the LTC3539 (USB) it goes up from 86.1% to 95.0%.
  • With the LTC3539 (USB) you could improve the peak efficiency from 92.9% to 95.0% by placing two IC’s in parallel. Plus, having two in parallel allows the maximum output current to double from ~0.7A to ~1.4A.

Circuit Design - Altium

Now I was finally ready to draw the schematic and layout the PCB, for this I used Altium. Here is a breakdown of the circuit below:
  • The first stage is based on the LTC3130 (solar) energy harvesting IC. Basically this is a DC-DC converter which takes the energy collected by the solar cell and converts it to charge the batteries. It does this by stepping down 4.3V to 3.1V (controlled by R8, R17, and R18) and charging the NiCd batteries to 1.55V per cell. 
  • The nifty thing about this IC is that it can do crude maximum power point tracking (MPPT), crude as it limits the inductor current such that the input voltage hangs around 4.3V (controlled by R1 & R11). Another nifty thing about this IC is that you can add turn ON/OFF hysteresis (controlled by R3 & R13). This is useful for when you want to disable/enable the IC if there is not enough/heaps of sunlight, and with this circuit this threshold is set at 3.2V & 3.5V respectively.
  • The second stage is based on the LTC3539 (USB) DC-DC converter. This one is really neat as such a small package (3mm x 2mm x 0.8mm) can deliver up to 700mA at 5V (from 2.4V). In my circuit I use two of these in parallel to boost 2.4V (2S1P NiCd pack nominal voltage) to 5.1V (set by set by R23 & 29 or R25 & R33). The reason why I set the output to 5.1V instead of 5V is to try and deal with any resistive losses encountered when using a poor USB charging cable. Interestingly enough the USB 2.0 standard states that the power bus voltage (5V) may vary by as much as +0.25V to -0.60V, and since 5.1V is well within these limits the circuit is not going to fry phones/cameras any time soon.
  • The final stage marked as “Capacity Checker” does exactly that. Here I use the very crude method of loading the NiCd pack with a 1A load, measuring the resulting pack voltage, and comparing it against a set threshold (see battery characterisation section). If the measured pack voltage is over a given threshold, then the corresponding LED lights up. I also power (and set the reference of) the comparator with 3.3V instead of 5V to try and increase the voltage resolution.

Lastly I should note a couple of points about the overall circuit:
  • The inductor values for each DC-DC converter were picked by running a number of simulations in LTspice. The goal was to pick a value that resulted in the best response and overall efficiency; interestingly enough the optimal inductor values were ones that had the lowest coil resistance.
  • As I mentioned before I went a bit overkill on most components, for example:
    • I chose inductors that had the lowest possible coil resistance to minimise DC losses. And as you might know this requirement usually translates to physically large components (compare the IC to the big black cube right next to it).
    • I chose polymer aluminium electrolytic capacitors when normal electrolytic’s would have worked fine. But since these have extremely low ESR for a bulk capacitance I could enjoy the benefits of low resistive losses. 
    • Lastly I used Linear Technology IC’s for the DC-DC converters. These are known to have superb performance but come at a cost of well… loadsamoney.

Here is a render of the PCB in Altium:

Here is the BOM (Bill of Materials) for the circuit:

Mechanical Design - SOLIDWORKS

And here is how the case assembly looks like in SOLIDWORKS.

Simulation vs Real-life

It’s always interesting to see how simulations perform compared to real-life, so here are a couple of graphs that show just that. I was really surprised to see that the LTC3130 (Solar) performs better in real-life across the entire output current range. Sadly, the same can’t be said for the LTC3539 (USB) which only performs better up to 0.15A at which point the efficiency drops off drastically compared to the simulation.

It was also interesting to see that the peak efficiency of the LTC3130 (Solar) is ~85%, while for the LTC3539 (USB) it’s ~90%. You might recall my goal was to achieve at least 90% for both, and I can truthfully say I am pretty much there :D

Mistakes, Problems, & Final Thoughts

  • Turns out if you want to have a USB 2.0 charging port the D+ & D- (data) pins must be tied together via a 200R resistor. If you forget to do this, then your port will be limited to 0.5A (no quick charge for you).
  • For this circuit the 5.1V is load dependant, and usually floats between 4.96V to 5.07V. From what I can tell this is because I am trying to have two LTC3539’s (USB) in parallel, something that the IC’s were not designed for (otherwise there would be a SYNC pin).
  • Another annoying thing about running two LTC3539’s (USB) in parallel is that your voltage setting resistors have to be very very accurate (I’m talking spending two hours measuring 0603’s with tiny probes accurate). Otherwise one DC-DC converter might try and force the other once to sink current, something this IC is not designed to do.
  • The SoC (State of Charge) circuit is not that great as the threshold voltages seem to have quite a large error with them. I tried swapping U5 from an LM239DT (TTL, Transisor-Transistor Logic) to a TLC3704ID (CMOS, Complementary Metal-Oxide-Semiconductor) but this did not help that much.
  • A toggle switch is not the best option for something that might get dropped. Currently the ON/OFF switch is semi-broken, will need to swap this for something sturdier.
  • Making an efficient solar battery charger is all fine and dandy, but I really need something to compare to. Will have to order a cheapo USB solar charge off eBay and characterise that for comparison.

At the end of the day I managed to make a neato solar battery/usb charger that is fairly efficient too. It’s been field tested across Israel, Ukraine, Russia, Hong Kong, and Australia, and will hopefully survive the next 10 years of abuse. To close this of, here are some action shots: