Smoke out of motor shield when using a optocoupler

I am a beginner with electronics and this is my first non-trivial soldering job.

I have a project where I wish to control the focus and shutter of my digital camera through dedicated shutter port. Camera wakes up when one cable (focus) is connected to the ground, and takes an image when the second cable (shutter) is connected to the ground.

When I made a first version on a breadboard directly connected to Arduino Uno, it seemed to work ok.

I wished to make project more permanent, and as the project also needs to use a motor, I chose to use the perfboard on the Adafruit Motor Shield v2.3. (There was no motor or external power connected to the motor shield at this time.)

When I had soldered everything, and connected the Uno w/motor shield to USB, everything was OK. I was able to blink the LEDs with the following test software.

When I connected it to my digital camera shutter port, camera seemed to awake immediately, which indicated to me that something was wrong. I disconnected the USB and took the board to a different room for inspection. When I separated the Arduino and motor shield, and laid the board on the table, it seemed like some smoke came out, although the board was no longer connected to power. I had disconnected it perhaps 1-2 minutes before.

I found a short circuit on the camera side of the optocoupler I had not found before. The problem place was in the connection from the camera to the board. The cables I use to connect to the camera has copper sheathed cable that I had difficulty both stripping with wire strippers, as well as connecting to the board. I ended up soldering the cables to 1 + 2 standard Arduino headers, and then soldering the headers on the perfboard.

The 2 header set was short circuiting. Because the camera is separated from the Arduino with optocouplers, the short circuit on the camera should just cause camera to constantly focus/take pictures, but in my understanding it should not have burned the Arduino or motor shield.

When I connected the Arduino + motor shield to USB after fixing the short circuit, the shield was not working at all anymore. My computer gave an indication that the device was drawing too much power out. I removed the motor shield from the Arduino and connected it to my computer, and very cursory test indicates that Arduino itself seems to be OK.

So before I burn a second motor shield I think I need some help:

(1) Are there some problems in my schematic? Or in my soldering? How is it possible that the motor shield burned?

(2) Do you recommend that I skip using the perfboard on the motor shield? It seems soldering by hand so close to the circuits on the motor shield is quite difficult for me and not a beginner thing to do at all.

(3) Any other practical advice? It seems it would have been wiser to use a connector between the camera cable and the motor shield. PCB header connector, screw terminal or something else?

I learned quite a few things when soldering this thing. For example, it seems like it was a bad idea to connect to the ground in the bottom part of the Arduino, because the wire goes exactly over the ground on the camera side, and it was difficult to solder it and this is perhaps one part where I messed things up.

Here is the Fritzing of how it should look like (the only change being that I used 4N26 instead of 4N25 as in the image) and images how it looks like.

mikko:
(1) Are there some problems in my schematic? Or in my soldering? How is it possible that the motor shield burned?

If I understand you correctly:
a. the shield was plugged into your Arduino Uno.
b. The Uno was connected to USB power.
c. There was no other power supply connected to the shield.
d. you had no short near the 3v 5v Gnd or Vin pins on the shield

In which case I'm guessing that your wiring on the underneath of the shield shorted against the 6 pins on the Arduino just above where it says AREF.

Where it says: "ICSP for USB interface" in the picture on this page:arduino-uno-pinout

One of those pins is +5V

Yours,
TonyWilk

Hi,

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Not a fritzy picture, it has too many wires crossing over connections.


Tom... :slight_smile:

Hi,
You need to check your opto pinouts too.
The opto output is 4 and 5.
4n35pinout.jpg

Tom... :slight_smile:

TonyWilk:
If I understand you correctly:
a. the shield was plugged into your Arduino Uno.
b. The Uno was connected to USB power.
c. There was no other power supply connected to the shield.

Yes, yes, and yes.

TonyWilk:
d. you had no short near the 3v 5v Gnd or Vin pins on the shield

I tested those, but well, at this point I am not too confident with my metering skills. So it is possible there is something I am not seeing there either.

TonyWilk:
In which case I'm guessing that your wiring on the underneath of the shield shorted against the 6 pins on the Arduino just above where it says AREF.

Where it says: "ICSP for USB interface" in the picture on this page:arduino-uno-pinout

One of those pins is +5V

I believe I get the location, but I don't quite understand what that would mean. As I have only soldered on the motor shield and not the Arduino, the shorting must be on the motor shield part, no? So I guess you mean that the short circuit is happening near the corresponding six pins on the motor shield.

There is one detail which I seem to have left out, which is that I used the same Arduino + motor shield combo successfully earlier to control a stepper motor, so I suspect if there was no short circuit (which I guess is a given?), before my additional soldering work on the motor shield.

Close to those six pins you mention I have not soldered anything except the headers, which I have soldered earlier, and they seemed to work.

In any case, are there some additional things I need to take into account when building on top of motor shield when using USB power? I am using 560 ohm resistors, I guess that should be ok? The circuitry is based on this page where the author says minimum should be 380 ohm, but higher is fine, and 560 ohm is what I had available.

http://www.martyncurrey.com/activating-the-shutter-release/

Hi,
Can you draw a circuit diagram by reverse engineering your wiring on the shield?

Tom... :slight_smile:

mikko:
When I connected it to my digital camera shutter port, camera seemed to awake immediately, which indicated to me that something was wrong.

See my post #3, about the output pins on the opto and the link to how to connect to an opto output.

Have you looked closely at the motor board and checked to see if there is anything distressed?

Tom... :slight_smile:

TomGeorge:
You need to check your opto pinouts too.
The opto output is 4 and 5.

Ah, yes!

Yes, I was planning to post the schematic but the forum told me I am writing too many messages. Here is the schematic. It is the first one I have drawn.

Hi,
Thanks for the schematic, it has the outputs of the opto correct, but your board is not
IMG_2027.JPG
Tom... :slight_smile:

Yes!

The schematic is based on what it should be like, and how it was on the bread board... but it seems I made a mistake when putting it on the perfboard.

Thank you so much!

Anyway, I am still surprised that it is possible to have a short circuit on the Arduino/motor shield when opto was wired wrongly. I thought the two sides of the opto are isolated. In other words, I understand why camera is acting weirdly, but I not why I burned my motor shield.

mikko:
I believe I get the location, but I don't quite understand what that would mean. As I have only soldered on the motor shield and not the Arduino, the shorting must be on the motor shield part, no?

What I meant was... is any of your wiring on the underneath of the motor shield touching those pins when it is plugged in ?
If you push the motor shield down, the bottom of the board must be quite close to those pins that are sticking up ?

Your opto circuit looks fine.

It's just a bit of a mystery why the motor shield seems to have gone "poof!"

Any chance you might have plugged it in and mis-aligned it by a pin or something ?

Yours,
TonyWilk

mikko:
I am a beginner with electronics and this is my first non-trivial soldering job.

I have a project where I wish to control the focus and shutter of my digital camera through dedicated shutter port. Camera wakes up when one cable (focus) is connected to the ground, and takes an image when the second cable (shutter) is connected to the ground.

A suggestion.
Find some old discarded PCB and practice soldering.

The pref board looks rough.

also invest in some silicon insulated hook up wire.
several colors.
bright different colored wires make these easier to "read".

TonyWilk:
What I meant was... is any of your wiring on the underneath of the motor shield touching those pins when it is plugged in ?
If you push the motor shield down, the bottom of the board must be quite close to those pins that are sticking up ?

Yours,
TonyWilk

The metal USBsocket enclosure looks like it is under the opto that is near the reset button.
Tom.. :slight_smile:

TonyWilk:
What I meant was... is any of your wiring on the underneath of the motor shield touching those pins when it is plugged in ?
If you push the motor shield down, the bottom of the board must be quite close to those pins that are sticking up ?

Ah true! That might be a problem also! Thanks for pointing it out! Luckily the Arduino board seems to be ok.

TonyWilk:
Any chance you might have plugged it in and mis-aligned it by a pin or something ?

I think this is quite unlikely, as the shield fits exactly on top of the Arduino, so it would be quite clear if it would be off.

artisticforge:
A suggestion.

Thanks for the suggestions!

artisticforge:
Find some old discarded PCB and practice soldering

I probably will have to do this. Learning to solder properly will take quite some time? I think it may be easier to keep my motivation up by doing real projects... perhaps the easier solution for now is to find perfboards that are easier to solder.

artisticforge:
The pref board looks rough.

Yes, I think so too. Some parts were for me really difficult to solder. My hand is not so careful as needed by those very small holes. I guess I may also be using too much heat, but unless I do that, nothing happens to the soldering tin.

I also realized quite late that I can use the ending of the resistors, LEDs etc. to hook up to the next component. Actually I started with thinking that easiest way would be to put the two components that are connected into the same hole :). But I gave that up pretty soon.

It would be also helpful if you could comment what exactly is rough for you. I have a feeling there are hundreds of things I don't know about soldering yet.

artisticforge:
also invest in some silicon insulated hook up wire.
several colors.
bright different colored wires make these easier to "read".

Yes, I have read that I should find Kynar wire. My local shop did not have anything else than what I used in stock. Can you recommend where to get it cheap?

artisticforge:
A suggestion.
Find some old discarded PCB and practice soldering.

The pref board looks rough.

mikko:
Yes, I think so too. Some parts were for me really difficult to solder.

Good advice there re: soldering

Perf board can often be difficult to solder (especially if it's been sat on the shelf a while) - consider investing in some liquid reworking flux, just a tiny amount wiped on can make it so much easier. like: Liquid Soldering Flux

Yours,
TonyWilk

mikko:
Thanks for the suggestions!

I probably will have to do this. Learning to solder properly will take quite some time? I think it may be easier to keep my motivation up by doing real projects... perhaps the easier solution for now is to find perfboards that are easier to solder.

I use very thin solder. The solder I use is perhaps the width of 2 human hairs.
When soldering perf board I use a fine point soldering tip.
My soldering station has temperature control I can dial in the temperature.

Use the least amount of solder that you possibly can.

use solder flux when un soldering parts.
a good vacuum solder sucker is necessary
use solder wick if you do not have a solder sucker.

Hi,
I know I'll get some reaction to this BUT;
[soapbox]
Try and get lead based solder, rather than lead-free solder.

Lead-free solder works, BUT, the joint whether it is a good joint or bad joint, ALWAYS looks like a bad joint. (I could use stronger language.. :o )

Lead solder works great, it FLOWS easily and is great to learn how to solder, a good joint looks nice and shiny, a bad joint looks bad.

I try to avoid lead-free solder if I can.

If I am fixing dry lead-free joint, if I replace it with lead solder, it makes the rest of the PCB look like every joint is dodgy.

ALL my new PCB construction and prototypes are soldered using Lead - Tin base resin cored solder.
[\soapbox]


My supplier;

https://www.wiltronics.com.au/product/8976/tinlead-solder-56mm-6040-500gm-roll/

Tom... :slight_smile:

TomGeorge:
Try and get lead based solder, rather than lead-free solder.

[outrage]

lead ?

LEAD !!!!

OMG! THINK OF THE CHILDREN !!!!

[/outrage]

...sorry

Yeh, I've got tons of the stuff after the factory had to go lead-free, works well :smiley:

Yours,
TonyWilk

TomGeorge:
Hi,
Try and get lead based solder, rather than lead-free solder.

Tom... :slight_smile:

absolutely NOT!!!

there is enough pollution in the environment without adding more lead.

spend a little more for proper lead-free solder.
practice using lead-free solder.

On larger metal working projects I use silver solder.
I rather have silver solder in the water pipes than lead solder in the water pipes.

I am a firm believer in imposing stiff excise taxes on lead solder.