97. Bearing Witness

“Bearing Witness” 5: Electronics

The Arduino
IMG_20160905_005815For the previous project I used an Arduino to control the LEDs. It worked fine, but it’s too large to fit inside the frame of this artwork. However, a little searching on the internet came up with the Arduino micro. It has all the same functionality as the Arduino Uno (with a few minor differences here and there), but it’s tiny. In fact, it’s not so easy to attach to anything, so I soldered it to a piece of Veroboard and drilled holes in that to screw it to the metal strip.

Also on this board was a voltage divider (two resistors in series) used to reduce the power supply voltage to 1/4, i.e. 3 Volts. This connects to one of the analogue inputs and allows the software to check that the supply voltage in within a safe range. This is important for the Flash in particular because a few milliVolts increase equates to a large increase in current through the LEDs.

Switching the candles
The Arduino can only deliver 20 milliAmps at 5 Volts, so it can’t run the LEDs directly. For the previous project I used BSS316N MOSFETs to switch the power to the lamps on and off. Since I had to buy a batch of 50 (albeit for less than a tenth of a penny each) I still had plenty left!

The next step was to attach the transistors. For the previous project I soldered them by hand to Veroboard. As the song goes, it’s like threading a needle with boxing gloves. I wanted to improve on that method, so  bought a hot air rework station. It’s basically a temperature-controlled paint stripper. The basic process is to apply a blob of “liquid solder” to the copper surface where each of the component’s legs will be, place the component on the blobs of solder, and heat the whole thing up with hot air until the solder changes from a grey goo to silver solder. Let it cool, and, presto! What could possibly go wrong? Ha.

So, I practiced with a few really cheap zener diodes the same size, but this is my first attempt at the transistors. I thought I would do them individually, masking the previous ones with foil:

Here are some of the newbie problems I discovered:
1) The air flow moves the component (or sends it flying into the sink, never to be seen again)
2) The transistor is overheated and is damaged
3) Some of the joints don’t connect

I will go into more detail about how to do this properly when I’ve figured out how, but here are some brief tips:
1) Use the right sized solder blobs in the right places and leave the component for a few minutes after placement as the solder will flow around it, then use a low fan speed (e.g. 2)
2) Set it to 200 degrees C and heat the board up first, then set it to 320 C to melt the solder. It should melt in a second or two
3) See 1)

Stripboard2
Anyway, here’s the result (this was taken after I’d added all the other components). I did test the transistors before I added the other components, and they all seemed to work ok. But when it was all finished I discovered that one of the transistors had stopped working, and another one didn’t fully turn off.

 

Second attempt
I tried re-soldering the one that had stopped working, and eventually got it to connect, but then found that it, too, didn’t turn off fully (i.e. the LED glowed when the gate was at 0 Volts). So, that’s what happens to these little MOSFETs if you overheat them – they start to “leak” – in fact, once they start they get worse the more you use them.

By this point I had fallen out with Veroboard, and decided on a rather radical solution. I took all the transistors off and built a new board, with just (new) transistors on, and I attached this underneath the Veroboard,  connected to it.

Cutting_the_PCB1

I used some blank PCB that I had from when I used to etch my own boards (I really wouldn’t like to say how many years ago that was…) and cut a small piece.Cutting_the_PCB2

Then I used a rotary file in the Dremel to cut away lines of copper by hand to create tracks. Yes, I know, it’s not very elegant, but it proved to be a better solution than Veroboard.
Cutting_the_PCB3
I’m pleased to say that this worked perfectly, and also, it was much easier to solder on the transistors too. I discovered that it was easier to solder the transistors with the rework station as well.

 

Building the main circuit board
I used the circuit described in the previous post. The Arduino outputs connect to the right-hand side of the board, through 1k resistors (to limit the current) to the MOSFETs underneath (originally soldered directly to the board, then replaced with a separate board.

Also after the resistors, there are five diodes as input to the logic circuit. Output from the logic circuit goes (again via a limiting resistor) to a high-powered MOSFET. It’s a
TK35E08N1, rated at 55 Amps (yes, fifty-five Amps!) 80 Volts (cost: 33 pence).

There’s a reason for not using the same 1.4 Amp MOSFETs I used for the candles. I realised that, now there’s a temperature sensor attached to the Flash, there’s really no limit to how much heat I can generate there. So I decided to use three LEDs, each running at 1 Amp. (I would have used more, but there wasn’t room.) Below is the circuit layout I created (as seen from underneath – note that the IC pinout diagrams show connections from on top, so it needs to be reversed). The big square thing on the left is the power MOSFET.

L2-Circuit_layout.png

This is the main circuit board (before I replaced the transistors (soldered underneath) with a secondary circuit board. Note the small variable resistor, at the top. I used this to calibrate the temperature cut-off point, i.e. 40k. The second mounting screw is underneath the MOSFET heatsink, in line with the hole so I can access the screw head. I used some plastic screws and spacers I bought on eBay.

Stripboard1

It worked really well. When I tested the Flash (by turning it on and leaving it on) the temperature took about a minute and a half to reach 62 degrees C, at which point the Flash cut off. It came back on again at about 50 degrees. Interestingly, the range was narrower if i was using PWM with the Flash, suggesting that the hysteresis of the NAND gates is different when they are being turned on and off compared to a fixed state.

One more problem
So, after congratulating my efforts, and testing it with the LEDs at 9Volts (to reduce the LED brightness), I was ready to test it at the full 12 Volts. So I plugged in a 12 Volt mains adapter. Well, it worked for about 3 seconds and then the Arduino died. That’s it, nothing. Dodo.

What happened, I think, is that the voltage regulator on the Arduino micro doesn’t have any heatsink. I think that the current taken by the switches and the logic was too much for the regulator, and it failed. So I had to replace the Arduino. This time I used a nano. These are the same width but slightly longer, cost half the price (about £5 each) and, most importantly, have a visible, if small, heatsink attached to the voltage regulator. The only thing was I had to cut and solder another piece of Veroboard (which has two resistors underneath for the voltage sensor), which was quite a lot of work.

One other thing I discovered. If you connect a USB cable to the Arduino when there’s no power from the mains adapter then you get just under 5 Volts appearing on the Vin pin. In other words, the USB power is connected (back through the Arduino voltage regulator) to the rest of the electronics. Fortunately, that was just the LEDs, and they don’t conduct at 5 Volts, so no harm came of it. It’s a useful thing to know though, because if I had some resistive load connected (or even the external power adapter with a large empty capacitor) then it could well damage / destroy the Arduino’s voltage regulator, maybe even the USB port on the attached computer. From now on, I will power Arduinos through a diode.

Anyway, so far, the Arduino micro has worked just fine. Next, the ultrasonic range-finder.

 

Advertisements

One thought on ““Bearing Witness” 5: Electronics

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s