Lab-grade LED controller/driver: Part 1

This all started when I started looking into optical adhesives for work.  When you need to glue something that needs very precise positioning UV-curing adhesives are the way to go.   This is especially true for optics.

Of course if you’re going to use a UV-curing adhesive, you need a source of UV light to cure it.  There are a number of commercial devices out there, and they range from inexpensive hoods with UV lamps that put out a couple of watts over a large area, and much more expensive devices that put out a couple hundred milliwatts over a very small area.  Either one can work, but if you want to be able to cure only small areas at a time when dealing with a complex assembly, you need one of the more precise systems, which typically start at around a kilobuck for a pretty basic pen-style emitter, and go up from there.  These typically have nice things like adjustable power and exposure timers that are great in a production setting, but it’s a heck of a lot of money for what amounts to a UV LED and a microcontroller.

So naturally I decided I could do better and started work on my own solution.

I’m taking my inspiration largely from the system that Thor Labs sells, with the following primary goals:

  • Small, easily handled emitter with high irradiance for precise curing of small areas
  • Mains powered base station
  • Adjustable power level
  • Adjustable one-shot exposure timer
  • Trigger button on the emitter
  • Inputs for external triggers, such as a foot pedal
  • Trigger outputs for coordination of multiple units
  • USB interface (why not?) for. . . I dunno. . .saving settings and stuff
  • Swappable emitters for different applications
  • Unique ID and drive parameters stored on the emitter module for automatic configuration of base station
  • Temperature monitoring of emitter with thermal shutdown
  • Up to 24V, 2.5A output

Eventually I’d like to build a system that can handle multiple emitters, but for now the base station will only do one emitter.

You’ll note that there’s actually nothing UV-specific to this project–after all, an LED is an LED as far as the driver is concerned, so I decided to frame this project as a general-purpose LED controller that can be used for all sorts of applications where precise control of power and timing is required.  What sort of applications?  I don’t know, use your imagination, I just need to cure some UV glue!

Power supply

Since I don’t want to have to deal with a wall wart in addition to the base station, I’ll incorporate an autoranging switch-mode AC-DC supply into the base station.  Since I want the base station to be nice and compact, it’ll probably have to be an open-frame type and will need to be capable of 24V and ~65W–although I may downgrade that to 45W.  In either case, the Meanwell EPS series fits the bill, being only 2″x4″, and is <$15 at qty 1.

Since it’s an open frame supply, some care will need to be taken with the housing design, but I don’t think that’s insurmountable.

Output Connector

Since we’ll need to be able to not only supply current to the emitter unit but also read back some status information, we’ll need a connector and cable with a decent number of poles.  My first thought was to use DB-9 connectors, which are readily available, cheap, and can handle the couple amps of current we’ll need.

The problem is that most DB-9 cables are only 28AWG, which is decidedly not sufficient for a couple of amps.  With a 6′ lead from the base station to the emitter, at 3A the cable would dissipate over 7W!  I also wanted to be able to detach the cable from the emitter, and a DB-9 would be a bit bulky to be hanging off the back of the emitter.

My next idea was to use metric connectors and cables that are commonly available for industrial sensors.  These are available in up to 12-pole versions with 24-20AWG cables, and are quite rugged.  They’re also compact enough to use on the back of the emitter unit, which is a plus.  The only problem is that the way the connectors are constructed, the panel connectors really ought to be male and the cable connectors female, which means the base station would have a male connector for the power output.  That’s not ideal.

Of course there are other options, like DIN connectors or Cannon, or even XLR, but those aren’t as commonly available–let alone as full cable assemblies–so I decided to just stick with a DB-9 on the base station.  Most of my applications won’t need the full 3A, so I can get away with using skinny wire for those, and build cables specifically for whatever applications need more juice.  For the initial UV curing system, I may actually go with a metric connector on the emitter and use a metric-to-DB9 cable to the base station.  Since standard metric connectors are available in 8 or 12 but not 9 poles, I’ll make sure that only 8 of the 9 pins on the DB-9 are required.

Output Interface

Since the LED driver will be contained in the base station, we’ll need to provide connections for the LED anode and cathode.  We could reference the cathode to ground, but that would mean we’d need a high-side driver, which gets tricky.  Easier to provide a separate cathode connection and use a low-side driver.  Since we’ll need to read back information stored in the emitter, we’ll want at least one connection for data, and power and ground for whatever storage device is in there–perhaps a one-wire EEPROM would do.  There’s the switch output, which can be one line referenced to ground, and it would be really nice to have a status LED on the emitter to show if it’s on, overheated, etc.  And of course a dedicated line for the temperature sensor.  Let’s see, that’s:

  1. LED –
  2. LED +
  3. ID/parameter Data
  4. +5V
  5. Gnd
  6. Switch
  7. Status LED
  8. Temp

Cool, all of the features we want, and only eight wires!  But with only one line for the status LED, we only have on/off control.  What if instead of a dedicated ID line and a dedicated LED line, we implement an I²C interface, then we put a small MCU in there that can drive an RGB LED and store parameters in its EEPROM.

  1. LED –
  2. LED +
  3. +5V
  4. Gnd
  5. Button
  6. SDA
  7. SCL
  8. Temp

Even better!

Trigger I/O

For basic triggering I’ll likely use 3.5mm stereo jacks, which could easily allow me to include power and ground to provide for power level control via an external potentiometer, for instance.  Not sure on this at the moment.

For more advanced coordination of activity between multiple LED controllers (and possibly other lab equipment), I’ve been rolling an idea around in my head for a while that would use Cat-5 cables to carry differential serial data on two pairs and a differential trigger signal on a third.  Some fleshing-out of that will be required.

I’d also like to incorporate a USB interface.  This will either be via an FTDI part to provide simple serial coms, or more likely directly from the MCU.  An eventual goal would be to provide SCPI and/or GPIB functionality, but that’s a ways off.

User Interface

The base station will need to have some way to manually set parameters and read status, so I think a small graphic LCD is in order.  For editing parameters, a rotary encoder is a good bet, with 2-4 additional pushbuttons to be able to navigate through menus.  I also want a nice big status light.  There are some neat-looking rotary encoders that incorporate a pushbutton and an RGB LED, so that might be a good way to pack a lot of functionality onto a very compact control panel.

Okay, that’s it for the current brain-dump.  Now to start fleshing out the hardware.