The Prototype – Disco Bike Light Part 5

The disco bike light on its custom circuit board

Last week the printed circuit board for the Disco Bike Light project arrived.  This allowed me to move from my breadboard prototype circuit to the actual “form-factor” design.  If you’re not sure what the Disco Bike Light project is you can look through some of my older blog posts (here’s my last post). The short story is that I wanted to design a flashy, fun, multicolor bike light using an existing bike light’s enclosure.

[Read more…]

Detecting Taps with an Accelerometer: Disco Bike Light part 4

Tap Control of the Disco Bike Light

In last week’s blog I talked about looking into using an accelerometer output as a user interface for the Disco Bike Light design.  This week I took the next step of actually implementing a method of detecting taps with an accelerometer and using them as an on-off signal.

For a quick refresher, the Disco Bike Light is a design where I’ve decided to replace the guts of a Schwinn bike light with my own electronics. I wanted more color and more brightness.  I put some constraints on myself for the design.  One was that I couldn’t destroy the existing bike light in the process of making my new one.  For on/off/color control I was left with few options…

[Read more…]

Accelerometer as User Input Signal: Disco Bike Light Part 3


Welcome to another edition of “Disco Bike Light: adventures in electronic design”.  In last week’s blog I talked a little about the printed-circuit-board (PCB) design and the Lithium battery charging circuit.  This week I’ll touch more on the circuit board, and a little bit on the user interface.

[Read more…]

Phase Drive Not So Cool


A few weeks ago I posted about a design where I would try a motor drive technique called “phase-drive”.  You can read that post at Phase Drive a DC Motor.

In summary, “phase-drive” runs a motor at its stall point.  To stop the motor you run it 50% forward and 50% reverse, switching back and forth over short periods of time.  To move the motor forward you would begin increasing the forward percentage and decreasing the reverse percentage of the drive signal.  For example, 51% forward, 49% reverse is the slowest forward speed you could have.   100% forward and 0% reverse would be the fastest.  You might run the pulse-width-modulation (PWM) at around 15KHz to keep the switching sounds less audible, and update the forward/reverse percentage every millisecond.

This is hard on the circuit as well as the motor.  Why do this?  We had a customer that was running an ungeared motor in a position control system and the load was overpowering the torque the motor could provide.  Since it was a position control design there was no electrical “push” resisting the motor’s load when the system was “in position” (PWM was 0 when PID output was 0).  I wanted to see if this method could provide some resistance to the load by driving the motor even when it was in position.  The eventual solution was to use a geared motor, but I added circuitry to test the phase drive technique on our design out of curiosity.

In the end phase-drive did provide additional resistance to the load.  And if that was the end of it, I might have used it.  But I never really got to the point of quantifying how much better the load resistance was using phase-drive.  The motor was extremely hot to the touch after just 10-15 minutes of hitting it with phase drive.  Within a half hour of testing I was back at the solder station reconfiguring the board to drive it in the standard fashion.  Phase drive was just not cool.

What was cool was the H-bridge circuit we were using.  A pair of Infineon BTN8960TA high current half-bridges with some external spike protection components seemed to work very well  (there’s a schematic of the h-bridge on the post linked above).  The picture above shows the H-bridge portion of the circuit, top and bottom.  This circuit regularly drew 6-7A without generating any fault conditions or getting warm.  The BTN8960TA are rated for much more current than that, something like 30A.  However, thermal issues always seem to be the key to providing large currents to the load and you can see that our footprint for the design is pretty small. I was happy with the efficiency we got from the parts.  We used a 10-bit PWM drive signal with a period of 7.8KHz.

In fact, I liked the BTN8960TA so much that I had extra parts ordered so I could put them on a breakout module.  I’m looking forward to experimenting with these parts and using them in new designs.

Phase Drive a DC Motor


During the design of various motor control systems I’ve run into a few ICs that allow for a peculiar drive method.  I’ve seen it referred to as phase drive and direction drive.  I’ve never implemented it in a product that’s been produced, but lately I have decided to give it a shot.  The traditional method I’ve used for driving a DC motor in a closed-loop application is, simply stated, to drive it forward or reverse.  At a direction change the drive signal is typically small.  This is particularly true if you implement step limits on the PWM signals change from update-to-update.  Doing it this way reduces inductive voltage spikes from high speed reversals, saving your circuit from from death and destruction.

[Read more…]

Near Field Communication (NFC) with ST Micro CR95HF – Part 2


Near Field Communication (NFC) with ST Micro CR95HF.  A couple of weeks back I started working on a circuit board that holds ST Micro’s CR95HF NFC communication IC.  NFC stands for near field communication, and is basically an very short-range RF data link. Several communication protocol have been adopted for use with NFC hardware.

[Read more…]

Near Field Communication, NFC and the CR95HF


I started work on a Near Field Communication (NFC) module.  The design uses ST Micro’s CR95HF chip.   The module above is the first shot prototype unit.  This device uses a 13.56MHz RF carrier frequency and amplitude-shift keying .  The CR95HF carrier frequency powers the loop antenna shown on the module above and the resulting field couples with a similar loop antenna on an NFC enabled card.  The field coupling, like two loops of a transformer, powers the card.  Powering up the card allows the CR95HF to transmit data to and from NFC cards.  That’s the theory anyway.

[Read more…]

LSM303 Compass – Tilt Compensation


The LSM303 compass design makes use of our BM004 module and an Arduino Uno.  The code that converts the magnetic field reading from the IC to a heading is very simple.  However, adding tilt compensation is a little more difficult.

[Read more…]

Robotic Compass Blues


Whew!  Just spent a good four hours writing code that turned out to be pretty simple.  We sell the BM004 electronic compass that’s great for robotics.  But I got the robotic compass blues.

[Read more…]

LSM303DLHC Electronic Compass Module and the Arduino


Our BM004 breakout module is based on the ST Microelectronics LSM303DLHC.   The LSM303DLHC basically has two ICs embedded in its tiny plastic packaging.  They are a 3-axis accelerometer, and a 3-axis magnetometer.  Both devices are connected to an I2C interface and you access the functions of each by addressing different internal register addresses.

[Read more…]