These parts, printed in white PLA, are not fastened
together, so that the stage can be easily accessed, and
any part of the light box can be excluded, replaced, or
modified if necessary. The platform E is open at the
bottom and fits into a circular depression on top of the
base; its purpose is to ensure that, when the carriage
is at its lowest position, the focus plane of the camera
lies below the target object. The stage D raises the the
target object a bit further so as to improve its illumina-
tion. The diffusing dome C, thin and translucent, may
be used to obtain more uniform and smoother lighting
of the target, if so desired.
The illumination section B is a single plastic part
consisting of a dome that holds the LED light sources
and a cylindrical enclosure that, together with the lid
A, protects their terminals and wiring. The lid has an
opening just wide enough for the camera. The internal
surfaces facing the target are painted matte black.
The device currently has 24 LEDs, arranged in
two rings of 12. A third ring of holes on the dome
could hold another 12 light sources. Each LED
has an independent connection to the electronics box
through a flat 40-wire data cable that exits through a
slot in the back of the section. For greater flexibility,
each LED is held by an individual 3D printed sleeve
(not shown) that is plugged into the corresponding
hole of the light dome. This arrangement can ac-
commodate LEDs of various sizes, holds them more
firmly, and allows their orientation to be individually
adjusted.
4 ELECTRONICS
The main component of the dedicated electronics are
two 10cm × 10 cm printed circuit boards (PCBs) of
the stripboard type, a power supply, and a motor
power drive unit. The electronics circuitry spans also
the 24 LEDS in the light box, the overrun sensing
miscroswitch, and the windings of the stepper motor.
See Figure 8. These components are housed in a low
20cm by 25 cm MDF box, seen in Figure 3.
The central component of the electronics is an Ar-
duino Nano V3 microcontroller (AG, 2017) mounted
on one of the PCBs. All components, except the mo-
tor driver, are powered by the +5V line from the USB
cable, through the Arduino. The rest of the electron-
ics can be conceptually divided into two subsystems:
motion control and lighting control.
4.1 Motion Control
The motion control subsystem applies current pulses
with the proper polarity and timing to the motor wind-
ings. A standard power drive unit (Texas Instruments
DRV8825), fed by a switching power supply type
MS-50-12 (10 A, 12 V, 60 W) is used to convert the bi-
nary 0/5V output signals of the Arduino to the ±12V
voltage and high currents required by the motor, and
also to provide over-current and temperature overload
protection. The Arduino output ports D2, D3, and D4
are connected to the drive’s Enable, Step, and Direc-
tion input pins of the power drive. Outputs 1A, 1B,
2A, and 2B of the drive are connected to the motor
winding terminals.
The motion control circuitry includes the carriage
travel limit sensor, a type MSW-14B micro switch
connected to the Arduino +5V and D10 ports. When
the switch is activated, the Arduino firmware will pre-
vent the motor from turning any further in the direc-
tion that lowers the carriage. This safety feature could
also be used by the controlling script to place the car-
riage at a specified absolute position, independently
of its current state.
4.2 Lighting Control
The light sources currently in use are 24 LEDs, each
producing 10000 mcd of white light with color tem-
perature 5500–6000 K. They are driven by a chain of
three serial-to-parallel demultiplexers (Texas Instru-
ments 74HC595), each with 8 binary 0/+5V outputs.
A 270 Ω resistor limits the current through each LED
to the nominal maximum of 18.5umA. The state of
the LEDs can be changed by the Arduino by sending
24 bits serially through port D6.
5 SOFTWARE
The device’s software consists of a firmware stored
and executed by the Arduino, and a script that runs on
a PC.
5.1 Arduino Firmware
The embedded program muff firmware was writ-
ten in the standard Arduino C-like programming
language. It uses various free libraries, including
the AccelStepper module for stepper motor con-
trol (McCauley, 2017). It receives encoded com-
mands and parameters through the Arduino’s serial
communication (USB) port. Each command consists
of one byte of operation code, and (depending on the
operation) up to four bytes of operand. The avail-
able commands include starting the motor in cruise
(constant speed) mode, up or down, stopping the mo-
tor, raising or lowering the carriage by a specified
MUFF: A Low-cost Motorized Positioner Developed by Additive Manufacturing to Obtain Multi-focus Images
149