Hello all,

 

I've got very good news, all the toys I built the Qi into work! These are the results so far, some mor info will follow:

 

Qi LEGO Power Functions Battery Brick

I'm very proud of this one; the Qi technology is completely embedded in the original LEGO power functions battery brick, from the exterior you can't see the difference. I had to sacrifice AA batteries to AAA batteries to make some room, but It's worth it, the solution is very elegant. The receiving coil is placed on one side of the brick, glued in the lid. The other side houses the electronics. All wiring is internal to the battery pack, I had to take it apart to get to the battery contacts without impairing the original circuitry. My greatest pleasure of this design is that the battery pack is COMPLETELY THE SAME from the outside!

Now I can drain the batteries, and just lay the brick on the charger to get a new charge instead of taking all the batteries out....

 

legobox1.jpg

Disassembled pack

legobox2.jpg

First test of wiring; wiring is too thick.

legobox3.jpg

Wiring between battery terminals and charger board

legobox4.jpg

Assembled! still need to solder Qi coil terminals

Qi Commander

The fun part of this design is that it charges 4 AA batteries! My design was meant to be charging 6 AA's, but by changing one resistor (voltage divider to bq2002) I was able to charge 4 AA's. So now my son's power hungry robot is Qi compliant! The battery compartment's lid had to be changed a little (2 small ribs removed), but then the complete design fit into it.

One thing I found out is that I get a higher charging current with this setup. I've looked into that fenomenon, and found an unexpected feature in my circuit. I guess I'll write a small article on that somewhere next week. For now: enjoy the pictures:

robo1.jpg

First charging test: 463mA.

robo2.jpg

Mounting of charging circuit in robot

 

The disadvantage of the current battery hatch is that it has all kinds of bulging structures (pretending to be sci-fi / high tech things as air ducts or control panels) that make it harder to get it to work on the charging pad. However, in DOES work, and WHEN the connection is made, it charges reliably.

 

Qi LEGO Train

Now this is the part of the project that I was hoping to be able to finish when I started: making a Qi-charging LEGO train!

My purpose was to make a train that was able to charge itself when its batteries run low. When I was sure my LEGO charging circuit was working, I started combining it with my OpenPowerFunctions infrared receiver.

On this receiver I already had a microcontroller and motor control. In its original functionality, this infrared receiver just responds to commands sent by LEGO remotes, and then controls the appropriate motor driver channels to go forward or backward in the desired speed. I now added a resistor divider to the receiver to read out the voltage of the battery pack, and when that voltage is too low, the receiver ignores all incoming remote control commands, and starts driving to seek the charger coil.

Now how does it know when the charging coil is right under the receiver coil? This appeared to be a very difficult question to answer. The train runs quite slow when trying to discover the coil, but even then only a fraction of a second delay means the train passes by its target. The Qi receiver IC itself only enables its outputs after about a second of Qi connection, so that is too slow. I then thought of using the magnet in the charging coil in combination with a Hall sensor to signal to the microcontroller that a magnet had been detected. I soldered the Hall sensor, but even now the detection was not in time. The magnet was detected, but the inertia of a 3-wagon train was too large to stop in time. In the end I used tape and a spare magnet I had lying  around at Tkkrlab to give the receiver an earlier warning. This worked quite reliably. I could suggest two major improvements to the current setup:

  1. Use TI's multi-coil transmitter (bq500410a) to get a larger surface where the train can be charged. The positioning is now more sensitive than wished for.
  2. The 'low battery detection' is now based on battery voltage, whereas it should be on the availability of energy; when you start pulling a lot of current (stalling the train motor, or issuing a 'full on' command while the train is standing still) the voltage drops, and this is seen as 'battery empty'. When you leave the train on the rails, but do not ride the voltage will remain quite high for a long time. When the voltage drops below the treshold, the available charge is nihil. A fuel guage like BQ2060ABQ2060A will yield more reliable results in telling what the available State of Charge is.

Nevertheless: Great fun in building this system! Videos will follow....

 

trein1.jpg

Transmitter, battery pack, Qi charger, IR receiver

trein2.jpg

Train built together; IR receiver visible

trein3.jpg

Illustration of setup in action

trein4.jpg

Receiver coil, Hall sensor (with a lot of tape)

trein5.jpg

Transmitter coil in rails, with extra magnet for positioning