❌

Normal view

There are new articles available, click to refresh the page.
Before yesterdayKA7OEI's blog

Modifying an "O2-Cool" battery fan to (also) run from 12 volts

By: KA7OEI
19 July 2023 at 07:05

A blog posting about a fan?Β  Really?

Why not!

Figure 1:
The modified fan on my cluttered workbench, running
from 13 volts.
The external DC input plug is visible on the lower left.
Click on the image for a larger version.

This blog post is less about a fan, but is more of example of the use of a low-cost buck-type voltage converter to efficiently power a device intended for a lower voltage than might be available - in this case, a device (the fan) that expects 3 volts.Β  In many cases, "12" volts (which may be anything from 10 to 15 volts) will be available from an existing power source (battery, vehicle, power supply) and it would be nice to be able to run everything from that one power bus.

Background

Several years ago I picked up a 5" battery-operated DC fan branded "O2 Cool" that has come in handy occasionally when I needed a bit of airflow on a hot day.Β  While self-contained, using two "D" cells - it can't run from a common external power source such as 12 volts.

Getting 3 volts

Since this fan uses 3 volts, an obvious means of powering it from 12 volts would be to simply add a dropping resistor - but I wasn't really a fan of this idea (pun intended!) as it would be very wasteful in power and since doing this would effectively defeat the speed switch - which, itself is just a 2.2 ohm resistor placed in series with the battery when set to "low".

The problem is that the fan itself pulls 300-400 mA on high speed.Β  If I were to drop the voltage resistively from 12 volts (e.g. a 9 volt drop) - and if we assume a 300mA current - we would need to add (9/0.3 = ) 30 ohms of series resistance to attain the same speed on "high" as with the battery.Β  The "low speed" switch inserts a 2.2 ohm resistor, and while this works with its original 3 volt supply, adding this amount to 30 ohms would result in a barely noticeable difference in speed, effectively turning it into a single-speed fan.Β  By directly supplying the fan with something close to the original voltage, we preserve the efficacy of the high/low speed switch.

Fortunately, there's an answer:Β  An inexpensive buck converter board.Β  The board that I picked - based on the MP1584 chip - is plentiful on both EvilBay and Amazon, typically for less than US$2 each.Β  These operate at a switching frequency of about 1 MHz and aren't terribly prone to cause radio interference, having also been used to power 5 volt radios and even single-board computers (such as the Raspberry Pi) from 12 volts without issues.

These buck converters can handle as much as 24 volts on the input and provide up to 3 amps output - more than enough for our purpose - and can also be adjusted to output about any voltage that is at least 4 volts lower than the input voltage - including the nominal 3 volts that we need for the fan.

An additional advantage is the efficiency of this voltage conversion.Β  These devices are typically 80% efficient or better meaning that our 300 mA at 3 volts (about 0.9 watts of power) would translate to less than 100mA at 12 volts (a bit more than a watt).Β  Contrast this to the hypothetical resistive dropper discussed earlier where we would be burning up nearly 3 watts in the 30 ohm resistor by itself!

Implementation

One of my goals was to retain the ability of this fan to run at 3 volts as it would still be convenient to have this thing run stand-alone from internal power.Β  Perhaps overkill, but to do this I implemented a simple circuit using a small relay to switch to the buck converter when external power was present and internal power when it was not, rather than parallel the buck converter across the battery.

If I never intended to use the internal "D" cells ever again I would have dispensed with the relay entirely and not needed to make the slight modifications to the switch board mentioned below.Β  In this case I would have had plenty of room in the case and freedom to place the components wherever I wished.Β  In lieu of the ballast of the battery to hold the fan down and stable, I would have placed some weight in the case (some bolts, nuts, random hardware, rocks) to prevent it from tipping over.

The diagram of this circuitry is shown below:

Figure 2:
Diagram of the finished/modified fan.
On the left, J1 is the center-positive coaxial power connector with diode D1 and self-resetting
resetting thermal fuse F1 to protect against reverse polarity.Β  The relay selects the source of power.
Click on the image for a larger version.

The original parts of are the High/Low switch, the battery and the fan itself on the right side of the schematic with the added circuits being the jack (J1), the self-resetting fuse (F1), D1, R1, the buck converter and the relay (RLY).

How it works:

When no external power is applied, the relay (RLY) is de-energized and via the "NC" (Normally-Closed) contacts, the battery is connected to the High/Low switch and everything operates as it originally did.

External power is applied via "J1" which is a coaxial power jack, wiring the center pin as positive:Β  The connector that I used happens to have a 2.5mm diameter center pin and expects an outer shell diameter of 5.5mm.Β  There's nothing special about this jack except that I happen to have it on-hand.

When power is applied, the relay is energized and the high/low switch is disconnected from the battery but is now connected, via the "NO" (Normally Open) contacts, to the OUT+ terminal of the buck converter.Β Β 

Ideally, a small 12 volt relay would be used, but the smallest relay that I found in my junk box was a 5 volt unit, requiring that the coil voltage be dropped.Β  Measuring the relay coil's resistance as 160 ohms, I knew that it required about 30 mA (5/160 = 0.03) and if we were to use 12 volts, we'd need to drop (12 - 5 =) 7 volts.Β  The resistance needed to drop 7 volts is therefore (7/0.03 = ) 233 ohms - but since I was more likely to operate it from closer to 13 volts much of the time I chose the next higher standard value of resistance, 270 ohms to put in series for R1.

Figure 3:
Modification of the switch board.Β  The button is
the positive battery terminal and traces are cut to
isolate it to allow relay switching.
Click on the image for a larger version.
The diode D1 is a standard 1 amp diode - I used a 1N4003 as it was the first thing that I found in my parts bin, but about any diode rated for 1 amp or greater could be used, instead.Β  Placing it in reverse-bias across the input of the buck converter means that if the voltage was reversed accidentally, it would conduct, causing the self-resetting thermal fuse F1 to "blow" and protect the converter.Β  I chose a thermal fuse that has several times the expected operating current so I selected a device that would handle 500-800 mA before it would open.

Modification to the switch board

The High/Low switch board also houses the positive battery contact, but since it is required that we disconnect the battery when running from external power, a slight modification is required, so a few traces were cut and a jumper wire added to isolate the tab that connects to the positive end of the battery as seen in Figure 3.

Figure 4:
The top of the board battery board. The
connection to the Batt+ is made by soldering to
the tab.
Click on the image for a larger version.
Near the top of the photo in Figure 3 we see that the trace connecting end of the 2.2 ohm resistor has been separated from the battery "+" connector (the round portion) and also along the bottom edge where it connects to the switch.Β  Our added jumper wire then connects the resistor to the far end of the switch where the trace used to go and we see the yellow wire go off to the "common" contact of the relay.

In Figure 4 we can see the top of the board with the 2.2 ohm resistor - but we also see the wire (white and green) that connects to one of the tabs for the Battery + button on the bottom of the board:Β  The wire was connected on this side of the circuit board to keep it out of the way round battery tab and the "battery +" connection.

The mechanical parts

For a modification like this, there's no need to make a circuit board - or even use prototyping boards.Β  Because we are cramming extra components in an existing box, we have to be a bit clever as to where we put things in that we have only limited choices.

Figure 5:
Getting ready to install the connector after
a session of drilling and filing.
Click on the image for a larger version.
In the case of the coaxial power connector, there was only one real choice for its location:Β  On the side opposite the power switch, near the front, because if it were placed anywhere else it would interfere with the battery or with the fan itself as the case was opened.

Figure 5 shows the location of this connector.Β  Inside the box. this is located between two bosses and there is just enough room to mount it.Β  To do this, small holes were drilled into the case at the corners of the connector and a sharp pair of flush-cut diagonal nippers were used to open a hole.Β  From here it was a matter of filing and checking until the dimensions of the hole afforded a snug fit of the connector.

Figure 6:
A close-up of the buck converter board with the
attached wires and BATT- spring terminal.
The tiny voltage adjustment potentiometer is
visible near the upper-left corner of the board.
Click on the image for a larger version.
Wires were soldered to the connector before it was pressed into the hole and to hold it in place I used "Shoe Goo" - a rubber adhesive - as I have had good luck with this in terms of adhesion:Β  I could have used cyanoacrylate ("Super" glue) or epoxy, but I have found that the adhesive bonds of these tend to be a bit more brittle with rapid changes of temperature, mechanical shock or - most applicable here - flexing - something that the Shoe Goo is meant to do.

Because this jack is next to the battery minus (-) connector, a short wire was connected directly to it, and another wire was run to the location - in the adjacent portion of the case - where the buck converter board would be placed.

Figure 6 shows the buck converter board itself in front of the cavity in which it will be placed, next to the negative battery "spring" connector.Β  Diode D1 is soldered on the back side of this board and along the right edge, the yellow self-resetting fuse is visible.Β  Like everything else the relay was wired with flying leads as well, with resistor R1 being placed at the relay for convenience.

Figure 7:
The relay, wired up with the flying leads.
Click on the image for a larger version.

Figure 7 shows the wiring of the relay.Β  Again, this was chosen for its size - but any SPDT relay that will fit in the gap and not interfere mechanically with the battery should do the job.

The red wire - connected to the resistor - comes from the positive connector on the jack and the "IN+" of the buck converter board - the orange wire is the common connection of the High/Low switch, the white/violet comes from the "OUT+" of the buck converter and goes to the N.O. (Normally Open) contact on the relay, the white/green goes to the N.C. (Normally Closed) relay contact and the black is the negative lead attached to the coil.

Everything in its place

Figure 8 shows the internals of the fan with the added circuitry.Β  Shoe Goo was again employed to hold the buck converter board and the relay in place while the wires were carefully tucked into rails that look as though they were intended for this!

Now it was time to test it out:Β  I connected a bench power supply to the coaxial connector and set the voltage of my external test power supply at 10 volts - enough to reliably pull in the relay - and set the fan to low speed.Β  At this point I adjusted the (tiny!) potentiometer on the buck converter board for an output of 3.2 volts - about that which could be expected from a very fresh pair of "D" cells.

Figure 8:
Everything wired and in its final locations.Β  On the far left is
the switch board.Β  To the left of the hinge is the relay with the
buck converter on the right side of the hinge.Β  The jack and
negative battery terminal is on the far right of the case.
Click on the image for a larger version.
The result was a constant fan speed as I varied the bench supply from 9 to 18 volts indicating that the buck converter was doing its job.

The only thing left to do was to make a power cord to keep with the fan.Β  As is my wont, I tend to use Anderson Power Pole connectors for my 12 volt connections and I did so here.

As I also tend to do, I always attach two sets of Anderson connectors to the end of my DC power cords - the idea being that I would not "hog" DC power connections and leave somewhere to plug something else in.Β  While the power cord for the fan was just 22 gauge wire, I used heavier wire (#14 AWG) between the two Anderson connectors so that I could still run high-current devices.

* * *

Does it work?

Of course it does - it's a fan!

The relay switches over at about 8.5 volts making the useful voltage range via the external connector between 9 and 16 volts - perfect for use with an ostensibly "12 volt" system where the actual voltage can vary between 10 and 14 volts, depending on the battery chemistry and type.

Figure 9:
The fan, folded up with power cord.
The two connectors and short section of heavy
conductor can be just seen.
Click on the image for a larger version.

Without the weight of the two "D" batteries, the balance of the fan is slightly precarious and prone to tip forward slightly, but this could be fixed by leaving batteries in the unit - but this is not desirable for long-term storage as leakage is the likely result.

Alternatively, one may place some ballast in the battery compartment (large bolt wrapped in insulation, a rag, paper towel, etc.) or simply by placing something (perhaps a rock or two) on the top.Β  Alternatively, since the fan is typically placed on a desktop, it is often tilted slightly upwards and that offsets the center of gravity in our favor and this - plus the thrust from the airflow - prevents tipping.


This page stolen from ka7oei.blogspot.com


[End]


Making a "Word Metronome" for pacing of speech

By: KA7OEI
31 August 2022 at 01:32

Figure 1:
The completed "Word Metronome".Β  There are two recessed
buttons on the front and the lights on on the left side.
Click on the image for a larger version.
One of the things that my younger brother's job entails is to provide teaching materials - and this often includes some narration.Β  To assure consistency - and to fall within the required timeline - such presentations must be carefully designed in terms of timing to assure that everything that should be said is within the time window of the presentation itself.

Thus, he asked me to make a "word metronome" - a stand-alone device that would provide a visual cue for speaking cadence.Β  The idea wasn't to make the speech robotic and staccato in its nature, but rather providing a mental cue to provide pacing - something that is always a concern when trying to make a given amount of material fit in a specific time window:Β  You don't want to go too fast - and you certainly don't want to be too slow and run over the desired time and, of course, you don't want to randomly change your rate of speech over time - unless there's a dramatic or context-sensitive reason to do so.

To be sure, there are likely phone apps to do this, but I tend to think of a phone as a general-purpose device, not super-well suited for most of the things done with it, so a purpose-built, simple-to-operate device with visual indicators on its side that could just sit on a shelf or desk (rather than a phone, which would have to be propped up) couldn't be beat in terms of ease-of-use.

Circuitry:

The schematic of the Word Metronome is depicted in Figure 2, below:

Figure 2:
Schematic of the "Word Metronome"
(As noted in the text, the LiIon "cell protection" board is not included in the drawing).
Click on the image for a larger version.

This device was built around the PIC16F688, a 14 pin device with a built-in oscillator.Β  This oscillator isn't super-accurate - probably within +/-3% or so - but it's plenty good for this application.

One of the complications of this circuit is that of the LEDs:Β  Of the five LEDs, three of them are of the silicon nitride "blue-green" type (which includes "white" LEDs) and the other two are high-brightness red and yellow - and this mix of LED types poses a problem:Β  How does one maintain consistent brightness over varying voltage.

As seen in Figure 3, below, this unit is powered by a single lithium-ion cell, which can have a voltage ranging from 4.2 volts while on the charger to less than 3 volts when it is (mostly) discharged.Β  What this means is that the range of voltage - at least for the silicon nitride types of LEDs - can range from "more than enough to light it" to "being so dim that you may need to strike a match to see if it's on".Β  For the red and yellow LEDs, which need only a bit above two volts, this isn't quite the issue, but if one used a simple dropping resistor, the LED brightness would change dramatically over the range of voltages available from the battery during its discharge curve.

As one of the goals of this device was to have the LEDs be both of consistent brightness - and to be dimmable -Β  a different approach was required - and this required several bits of circuity and a bit of attention to detail in the programming.

The Charge Pump:

Perhaps the most obvious feature of this circuit is the "Charge Pump".Β  Popularized by the well-known ICL7660 and its many (many!) clones, this type of circuit may also be driven by a microcontroller and implemented using common parts.Β  Like its hardware equivalent, it uses a "flying capacitor" to step up the voltage - specifically, that surrounding Q1 and Q2.Β  In software - at a rate of several kHz - a pulse train is created, and its operation is thus:

  • Let is start by assuming that pin RC4 is set high (which turns off Q1) and pin RA4 is set low (which turns off Q2.)
  • Pin RA4 is set high, turning on Q2, which drags the negative side of capacitor C2 to ground.Β  This capacitor is charged to nearly the power supply voltage (minus the "diode drop") via D1 when this happens.
  • Pin RA4 is then set low and Q2 is turned off.
  • At this point nothing else is done for a brief moment, allowing both transistors to turn themselves off.Β  This very brief pause is necessary as pulling RC4 low the instant RA4 is set low would result in both Q1 and Q2 being on for an instant, causing "shoot through" - a condition where the power supply is momentarily shorted out when both transistors are on, resulting in a loss of efficiency.Β  This "pause" need only be a few hundred nanoseconds, so waiting for a few instruction cycles to go by in the processor is enough.
  • After just a brief moment pin RC4 is pulled low, turning on Q1, which then drags the negative side of C2 high.Β  When this happens the positive side of C2 - which already has (approximately) the power supply voltage is listed to a potential well above that of the power supply voltage.
  • This higher voltage flows through diode D3 and charges capacitor C4, which acts as a reservoir:Β  This voltage on the positive side of C4 is now a volt or so less than twice the battery voltage.
  • Pin RC4 is then pulled high, turning of Q1.
  • There is a brief pause, as described above to prevent "shoot through", before we set RA4 high and turn Q2 on for the next cycle.

It is by this method that we generate a voltage several volts higher than that of the battery voltage, and this gives us a bit of "headroom" in our control of the LED current - and thus the brightness.

Current limiter:

Transistors Q3 and Q4 form a very simple current limiter:Β  In this case it is "upside-down" from the more familiar configuration as it uses PNP transistors - something that I did for no particular reason as the NPN configuration would have been just fine.

Figure 3:
Inside the "Word Metronome".Β  The 18650 LiIon cell is on
the right - a cast-off from an old computer battery pack.Β  The
buttons on the board are in parallel with those on the case and
were used during initial construction/debugging.
Click on the image for a larger version.

This circuit works by monitoring the voltage across R3:Β  If this voltage exceeds the turn-on threshold of Q3 - around 0.6 volts - it will turn on, and when this does it pulls the base voltage, provided by R5, toward Q4's emitter, turning off Q3.Β  By this action, the current will actually come to equilibrium at that which results in about 0.6 volts across R3 - and in this case, Ohm's law tells us that 0.6 volts across 47 ohms implies (0.6/47=0.0128 amps) around 13 milliamps:Β  At room temperature, this current was measured to beΒ  a bit above 14 milliamps - very close to that predicted.

With this current being limited, the voltage of the power supply has very little effect on the current - in this case, that through the LEDs which means that it didn't matter whether the LED was of the 2 or 3 volt type, or the state-of-of charge of the battery:Β  The most that could ever flow through an LED no matter what was 14 milliamps.

With the current fixed in this manner, brightness could be adjusted using PWM (Pulse Width Modulation) techniques.Β  In this method, the duty cycle ("On" time) of the LED is varied to adjust the brightness.Β  If the duty cycle is 100% (on all of the time) the LED will be at maximum brightness, but if the duty cycle is 50% (on half of the time) the LED will be at half-brightness - and so-on.Β  Because the current is held constant, no matter what by the current limiter circuit, we know that the only think that affects brightness of the LED is the duty cycle.

LED multiplexing:

The final aspect of the LED drive circuitry is the fact that the LEDs are all connected in parallel, with transistors Q5-Q9 being used to turn them on.Β  When wiring LEDs in parallel, one must make absolutely sure that each LED is of the exact-same type or else that with the lowest voltage will consume the most current.

In this case, we definitely do NOT have same-type of LEDs (they are ALL different from each other) which means that if we were to turn on two LEDs at once, it's likely that only one of them would illuminate:Β  That would certainly be the case if, say, the red and blue LEDs would turn on:Β  With the red's forward voltage being in the 2.5 volt area, the voltage would be too low for the green, blue or white to even light up.

What this means is that only ONE LED must be turned on at any given instant - but this is fine, considering how the LEDs are used.Β  The red, yellow or green are intended to be on constantly to indicate the current beat rate (100, 130 or 160 BPM, respectively) with the blue LED being flashed to the beat (and the white LED flashing once-per-minute) - but by blanking the "rate" LED (red, yellow or green) LED when we want to flash the blue or white one, we avoid the problem altogether.

Battery charging:

Not shown in the schematic is the USB battery charging circuit.Β  Implementing this was very easy:Β  I just bought some LiIon charger boards from Amazon.Β  These small circuit boards came with a small USB connector (visible in the video, below) and a chip that controlled both charging and "cell protection" - that is, they would disconnect the cell if the battery voltage got too low (below 2.5-2.7 volts) to protect it.Β  Since its use is so straightforward - and covered by others - I'm only mentioning it in passing.

Software:

Because of its familiarity to me, I wrote the code for this device in C using the "PICC" compiler by CCS Computer Systems.Β  As it is my practice, this code was written for the "bare metal" meaning that it interfaces directly with the PIC's built-in peripherals and porting it to other platforms would require a bit of work.

The unit is controlled via two pushbuttons, using the PIC's own pull-up resistors.Β  One button primarily controls the rate while the other sets the brightness level between several steps, and pressing and holding the rate button will turn it off and on.Β  When "off", the processor isn't really off, but rather the internal clock is switched to 31 kHz and the charge pump and LED drivers are turned off, reducing the operating current of the processor to a few microamps at most.

Built into the software, there is a timer that, if there is no button press within 90 minutes or so, will cause the unit to automatically power down.Β  This "auto power off" feature is important as this device makes no noise and it would be very easy to accidentally leave it running.

Below is a short (wordless!) video showing the operation of the "Word Metronome" - enjoy!

Β 


This page stolen from ka7oei.blogspot.com

[END]


❌
❌