Introduction: The Heart of a Machine (A Laser Micro-Projector)

About: I am a hobbyist with an interest in open-source software, 3D printing, science and electronics. Please visit my store or Patreon page to help support my work!

This Instructable is the spiritual successor to an earlier experiment where I built a dual-axis mirror laser steering assembly from 3D printed parts and solenoids.

This time I wanted to go tiny and I was fortunate enough to find some commercially made laser steering modules from an online scientific surplus outlet. My design started to resemble a Dalek, so I ran with the idea and made a two-inch high Dalek-inspired bot that shoots lasers at you.

But it's not trying to exterminate you—it's just sending you some love from its electro-mechanical heart!

If you like this project, please vote for it in the Optics Contest! :)

Step 1: Something Small From the State of Texas

The heart of the machine is a TALP1000B module from Texas Instruments, which is described as a “dual-axis analog MEMS pointing mirror.” This is quite a mouthful, so let us break it down:

  • Dual-axis: This means that the device can tilt in the horizontal and vertical axis.
  • Analog: The tilt along an axis is controlled by an analog voltage, varying from -5 to 5 volts.
  • MEMS: This stands for Micro Electrical Mechanical System and it means it is very tiny!
  • Pointing mirror: At the center of the device is a mirror on gimbals; the mirror can be pointed a few degrees in each direction, allowing it to direct laser anywhere within a cone of a few degrees.

A quick browse through the datasheet shows that this is a sophisticated part. In addition four steering coils, there is a light emitter, four position sensors and a temperature sensor. Although we won't be using the sensors, later on I'll share some gorgeous photos of a damaged TALP1000B up close.

The TALP1000B is discontinued, but you can't find it, you could build a much larger laser pointing mirror yourself using the plans I set out in my earlier Instructable: the principles are exactly the same, but you'd need to build a life-sized Dalek to house it!

Step 2: Bill of Materials

The following is the bill of materials for this project:

The TALPB module is the hardest to find. I got lucky and picked up a few at a scientific surplus outlet.

You may still find a TALPB online at exorbitant prices, but I do not recommend spending much money on them for the following reasons:

  • They are ridiculously fragile, you may need several in case you break some.
  • They have a low-ish resonant frequency of 100Hz, which means you can't drive them fast enough for flicker-free laser shows.
  • They have a gold plated surface, which means it only reflects red lasers. This rules out using super-bright green lasers or violet lasers with glow-in-the-dark screens for persistence.
  • While these parts do have position sensors, I don't think an Arduino is fast enough to drive them with sort of positional feedback.

My opinion is that while these parts are incredibly small and accurate, they don't seem to be practical enough for hobby projects. I would prefer to see the community come up with better DIY designs!

Step 3: The Making of the Body

I modeled the body in OpenSCAD and 3D printed it. It is a truncated cone with an opening on the top, a slot on the back for inserting the TALB1000P module and a big gaping light-hole in the front.

You shine a laser in from above and it is reflected out the front. This 3D printed body not only looks cool, but it is also functional. It keeps everything aligned and houses the ridiculously fragile TALB1000P module. I added the ridges and bumps to make it easier to grip after I dropped an early prototype and destroyed a TALB1000P module.

Step 4: The Many Ways to Break a Heart

The TALP1000B is an extremely fragile part. A short fall or a careless touch will wreck the part (touching it accidentally is how I destroyed my second module). It is so fragile that I suspect even a strong glance might kill it!

If physical dangers were not enough, the datasheet spells out an additional danger:

Be careful to avoid start stop transients when starting or stopping the sinusoidal drive voltage. If one
sets the 50Hz drive power to a voltage that produces a large 50 Hz mirror rotation (4 to 5 degrees mechanical motion) then the mirror will operate for many thousands of hours without problem.

However, if one powers the sine drive power supply down or up at a time when the voltage output is significant, then a voltage step occurs that will excite the mirror’s resonance and can result in quite large rotation angles (enough to cause the mirror to hit the ceramic circuit board which serves as a rotation stop).

There are two ways to avoid this: a) power up or down only when the drive voltage is near zero (shown in the drawing below), b) reduce the amplitude of the sine drive before powering up or down.

So, basically, even turning off the darn power can wreck it. Oh vey!

Step 5: The Pacemaker Circuit

The driver circuit I made for it consists of an Arduino Nano and dual-channel motor driver.

Although motor drivers are made for motors, they can drive magnetic coils just as easily. When hooked up to a magnetic coil, the forward and reverse functions of the driver cause the coil to be energized in either the forward or reverse directions.

The coils on the TALP1000B require up to 60mA to function. This is beyond the maximum 40mA that the Arduino can provide, so the use of a driver is essential.

I also added a trim pot to my design and this allows me to control the amplitude of the output signal. This allows me to dial down the drive voltages to zero prior to turning powering off the circuit, to avoid the resonances the datasheet warned me about.

Step 6: A Driver That Won't Work... and One That Does!

To verify that my circuit was outputting a smooth waveform, I wrote a test program to output a sine wave on the X axis and a cosine on the Y axis. I hooked up each output of my drive circuit to a bi-polar LEDs in series with a 220 ohm resistor. A bi-polar LED is a special kind of two-terminal LED that shines one color when the current flows in one direction and another color when the current flows in the opposite direction.

This test rig allowed me to observe the color changes and ensure there were no rapid changes in color. Right off the bat, I observed bright flashes as one color faded out and before the other color was about to fade in.

The problem was that I had been using a L9110 chip as the motor driver. This driver has a PWM speed pin and a direction pin, but the duty-cycle of the PWM speed control signal in the forward direction is the inverse of the duty-cycle in the reverse direction.

To output zero when the direction bit is forward, you need a 0% PWM duty-cycle; but when the direction bit is reverse, you need a PWM duty-cycle of 100% for an output of zero. This means that for the output to remain zero during a direction change, you must change both the direction and PWM value at once—this cannot happen simultaneously, so no matter what order you do it in, you get voltage spikes while transitioning from negative to positive through zero.

This accounted for the flashes I had saw and the test circuit probably saved me from having destroyed another TALB1000B module!

A SparkFun motor driver saves the day!

Finding that the L9110 was a no go, I decided to evaluate the SparkFun Motor Driver - Dual TB6612FNG (which I had won in an earlier Instructable! Woot!).

On that chip, a PWM on the speed control pin of 0% means the outputs are driven at 0%, regardless of the direction. The TB6612FNG has two direction control pins that must be flipped to reverse the direction, but with the PWM pin at a duty-cycle of zero, it is safe to do so via an intermediate state in which both In1 and In2 are HIGH—this puts the driver into an intermediate "short brake" mode that does energize the coils in any way.

With the TB6612FNG, I was able to get smooth polarity transition past zero without any flashes. Success!

Step 7: Running the Arduino Sketch and Performance Testing

Shine a laser onto the TALP1000B from the opening on the top and make sure you can see the dot on a wall or projection screen.

Turn the trimpot down as low as it will go before plugging in the Nano, to protect the TALP1000B against any excessive vibrations (I highly recommend verifying your circuit with some LEDs as described earlier).

Now, plug in the USB cable and upload the Arduino sketch to your Arduino Nano.

Gradually turn up the trimpot and watch for a motion on the laser dot. Increase it gradually, watching for any signs of problems. If one of the axis are reversed, it means the leads to the coils are reversed.

IMPORTANT: Prior to powering off the Nano, uploading new code, or disconnecting the drivers, turn the trimpot all the way down to zero and make sure the TALP1000B is absolutely still. This will help protect it from damage!

A study into the effect of increasing drawing rates

The animation shows the effect of increasing the drawing rate from 1.95 frames per second to 13.95 frames per second using the exact same heart shape.

These images were captured with the FasterDriver.ino code that uses pre-computed data and other tricks to allow the Arduino to drive the PWM outputs much faster. Unfortunately, the TALP1000B exhibits all sort of resonances that make it unusable beyond four or so frames per second. I had expected far better performance from this commercial module than my DIY apparatus, but it doesn't appear to be any better!

Step 8: An Anatomy of a Broken Heart

Here are some pictures of a broken TALP1000B module!

Underneath the plate, you see there is a light emitting diode as well as four position sensors. They appear quite large, as if they were small solar cells. It looks like the position sensors work by picking up reflected light from the central LED element. Presumably the closer the gimbal is to the point, the less light the sensor receives.

The gimballed mirror itself is quite interesting. It appears to be etched out of a single plate and has a total of eight very tiny ceramic magnets, two on each side of the North/South and East/West axis. These are pulled and repelled by the coils on the opposite side of the board. It's a relatively simple design and not much different from what I did with my home-made laser steering module.

All micro shots in this Instructable were taken either on a iPhone with a plastic lens (easy macro) or an inexpensive portable LCD digital microscope. I hope you enjoy them!