Monday, November 21, 2011

A lower power LED blinker

There have been a number of changes to this circuit since i started, and it looks like i should really re-design my LED blinking circuitry before going much further.The biggest change was switching from two 1.3V battery cells in series, for a system voltage of 2.6V, to one or two batteries in parallel, giving a system voltage of 1.3V or so. To reach a charging voltage of 2.6V i was going to up-convert my coil voltage to 5V with a boost converter, and use that to charge the batteries. Ive since changed all of that, and now charge my batteries directly from the coils at 1.3V. I still have a boost converter after the batteries, as all of my LED drive circuitry was designed for 5V operation.

What i'm hopping to do is remove the boost altogether, and just run everything off of a single cell voltage of 1.3V.  This is quite do-able, but will mean a re-design of the LED circuitry. Additionally, new parts need to be found that can operate with a 1V supply rail.

LTSpice simulation for my new oscillator
The first part to replace is the 555 Timer that i'm using as an oscillator. Its hard to find a version of this chip that can operate at such a low voltage. Additionally, i don't need all the capabilities of a 555, i just need an astable circuit. One of the simpleness ways to do this is with a Relaxation Oscillator, built using a comparator or an op-amp. Since i only have a single supply rail my circuit is slightly different than some. Ive basically just added a voltage divider (R1 and R2) to re-zero the input so that everything works as expected. This seems to work fine... so ill use it. The benefit here is that the MAX4289 op-amp that i'm using can run off of a 1V supply, while the 555 i was using needed 3V or so. Additionally, its much simpler.

Oscillator output, with the load varied between 100kOhms and 1kOhms
I tested the designed oscillator with a few loads, just to make sure that I wont have to add a buffer stage to its output. It looks like as I swept the load between 100kOhms and 1kOhms (13uA to 1.3mA) the oscillation frequency only changed slightly. This is OK, so ill just use the circuit as-is.

The rest of my logic (to make the LED's blink in two different patterns) can be slightly simplified, but ill use basically the same chips. Currently I'm using the NC7S family, which needs at least 3V supply voltage, so ill just switch to the NC7SP family of chips, which can run off of 0.9V. The revised schematic looks something like this,
New Schematic using 1V logic.
Here, the boost converter just drives the LED's, while everything else is 1V logic. To deal with this, i may also need to change the LED string switches (U7 and U9), so I'm ordering some low voltage MOSFET's just in case i need to replace the BJT's I'm using now.

I went ahead and modified the old layout as well, here is an updated version.
New layout to go with the new schematic.
Ive made a few important changes here:

  • There is only a single battery now, so the majority of the layout sits on top of this. This is about as small as this design will get as long as I'm using a AAA battery. 
  • The controlling switches have been moved to the LED board, so they will still be accessible if i decide to put the battery in the seat post as I've been planning.
  • Finally, the LED board itself has a new shape. I measured the back of my current bike seat, and if everything goes well this new shape should fit nicely between the rails at the back of the seat.

Thats about it. Ill send for the new board today and order the parts in the next few days. If all goes well i should get the new boards back next Monday or so.

Friday, November 18, 2011

Coil Voltage Rectification

Until today, I've setup my two power generation coils in series with a full wave rectifier connecting them to the batteries. Something like the schematic below:
Two Series Coils with a Full Wave Rectifier

This is an OK setup in most situations. It lets us harvest energy from both the positive and negative spikes of voltage in the coils. Additionally, the series coil setup is the only one that makes sense if the coils are not going to be excited by the magnetic field at the same time. So everything should work fine.

The issue is that the full wave rectifier means that the coil voltage is reduced by two diode forward voltage drops before its gets a chance to charge the batteries. These forward voltage drops are anywhere from 0.7-0.3V. I specifically chose my diodes to have a small voltage drop, but when you are only dealing with a 1.3V battery voltage, a voltage drop of about 0.5V is a big deal. So using a half wave rectifier may be a better choice. In this case, you only get to harvest the positive voltage spikes, but you get more out of them, as there is only a single diode drop. This setup would be something like this:
Two Series Coils With a Half Wave Rectifier

So i ran some tests today to compare the two approaches. My prototype board was setup originally to make these specific tests easy, so not too much work was involved. These tests where taken at what would be a decent pace on my bike. Here are the results.
Series Coils With a Full Wave Rectifier
Series Coils With a Half Wave Rectifier
It looks like either choice is OK. Although we are getting less frequent current spikes into the batteries with a half wave rectifier, we are getting much more current per spike (almost 18.5mA peak vs. 12mA peak), for a comparable average charging current (1.5mA vs. 1.45mA). Since the full wave rectifier needs larger voltages, it works better for charging at higher wheel speeds, while the half wave rectifier will charge at lower speeds. Apparently in the middle it doesn't matter. As i'm more likely to go slower on average around town rather than faster, ill change my coil setup to have a half wave rectifier.

An additional issue is the coil resistance. This was touched on in my last  post, but its practical implications where mostly ignored. I'm using very thin wire so i can get the size of my coils down while still using lots of turns. Thinner wire has a larger resistance per meter, and since i'm using so much thin wire, i end up with about 35Ohms of resistance per coil. In a series connection, the coil being excited by the magnets has to drive the resistance of the other coil, as well as the rectifier diodes. This means that as a magnet passes a coil, you end up with the situation seen below.
Equivalent Circuit During Coil Excitation 

Needless to say, this is not ideal. In addition to a voltage drop you have a relatively large resistor in the way. A better solution may be the one below.
Improved Half Wave Coil Setup
Originally i wasn't sure that a half wave vs a full wave was going to make much of a difference and i didn't want to put two full wave rectifiers on the board, so i ignored this setup. But since I'm going to use half wave rectifiers anyway... i thought i might as well give it a shot.
Two Coils With Dual Half Wave Rectifiers
With the same test as before, this setup behaves better. we are up to almost 2.5mA charging current, which is really quite good. Note that to set this up on my board, i inverted one of the coils, which is why it looks like I'm harvesting positive spikes from one coil and negative spikes from the other. This will probably be my final design for the coil rectifiers. I'm glad i took a look at this as the changes made almost doubled my available charging current.

Tuesday, November 15, 2011

Number of Turns, Revisited.

The number of turns that i estimated on the new coils doesn't seem quite right. which it probably isn't as for the most part its was a complete guess. I thought it may be interesting to put some bounds on this number and do some estimation, so here we go.

The bobbins that I'm using have a window area of about 44mm^2. This is a measure of how much area for copper the coil has. Here, its found by multiplying 4.3mm and 10.2mm. Since the wire i'm using has a diameter of 0.16mm, it has a cross sectional area of 0.02mm^2. This means that at most there could be 2200 turns on this bobbin, probably less. This would be the case if there where no air gaps in between wire, which is impossible as the wire is round. More reasonably, we could look at if the wire a lined up in a grid, each piece sitting on-top of each-other for the maximum airspace. this would give us about 1700 turns. So if i wrapped this perfectly, i would have between 1700 and 2200 turns per coil. Of course i didn't wrap this well, so it's probably much less than this.

When wrapping magnetics, people usually use a scale factor called the "fill factor", or "window utilization factor". This term approximates how much of the window area is actually filled with  copper, vs how much is filled with air due to gaps between turns. This is a percentage, where a fill factor of 0.9 means that 90% of the window area is used by copper, with the remaining 10% filled with air or insulation, etc. The fill factor can vary between about 0.05 for high voltage transformers with lots of isolation between wires, and about 0.5 for a simple hand wound inductor. Using special materials like a foil instead of wire (which rips all the time and is just horrible to work with), or square wire (which is a pain to wrap) can get this number up to about 0.65. For this coil, 0.3 is about the worst reasonable, which gives us 660 turns as a lower bound.

Putting this together, ill use 1700 as an unreasonable upper bound, and 660 as a lower bound. its a decently wide range, but lets me know that i have way more turns than i expected, which makes sense due to the much larger voltages that i was getting.

As a double check, we can measure the resistance of the wires. The inner winding radius is 6.2mm, while the outer is 10.5mm. This gives us an average of 8.35mm, which ill bump up to 9mm because if how things are wound on the bobbin. This leaves us with an average turn length (amount of wire used on each turn) of about 56mm. At room temperature, AWG34 wire has a resistance per meter of about 0.86Ohms. The coils i wound have resistances of 38.1Ohms, and 34.3Ohms, giving approximate number of turns of about 790 and 710 for the two coils. This makes sense, as one gives a slightly higher voltage spike than the other.

So that was fun.

New Coils - Finishing the Prototype

 The new coils for my prototype boards are finally done! Using two old PQ cores, i wrapped as many turns as i could of AWG34 wire. This should be about 4-500 turns based on some old tests, which should give me a reasonable voltage on the output. Using some old plexiglass that we have laying around, i'm going to make a coil holder to make the tests easier. The coils are in series, and i'm planning on placing them so that they are individually excited by the magnets.  Some old tests showed that  if they are excited at the same time, its hard to make sure they don't fight each other. So i'm hoping to avoid the issue altogether. heres a picture of the coil holder as i'm planning on cutting it out...
...and here is the final product... 
 In the end, ill use a laser cutter to get the right shape to mount this to my bike and make things a bit cleaner, but for now this is OK. The wire to the battery holders runs through this holder twice, mostly just to remove any strain on the connections when i'm moving this thing around. After adding some test-points which i initial forgot and fixing my diode rectifier which i messed up at first,  i was able to get some test results with the setup below.
The raw coil voltage is measured using a single ended passive probe, while the rectifier output is measured with an active differential probe. This is needed as the two sides of the rectifier have different ground references. Using a single ended probe on bot sides of the rectifier effectively shorts the grounds together through the scope. At high power levels, this doesn't make the scope happy, while at low power levels like in this circuit, it can simply mess-up the measured signals. Below, the coil voltage is seen in yellow, while the rectifier output is seen in purple.

Note that although the rectifier output says it has units of amps, it really is volts. (The diff probe i'm using doesn't like the scope i have, so the gains are messed up. Telling the scope your measuring current lets you fix this, just with the wrong units.) These waveforms are taken at about 6 or 7mph, and already we are getting 1-2V outputs! This is great, and really gives me more flexibility in the next revision. (The rectifier output is clamped at a bit above 1V, as its diode connected to the batteries. Voltages above this charge the batteries.) Additionally, you can see from the yellow coil voltage waveform that i placed the coils just barely to close together. It should be fine for now, but ill fix it eventually. you can also see that the first coil has a few more turns on it (higher spikes) than the second. This is also not an issue, and one i don't care about anyway as both voltages are high enough.

Next up, i need to make sure that the battery charging currents are reasonable, and then double check that i'm generating enough power with these coils to make this system self sustaining.

Monday, November 7, 2011

Complete First Revision

I finally got around to populating the boards. Everything seems to work well. The LED's are attached with a 12" wire, while the coil board is attached with a 6" wire. After a bit of trouble getting the correct blink frequency, it looks like this is a working bike light! I still need to do all the power measurements and such to make sure everything will work in the long run, but for now its nice to have a working board together.

I took a short video of the lights working, showing the different light modes. I balanced my phone on my coffee cup to get the video, hence the poor quality. In any case it does show things working.

Monday, October 24, 2011

Parts List - First Revision

I just put together a full parts list for this board revision. I should have just ordered parts when I ordered the boards, but I thought I had everything I'd need. Oops. It turns out that I still need the battery holders, some LED's ( i have no idea where all my leftover LED's are...) and the NPN switches to go with my PNP current regulators. Heres a short form of the parts list for the first revision... this is sure to change in the future.

  • 6x Schottky Diode (Fairchild MBR0520L)
  • 2x NiMH Batteries (Panasonic HHR-70AAAB8)
  • 2x AAA Battery Holder (Keystone 2466)
  • 1x Boost Converter (ON Semi NCP1402SN50T1G)
  • 1x 555Timer (Intersil ICM7555CBAZ-T)
  • 3x Logic Inverter (Fairchild NC7S04P5X)
  • 1x Logic "Or" (Fairchild NC7SZ32P5XCT-ND)
  • 2x Current Regulator (NXP Semi PSSI2021SAY,115)
  • 2x NPN Switch (NXP  Semi PDTC124XT,215)
  • 3x SPDT Slide Switches (APEM Components NK236WH)
  • 4x Red 1mA LEDs
  • Assorted Resistors (1x 5.3KOhm, 1x 10KOhm, 2x 620Ohm)
  • Assorted Capacitors (9x 10uF, 5x 1uF, 1x 0.56uF)
  • 1x Inductor (47uH, Sampled from Coilcraft MSS6132 Series)
Thats about it. The LED's will probably change to a surface mount with a shiny backplane to reflect light, and the three slide switches will change to a single multi state push-button or a single slide switch in the next revision. In total, the parts I don't have should cost about $5.40 plus shipping. Ill order tomorrow morning, and hopefully finish building the prototype boards this week.

PCB's - First Revision

The new boards came today! they look OK, ill get to building and testing when i have a bit more time. I may build it all on this one PCB first, but really its 3 parts,

  1. The main converter plus batteries. This is the large square on the right.
  2. The coil board, this is the small square with a notch in the lower left.
  3. The LED board, this is in the upper left, and has pads for just 4 LED's
I'm running low on some parts so ill have to wait a bit to finish populating this, but i should be able to test the coils and blink logic without much trouble.

Monday, October 17, 2011

Layout - First Revision

I finally finished the board layout for my first revision. It's split into three small boards. The first (lower left in the picture) is for the coils and the rectifier. It has some capacitance as well just  to smooth things out. I wanted to have the option of placing this circuitry next to the coils, instead of up with the batteries, as  it seems like a better idea to have a DC voltage travel from the rim to the seat rather than a pulsating voltage. The main portion, including the boost, the batteries, and the blink logic is on the right side of the image. One battery is on the top, with the other on the bottom. This gives a total area of 0.825"x2.0" or so for the main board. This small form factor isn't really needed for this first revision, but i wanted to see how easy this was going to be to layout the board small enough to fit in a seat post. The last board just has places for the four diodes. this is so i can test different cable lengths between the main board and the LEDs. Ill send this out for fabrication, and hopefully have a prototype soon.

Thursday, October 13, 2011

Schematic - First Revision

Ive come up with a first draft of the schematic. It uses mostly left over parts from other projects, so shouldn't cost that much to finally build. Unless i find a better way to build the first two stages of this generator, ill probably lay this out and get a PCB fabricated. Not all parts are defined (ill post a full parts list before i send out the PCB)  but some of the more important ones include

  • Boost Converter - NCP1402. sort of a random choice, this was the first reasonable boost IC that i found. If i decide to place the boost before the batteries again, ill design my own with the correct input impedance to get maximum power, based off of the plots i posted earlier.
  • Timer - ICM7555. This is an improved version of the regular 555 timer that people have been using for years. It has lower power draw, and most importantly i have some sitting around the lab.
  • Schottky Diodes - MBR0520L. Just a fast, low on voltage diode. One of the recommendations i got from the energy harvesting people.
  • Current Source - PSSI2021. A really simple chip that provides a constant current source. It implements one of the usual PNP current source circuits.
  • LED on/off switches - PDTC124XU. These are simple NPN switches, with some built in resistors. A recommended part from the current source datasheet. Eventually i may redo the LED drive circuitry to be a bit better, but for now this is OK. Eventually ill remove this and the previous part, and just design my own stage here. But for now these two IC's are easier to use.
Hopefully ill be able to get the layout done this weekend, and have a full working prototype by the end of next week. Then i can refine the power stage, find some better LED drive solutions if i need, and get a bike ready design within a few weeks.

Slight Redesign, Batteries, and a Boost


I decided to redesign the input stage. Ive placed the batteries in parallel, and the boost after the batteries instead of before them. The new battery voltage is 1.2v, which is fine for the boost and works well for direct charging off of the full bridge rectifier. I bought two 700mAh NiMH cells. If these are trickle charged at below 1/10 their max rate, (so 70mA), they can be continuously charged without hurting them or severely reducing their lifespans. With my input stage, 3mA is about max at this voltage (see the results from my last post), so i think this will work fine. I hooked up the boost after the batteries as well, and added a switch to turn it on and off.

Here the coils are seen charging the batteries (green waveform is battery current, positive is into the battery), then the boost comes on, (yellow waveform) and then switches back off. Blue is the battery voltage. Ill add a larger input filter to the boost later. Ive now got a decent 5v supply, that runs off of rechargeable batteries. These batteries are charged with a coil through a full bridge and filter. Now i just have to design the timing and logic circuits for the LEDs. Ill probably make a few modifications to the coil/rectifier circuit (Stage 1) and the boost (Stage 2) as well, just to increase efficiency, but what I have now is enough to build the rest of the circuit off of.

Tuesday, October 11, 2011

Output Power, First Tests



I took some first output power measurements today, at the suggestion of one of my lab mates. Things look fairly good i think. I took two sets of data, one with 4 magnets (magnet passes the coil every 27ms), and one with 8 magnets (magnet passes the coil every 13.5ms). As expected, this just increases the output power. Also interestingly, it seems like i may want to load the circuit heavier than i was going to, as i get better output power at about 2mA load. perhaps ill regulate to this current. Ill redo these plots for the final coil and rectifier design, so that i can achieve the maximum power point on my final design. On that note, i asked about the diodes that the energy harvesting people use, and they recommended some good ones. Ill order some, and see how much better they are.  These are good results! Its nice to know that this can actually drive a load.

Magnets

I'm waiting on some parts right now to build the next stage, so i thought id go over the magnets that i'm using while i wait. I'm using Neodymium disk magnets (Neodymium Iron Boron, generally Ne2Fe14B, to be precise). They are slightly larger than a dime, and quite strong. Neodymium was chosen both because is stronger than most (all) other magnets and because this type of magnet doesn't loose its strength when it gets knocked as easily as some other types.  This is the same type of magnet in most hard-drives.  They are also fairly light, and although relatively speaking they loose their magnetism at a low temperature with respect to other magnets, that temperature is still fairly high. (the Curie Temp is 590deg-F for mine. So probably high enough. Max operating temp of 176deg-F)

The 'Grade N42' number on the package tells us what material the magnets are made of, with higher grades generally corresponding to stronger magnets. The place i bought these from sells N35-N52 (in the 'normal' temperature range type), so Grade N42 (the one i got) is sort of middle of the road. This grade has a "Residual Flux Density" (another name for Remanence i believe), commonly Br,  of 1.3-1.32 Tesla.  Using this we can approximate the field density (or magnetic flux density) as we move away from the magnet, seen below. The surface field here (at distance = 0mm) matches nicely with the manufacturers data, which is comforting.

As we need large changes in magnetic field to generate power, from this plot we obviously want to keep the magnet as close to the coils as possible. Currently, i'm using a spacing of 1-2mm, which seems reasonable on a bike wheel. As the coils i'm using are not perfectly flat, (some windings are further away than others) ill use 7mm as my 'average' distance.

If we take one of the plots of the voltage generated by the coil passing a magnet,

we can integrate to get an idea of what the field strength (generally denoted by a capital 'Phi', sub 'b', measured in Webers (Wb), or magnetic flux) looks like to the coil as it passes.

This is sort interesting, and shows a max field strength of about  3.15uWb in each turn. The coils i'm using have a diameter between 1cm and1.5cm, so the magnetic flux density seen can be calculated to be about  30mT. This is a bit lower than what we would have expected from the ideal equations (about 50mT or so), but in the right area so i think its OK.

In any case, none of this is that important. The magnetic field plot is sort of neat but not that meaningful. You should just buy the strongest magnets you can, and then place your coils as close to them as possible.

Monday, October 10, 2011

A Voltage Source!

Just got a chance to throw a full wave rectifier and some caps onto the coils from before. This results in a nice 2v source at about 18mph. woot! startup transient seen above (yellow is cap voltage, 1v/div, 2s/div). The output voltage is proportional to the speed, so at about 25mph it hits 3 volts or so. this is OK. Ill add a protection Zener anyway, but i think these are good levels. Ill add a boost to this stage to get the voltage high enough, and then a current regulator to charge the batteries.

Some Initial Experiments

I took the first experimental results today. Using an old DC motor that we usually twist litz wire on, and a piece of scrap material i built a scale wheel. it has 4 magnets around the edge, oriented north-south-north-south. The coils used for these waveforms have 300 windings on the old PQ bobbins. There are two coils in series, which is sort of odd since they don't get excited by the magnetic field at the same time. But it seems to work. Each magnet is 24cm apart, so the first waveform is analogous to a 12mph ride, while the second is a 21mph ride, roughly. These numbers are mostly just important for the amplitude of the voltage spike. more magnets can be placed for more frequent spikes, but the velocity of the magnet as it passes the coil is (sort of) proportional to the spike amplitude (Faraday's law again.) Ill optimize for a 17-18mph ride, adjusting the magnet spacing and number of turns to suit my power output needs.

Sunday, October 9, 2011

Coil Prototypes

Found some old bobbins and coil formers to create the windings. The wire is #32 AWG. This is OK for the prototype, but for the final piece ill use much thinner wire and a better coil former (something that has a bit of a lower profile). Im using the larger wire for now as anything smaller than #32 is a pain to wrap, it just breaks to easily.


I wrapped a couple of test coils on the small coil formers. These have 50, 100, and 150 turns respectively. The voltage spikes caused by the coil passing the magnet should be proportional to the number of turns (Faradays Law -- special case with multiple coils of wire, Electromotive Force is equal to the number of turns times the time derivative of the magnetic flux. so... more turns is proportionally more EMF, if we keep the speed and distance between the coils and magnets the same. Electromagnetic Induction. ) These three coils should let me show this relation. Then i'll extrapolate the number of turns i need for the voltage spike amplitude i want. I think it will be quite a few more than 150 turns in the end.


 I built two prototypes, both with full bridge rectifiers on the outputs, and just a resistor (100Ohm) to load the circuit. The left prototype uses the 150 turn coil, while the right most one uses a new 300 turn coil made on an old PQ bobbin i found.  Im a bit worried about the voltage drops on the diodes, but ill test it tomorrow to see if this will work. If not, ill just use a single diode half wave rectifier. (The full bridge rectifier catches both positive and negative voltage spikes, but causes two diode forward voltage drops. As i'm dealing with low voltages, this may not be ok. A better option at this level, may be to just use a single diode. This will loose half the energy from the coils as only positive spikes can be harvested, but may be better overall. We'll see. Full Wave Rectification. ) The energy harvesting guys will be in on monday as well, so ill ask them if they have leftover rectifier diodes for low voltage applications. They should have just what i need.