Silicon magic: power harvesting from solar cells doubles power out

A power harvesting chip doubles the power of solar cells, when the solar cells are in parallel, compared to when the solar cells are in series.

Of course the power harvesting chip is doubling the voltage.  A power harvester is a voltage booster.  It is not so obvious that it can double the power.

I ran an experiment with a BQ25504 power harvesting chip, two PowerFilm SP3-37 3 volt solar cells (panels actually, comprised of multiple cells), and a motor load.  When the BQ25504 signaled battery OK, I dumped the stored power into the load until battery OK went low.  I counted the frequency at which the load was dumped, as a measure of power out.  I tested two configurations:

  • with the solar cells in series, feeding a nominal 6 volts into the power harvesting chip
  • with the solar cells in parallel, feeding a nominal 3 volts into the power harvesting chip

The result is that the series configuration dumped the load roughly twice as often, i.e. harvested twice as much power from the solar cells.

(The light condition was bright indoor light, so the actual voltages from the solar cells was slightly less, but that is immaterial.)

(I set the battery OK threshold at 2.8 volts, and the hysteresis at 2.4 volts ( started dumping to load at 2.8 volts, and quit dumping when the storage reached 2.4 volts.)  But the results would be the same even if the threshold was 5.5 volts, the limit of the chip.)

Much of semiconductor technology seems like magic.  The solar cells and the chip are arrangements of doped silicon.  Certain arrangements (solar cells in parallel feeding a power harvester chip) are even more magical than other arrangements.

Starting torque of brushless DC (BLDC) PC fan motors?

Short answer: about 1 g*cm per gram of weight.

I measured a BLDC fan motor from ADDA, model number AD1505LX-90, by taping an arm on the fan, and taping a US penny to it (cut in half, each half at 1 cm from the motor axis.)  At full rated voltage of 5V, the motor would start the arm rotating.

A brief pulse of electricity (say one tenth of a second) would NOT start the motor.  The arm would twitch, but fall back into detent (between permanent magnets of the rotor.)

A little longer pulse (say one third of a second) would rotate the motor say half a rotation (past one or more detents.)

The fan weighs about 2 grams.  It moved a penny weighing 2.5 grams on a 1 cm moment arm (a torque of of 2.5g*cm.)

So the starting torque per unit of mass is about 2 g*cm per g.

I know this is fuzzy, but:

  • the manufacturers don’t publish the starting torque for these fans
  • there is a research paper about the torque of these fans but you must pay to see it (thanks, but no thanks, Prof. Fussell)
  • most posts don’t quantify, just saying “not much torque.”

I believe this will extrapolate linearly to larger motors.

Look for another post about the design of BLDC motors.

 

Update:

Tested a ADDA0205MX-K53-LF weighing 5g.  It has about 20g*cm of starting torque.  So it has about 4 g*cm of starting torque per gram of weight.

These motors are very thin and wide (like what is called a capstan motor in VCR’s and floppy disk players.)   This flat and wide configuration probably has much to do with its high starting torque: the permanent magnets are at a long moment arm from the center of the motor.

BQ25504 programming with one resistor net

This is a report of an experiment, a circuit board design using the BQ25504 , an energy harvesting chip.  The chip is intended for tiny, free-standing devices that harvest power from their environment, so they can run indefinitely without new batteries.

It is programmable using resistor nets. Unfortunately, some of the programming is for the battery management functions:

  • the undervoltage condtion, UV, when the chip should stop drawing from a battery
  • the overvoltage condition, OV, when the chip should stop charging a battery

If you are not using a battery, but say a super cap, you might not care about UV and OV.  But the chip’s pins that do the programming must still be connected.

That datasheet example shows three resistor nets, one resistor net for each of the above functions, and one resistor net for the battery OK condition. (And another resistor net for MPPT.)

My question is: can the three functions be programmed with one resistor net?  The answer is yes.

How I did it:

  • keep only the resistor net for OK programming (ROK3, ROK2, and ROK1)
  • connect pin 6 (VBAT_OV) to pin 10 (OK_PROG)
  • connect pin 8 (VBAT_UV) to pin 9 (OK_HYST)

On the evaluation board for the chip, with:

  • ROK3 = 1.4Mohms
  • ROK2 = 4.2Mohms
  • ROK1 = 4.4Mohms

This yields programmed voltages of:

  • UV = 2.2V
  • OK_PROG = 2.4V
  • OK_HYST = 2.8V
  • OV = 3.1V

(Which meets the requirements for ordering, specified in the datasheet.)

To actually modify the evaluation board requires unsoldering three resistors, cutting a trace, and soldering in two jumpers.

In my test, it worked.  ( But I didn’t actually test how the chip behaved in the OV conditions.  I didn’t use an oscilloscope to verify the waveforms.)

The three resistor nets have seven resistors total.  Four extra SMD resistors is no big deal, but if the intended use is in tiny devices, why not eliminate them? (If your application doesn’t need battery management.)

Designing a QFN-16 SMD land pattern for Fritzing

Introduction

This is a tutorial about:

  • reading manufacturers drawings for a land pattern for an IC having a QFN-16 footprint on a PCB
  • making various compromises

A future post may discuss drawing the land pattern  using Inkscape, creating an SVG file for Fritzing.

The specific IC is the BQ25504 from Texas Instruments.

The goal is to translate from the chip manufacturer’s drawings and textual recommendations to an SVG drawing for Fritzing.

Many compromises must be made:

  • for Fritzing and the Fritzing fab
  • for the SVG editor tool, Inkscape
  • for lack of standards by manufacturers

Manufacturer’s drawings

The datasheet for the BQ25504 chip shows land pattern data near the end of the document.

Other manufacturers have different drawings.

Compromising between various QFN-16 specifications

Is the QFN-16 PCB land pattern a standard?  I assume it is not.

  • otherwise why would each manufacturer show their own drawings?
  • another TI document describes a package called QFN-16 that has an entirely different, rectangular footprint.
  • the pitch between pins can be different on packages called QFN-16

So the Fritzing SVG file will be a compromise in the greatest (or least?) common denominator sense.

The most general description is:  the PCB land pattern for  a chip that:

  • is an SMD device
  • is 3mm square
  • has pins at 0.5mm pitch
  • has four pin/pads on each side
  • has pins that are pads underneath  on the edge
  • has a heat sink pad in the center of the bottom

The result land pattern:

  • should work for the BQ25504 chip.
  • should work for many other IC’s
  • may not work for all IC’s  that are purported to have a QFN-16 package.
  • may work for other packages that are compatible with the QFN-16 package (a quad SOIC?)

Compromising for Inkscape’s imprecision

The manufacturer’s drawings are “technical drawings”: they have dimensioning artwork.  That artwork includes guidelines, arrows, and numeric text for the dimensions.  One of the tasks is to translate the printed dimensions to executable dimensions in SVG.

Inkscape is not the best tool for technical drawings.  There is a known deficiency: you can’t precisely enter the size of a shape using numbers in a textbox.  (You can try, but the number changes after you enter it.)

The comprise we make is to allow shape sizes to differ from specified dimensions by up to 0.05mm.

Compromising on solder mask relief

The manufacturer recommends a solder mask that is 0.07mm wider (all around) than the copper pads.  In other words, relieved.   The manufacturer refers to industry recommendations.  Which say the solder mask should be wider because of the registration tolerance of about 0.07mm for the solder mask, for most PCB fabricators.  If the solder mask opening  is the same size as the copper pad, a misregistered solder mask that overlaps onto the copper could prevent the pin/pad on the chip from soldering to the pad on the PCB.

Fritzing does not let you specify the solder mask, but generates it automatically.  I don’t know whether the automatic process relieves the solder mask.  I don’t know whether I should make the PCB pad 0.07mm larger than the manufacturer recommends, so that the solder mask is also larger.

I chose to size the pad as recommended.

Compromising on solder mask between pins

The manufacturer in note C refers to the industry recommendations. Which says that if the solder mask is relieved, the solder mask between pins may approach the minimum width line that will stick to the PCB.  They suggest an alternative: a so-called ganged opening, a large cutout in the solder mask around each bank of pins, without solder mask between pins in the gang or bank.

For this chip, the solder mask between pins will be 0.22 mm wide if the solder mask is not relieved, or 0.08mm if relieved.

Again, Fritzing will not let you specify the alternative cutout in the solder mask.

Compromising on rounded land pads

Many SMD land pads are rectangular but the manufacturer recommends a rounded end.  This fits the shape of the pin on the chip.  It also increases the minimum distance between adjacent pads on the corners of the land pattern.  I presume it also helps prevent solder shorts from ends of pads to the central heat sink.

I  chose to round the pad ends, on both ends (to simplify the SVG, specifying one stroke with rounded end caps.)

Compromising on pads jutting from beneath the chip footprint

The manufacturer recommends a land pattern where pads jut from beneath the chip by 0.4mm.  However, the industry recommendations discuss that a solder fillet to the horizontal portion of each pin is not necessary.  And these parts would rarely be soldered with a hand-held soldering iron, instead by reflow technique such as using an oven.  So I’m not sure whether the jutting portion is necessary.

On the other hand, some hand soldering techniques require an extra long jutting portion, so you can use a soldering iron to push or drag solder toward the chip, such as for Schmartboards.

The manufacturer’s recommended stencil (for applying solder paste to the land) also has a jutting portion.  It is possible that paste from the jutting portion is intended to wick under the chip’s pins during reflow soldering.  Proto-Advantage sells an adaptor with a stencil, but they don’t describe the stencil.  The land pattern on their adaptor seems to have smaller pads than the chip manufacturer  recommends.

Also, the manufacturer shows a rectangular end on the jutting portion.  However, it might be easier in SVG to  have a rounded end on both ends of the pad.

I chose to keep the recommended length and width of the pad but make both ends rounded.

Compromising on Pin 17, the heat sink land

The manufacturer shows a seventeenth pad in the land pattern.  The pad is to be soldered to a thermal pad on the bottom of the chip, to sink heat from the chip to the board.  Also the land pattern has four vias (plated holes) in the seventeenth pad to sink heat through the PCB to a copper ground plane on the back.

Also, the manufacturer’s schematic shows pin 17 should be grounded.  It probably is grounded to the chip’s ground pin internally to the chip.

I  chose to

  • create the pad in the land pattern,
  • but not to make it a connector
  • and not to make vias

( To make it a connector would also require designing 17 pin images for the breadboard and schematic views.)

( To make vias requires knowing how to make holes in PCB’s in Fritzing.)

The BQ25504 is a “power” chip, in the “battery management” class.  It is also very small.  That explains why it needs a heat pad.  Other “logic” chips having the QFN-16 package might be happy without the heat pad.

Sharing a custom Fritzing part

Suppose you create a custom Fritzing part.  This tells how to share it with the community.

(Here “custom” does not mean proprietary, in the usual electronics sense.  Others should be able to buy the real component.  Your “custom” part is simply a free Fritzing specification for the component.)

Move it to “My Parts”

Some parts you have created will already be in the “My Parts” bin, in other words, appearing in the “Mine” tab of the Fritz parts browser.

But if you just created a new package, say an SMD PCB footprint for the “Generic IC” part, you might need to move it (because you can only Export parts from “Mine”) :

  • start a new design and place your part on the breadboard
  • click the right mouse button on your part in the breadboard view
  • choose “Add to bin….>  My Parts”

Bundle it

Fritzing bundles a part for you when you export it.    The result is a file with suffix .fzpz .

(Here “bundling” means “packaging” in the software sense: putting all the constituent files in an archive and compressing it.  But the “package” of an electronic component means its physical form.)

To bundle your part:

  • open the “Mine” tab of the Fritzing parts browser
  • click the right mouse button on your part
  • choose “Export part….”.  A “Specify a file name” dialog will open.
  • choose a file name and choose the “Save” button

Distribute it

Your .fzpz file can be imported by other Fritzing users, using Fritzing.

You can email your .fzpz file.

You can also upload it to a forum dedicated to user contributed Fritzing parts.

The forum is actually one item in an issue tracking database.  The item has many comments.  Most comments are a contributed part with an attached .fzpz bundle.  To upload your part:

  • follow the link above
  • choose “Add a comment below” or just scroll to the bottom of the page
  • enter a short description of your part
  • choose “Attach a file” and browse to your .fzpz file, etc.
  • choose “Save changes”

Editing an SVG image for a Fritzing part using Inkscape

Introduction

This is an incomplete tutorial, a FAQ, and is IN PROGRESS.

A specification for an electronic component (part) in Fritzing comprises five files, including several image files in the SVG format.  This  is about editing an image file for the PCB, the image of a part’s lands on a printed circuit board.

The example describes an SMD part.  The example file is distributed with Fritzing, at this location on a typical Linux installation of Fritzing:

~/Fritzing/parts/svg/core/pcb/QFN-20-0.4MM_pcb.svg

I am not an expert, and this could have mistakes.

Printed circuit board layers

A PCB has layers.  From the top:

  • artwork: labels (text and guides) to help solder parts to the PCB
  • solder mask
  • top copper
  • epoxy/glass structure
  • bottom copper (optional)

A PCB can be multi-layer: having additional layers of copper and glass.  Fritzing is NOT capable of designing multi-layer PCB’s, only the layers listed above.

What PCB layers are represented in a Fritzing SVG file

The artwork and copper layers are usually represented.

The solder mask is NOT represented.  (Fritzing generates it automatically in the PCB view and when going to fab.)

The example file includes only the top copper layer, because it is an SMD package.  Some SMD parts also require the bottom SMD layer (for heat sinks connected by vias.)

Viewing Fritzing PCB layers in Inkscape

Inkscape supports layers, but Inkscape layers are not the same as PCB layers.  The example file does not have named Inkscape layers.

Instead, the PCB layers are represented as groups ( using the <g> tag.)  The groups have ID’s which name the PCB layer:

  • “copper1” meaning the top or front layer of copper
  • “silkscreen” meaning artwork

To view a PCB layer as a group, select some shape.  Inkscape will draw a bounding box that encloses the group of the selected shape.

See elsewhere for instructions on managing groups in Inkscape.

(The SVG standard does not define layers, only groups.  Inkscape implements its layers using groups.  Other SVG editors may implement layers differently.  Thus the disconnect.)

Seeing the white artwork PCB layer in Inkscape

A PCB artwork layer is traditionally white to contrast with the traditionally green solder mask layer.

Unfortunately, the default background color in Inkscape is also white, often hiding the PCB artwork layer.

To better see the artwork:

  • choose View>Display mode> outline.
  • OR set the documents background color to non-white, opaque (choose File>Document Properties…>Page>Background)

Following the Fritzing graphics standards

You should follow the graphics standards that Fritzing developers have defined for image files that define a part.

The standards define colors, fonts, dimensioning, and so forth.

You should copy an existing image, that already follows the graphic standards.

Canvas, document size, page size, and viewbox

The canvas is the available drawing area.  In Inkscape, it is practically infinite.  You can’t set the canvas dimensions.

The document size is the size of the contents, what you have drawn.  You can’t set it either, except to draw more, outside the current drawing.

The page size helps define how the contents will be paginated when printed to paper.

The viewbox defines a mapping between internal coordinates (unitless) to the document size coordinates (in some unit.)

In the example file, the document size and viewbox are:

width="0.134in" x="0in" version="1.2" y="0in" height="0.134in" viewBox="0 0 9.648 9.648"

(Seen by editing the file with a text editor.)

This means the drawing describes a part which is 0.134 inches wide, and that an internal coordinate of 9.648 corresponds to 0.134 inches.

The units don’t really matter, since all numbers are in floating point.  But, it is easier to comprehend, and edit as text, if the units are switched from inches to mm :

width="3.4mm" x="0mm" version="1.2" y="0mm" height="3.4mm" viewBox="0 0 34 34"

This is the same size (3.4mm equals 0.134 inches) but the internal coordinates now represent tenths of a millimeter.  (If you need to position shapes with more precision than tenths of a millimeter and you want to use whole numbers in your internal coordinates, define the viewbox width as 340 or even 3400.)

In the example file, there is no chosen, standard page size.  The page size is a custom page size.  The custom size has been “resized to fit the contents.”  Choose File>Document Properties…>Page to see this.

(Does a viewbox also define a peephole onto the contents?  It helps define how your drawing will initially appear when displayed on a computer screen, that may be zoomed and scrolled.  Usually the peephole covers the entire contents, so the entire contents will appear initially on a computer screen.)

Snapping to a fine grid to position shapes accurately

If you are using metric units, set a fine grid to metric units:

  • Choose File>Inkscape Preferences>Grids (or Document Preferences)
  • change the units to mm
  • change “X spacing” to 0.1 (tenths of a mm)

Also choose View>Grids.

Also choose the “Snap to Grid” icon on the right.

Set the grid fine enough and zoom in enough that you can position shapes accurately.

Editing as text instead of using Inkscape

You can edit the SVG using a text editor.  The example file is a very small, simple, SVG text.  After you edit and save it in Inkscape, it won’t be so simple.

(? will brd2svg to simplify it again when you export it?)

Assigning IDs to shapes

Shapes representing pins/pads need an ID that is referred to from a metadata file (.fzp).

Select a shape.  Click the right mouse button.  Choose “Object Properties.”

Making a new SMD package for a generic IC in Fritzing

Introduction

This is a tutorial about creating a new part (specification for an electronic component) for Fritzing

Many common parts are distributed with Fritzing but users can create and contribute parts.

The example used here is a an IC having a QFN-16 package, an SMD footprint on a PCB.

 

Context

The example is part number BQ25504.  It is only sold in the QFN-16 package, an SMD package.

You can buy an adaptor from a QFN-16 package to a DIP package.  Suppose you want to build a PCB optimized for small size, without an adaptor.  But the QFN-16 package is not in Fritzing.  Thus you need to create a new part, loosely speaking.  But you can do so by extending the “Generic IC.”

 

About Fritzing’s “Generic IC”

A “Generic IC” is a part in Fritzing.  In most cases, a generic IC represents a class of real parts that are available:

  • in a standard DIP package suitable for use on a breadboard OR fitting an adaptor to a standard DIP package
  • in other packages for use on a PCB.

A set of generic IC instances in a Fritzing design may all look the same in the breadboard view (having a DIP package), but have different packages (footprints) in the PCB view.  You can specialize a generic IC by choosing a package for an instance.  (You can also specialize an instance by choosing a count of pins, or by changing pin labels.  In other words, a part class is a template.)  Here, we extend the “Generic IC” template by adding a package.

(Suppose you don’t intend to build a breadboard.  Then Fritzing’s breadboard and schematic views are an abstraction, where you can abstractly specify your design.  Then it doesn’t matter what package appears in the breadboard view.  This example is building a package for the PCB view of Fritzing.  Generally you breadboard before going to a PCB, but you might have an evaluation board for prototyping.)

 

Alternative: Creating a new, special part class

An alternative is to create a whole new part class, or template.  It might have a unique breadboard and schematic image.  Each pin in the template might have a unique label such as “VCC”, instead of a generic label “1.”  Creating a whole new part class saves time when you place many instances of the part in a Fritzing design: it saves extra steps to specialize each instance.  This example is for a part that usually appears once in a design.

 

Overall strategy

The usual strategy is:

  • open an existing part (template) i.e. open files that specify the template
  • modify the files
  • “Save As”

You usually start from a template similar to the goal.  Here we start with the files that define the “QFN-20-0.4MM” package of the “Generic IC”, which has four more pins (pads) than we need.

I use the word “reimplement” to mean the process of deriving a new variant of an existing object.

 

What files to reimplement

A Fritzing part class is defined by five files:

  1. icon image SVG file (.svg)
  2. breadboard image SVG file
  3. schematic image SVG file
  4. PCB image SVG file
  5. metadata xml file (.fzp)

Here we reimplement the fourth and fifth files:

  • the PCB image file because we are redefining it.
  • the metadata file to point to the new PCB image file, to delete connectors.

Our new part class will share the first three, existing files with other part classes.

 

Finding files to reimplement

The process is:

  • find the metadata file
  • read the metadata file to find a reference to the PCB image file

Loosely speaking, there is one metadata file for each unique (part class, package) combination.

The metadata files are in a subdirectory of ~/Fritzing/parts. Here, they are in the “core” subdirectory.

The metadata files are often similar to the package names.  Browse the directory to find a likely candidate.  Here, the file is:

~/Fritzing/parts/core/SMD_QFN-20-0.4mm.fzp

Confirming the metadata file

Open the metadata file using a text editor (it is XML.)

Find:

<property name="package">
<property name="family">

The value for family should be “Generic IC”.  (More generally, the value should match the family name you see in the Fritzing Inspector window when you browse the part by icon, for the part class (template) you are reimplementing.)

The value for package should be “QFN-20-0.4MM”.  (More generally, the value should match one of the package names you see in the “Package” pulldown menu in the Fritzing Inspector window.)

Finding the existing PCB image file to reimplement

Still with the metadata file open, find:

<pcbView>
   <layers image=

The next string is the name of the PCB image file, here “pcb/QFN-20-0.4MM_pcb.svg”.

The path prefix to the PCB image file usually differs slightly from the path to the metadata file.  Here, it is “~/Fritzing/parts/svg/core”.  The full path is:

~/Fritzing/parts/svg/core/pcb/QFN-20-0.4MM_pcb.svg

Where “~” means the home directory in Linux, or where ever you installed Fritzing (since we are reimplementing files from the standard installation.)

Where to “Save as” reimplemented files

Put them in the directory for user specific Fritzing configuration.  (You CAN put them in the Fritzing install directory, but they might be destroyed by an updated installation of Fritzing.)

On most Linux distributions, in:

~/.config/Fritzing/parts/user/        (for the metadata file)
~/.config/Fritzing/parts/svg/user/pcb/  (for the PCB image file)

(The directories might be empty unless you have already created or imported a part.)

Reimplementing the PCB image file

Open the file with an SVG editor such as Inkscape.

Modify it to suit (here, delete four pin rectangles and rearrange the rest.)

(It might be easier to edit the SVG file with a text editor to delete rectangles for pin/pads.)

You also might need to redefine the viewbox (details omitted.)

But the resulting drawing should match the industry standard for the QFN-16 footprint (or the manufacturer’s footprint drawing if non-standard.)

The dimensioning is important!

“Save As” the drawing (don’t overwrite the original!)

Reimplementing the metadata file

Open the file with a text editor.

Find the text we found to confirm the metadata file.  Change them:

  • Change the “package” property to a new, descriptive name, here “QFN-16”.  (Leave the “family” property as “Generic IC”.)
  • Change the reference to the PCB image file to refer to your reimplemented PCB image file.

Also:

  • Everywhere, change the old package name “QFN-20-0.4MM” to the new package name “QFN-16”.
  • Change the reference to the breadboard image file to ‘breadboard/generic_ic_dip_16_300mil_breadboard.svg’
  • Change the reference to the schematic image file to ‘schematic/generic_ic_dip_16_schem.svg

Also delete four connectors, now extra.  Find:

<connector id="connector16" type="male" name="17">
....

And delete four “connector” tags worth of text.  (See elsewhere for a discussion of what the text means.)

“Save As” the new metadata file (don’t overwrite the original!)

An adapted SMD part

The part we chose to reimplement, the QFN-20-0.4MM package, is actually an adapted generic IC.  That means that the breadboard view shows an adaptor part which adapts an SMD chip to a DIP form factor.  (You buy the adaptor, solder your SMD part to it, and plug the adaptor into the breadboard.)  In other words, the specification of the QFN-20-0.4MM package includes a breadboard image SVG file that looks precisely like the adaptor part; it does not share a breadboard image with any other generic IC’s (yet.)

In the steps above, by changing the reference to the breadboard image file to ‘breadboard/generic_ic_dip_16_300mil_breadboard.svg’, we made the new QFN-16 package specification share its breadboard image with other generic IC’s (having 16 pins.)  This saved us from reimplementing a breadboard image.  The downside is that the the breadboard view does not show the adaptor part, it only shows an abstraction, the image shared with other generic IC’s of 16 pins.  Again, in this example, we don’t intend to build a breadboard and don’t care that the breadboard does not look exactly as built.  If you want to build a breadboard, you could still use the new QFN-16 package and just remember that you actually need an adaptor.

(As to why the QFN-20-0.4MM package refers to its own schematic image file, I can’t yet explain.  To me it looks just like the schematic image for a generic IC of 20 pins, only rotated.  Why not share?)

Conclusion

The next time you start Fritzing, you can drag a “Generic IC” it to say the breadboard view.   In the Inspector window, pull down the “Package” menu and choose the package you reimplemented.   In the breadboard view, you should see a DIP with 16 pins.   In the PCB view, you should see the SMD footprint you reimplemented.

I hope to:

  • actually walk through this, make corrections, and upload the part to the Fritzing community.
  • discuss the “Mystery Part” and its relation to the “Generic IC” part
  • create an advanced tutorial that creates a real QFN-16 package, which has 17 pins if you include the grounded heat sink pad!