being careful to keep the AC mains insulated and safely
away from anything that might abrade the insulation. That
should work well.

Arduinos and LEDs — Redux

QI once came across a minimal component design with an ATtiny and LED without a resistor and had the same question as Mike in the February column: Wouldn’t this burn up the
microcomputer? I don’t think 20 mA is a current-limited
output; it’s the safe maximum current without converting
the driver transistors into fuses. The datasheet does have
the answer in the Pin Driver Strength graph showing output
source/sink voltage vs. current (the graph stops at 20 mA,
i.e., is not a knee).

Carl Hage

AI have actually received a couple of responses like this. My assertion was that the outputs are current limited and well protected. Who knows, I might be wrong. There’s nothing like
an experiment to try to answer such a question. I have a
bunch of LEDs in my parts box and an Arduino that I’m
willing to sacrifice to the cause! I also have an infrared
thermometer that I can use to see how much the part
might heat up. Let’s see what happens.

I propose an experiment where I try to find the lowest
voltage/highest current LED in my parts box and turn it on
for an extended period of time using the Arduino. I have a
spare Arduino Mega that I’m not using at the moment. I’ll
also try to measure the current. With the thermometer, I’ll
see if the part or the LED heats up beyond a reasonable
temperature for the devices in question. Here we go.

I wrote a couple of lines of Arduino code to make
pin 6 an output and high, and began the experiment by
letting the Arduino board’s temperature stabilize in that
configuration. I took a reading of the Atmel device’s
temperature with the infrared thermometer. I then
downloaded the code and measured the voltage on pin
6 with no load. The starting values were 86˚F and 4.98V.
Those are the nominal values.

Next, I stuck the LED anode into the pin 6 header.
I used a clip lead to connect the cathode to my digital
ammeter, and the LED came on nice and bright blue.
Measuring the current, it was 44 mA. That’s not bad for
this device. I then reconfigured the meter to measure
the voltage with the LED in-circuit, and it was 3.46V.
That’s about what I expected. It seemed to be working as