LowPowerLab Forum

Hardware support => General topics => Topic started by: Lukapple on May 11, 2020, 09:04:14 AM

Title: Burned Moteino (need some help with wiring)
Post by: Lukapple on May 11, 2020, 09:04:14 AM
Hi guys,
I'm working on my "Gateopener" project, which includes Moteino and ULN2003AN darlington transistor array chip, which is used to control different things. One of them is an electric lock (https://www.orno.pl/pl/category/productData/2151/Elektrozaczep-symetryczny-z-sygnalizacja--niedomknietych-drzwi) which is operated with 9-16V AC/DC electrical pulse (in my case 9Vdc). However it looks like I've done some critical error with wiring, because when I try to connect that electrical lock to ULN chip (pin labeled U5 on my custom PCB), it burned my Moteino.
Here is the wiring that I've used:
(https://i.imgur.com/NQZXOWg.png)
(https://i.imgur.com/UX21K34.png)
(https://i.imgur.com/o1JrGLV.png)

Any hints what did I wire wrong?
Title: Re: Burned Moteino (need some help with wiring)
Post by: TomWS on May 11, 2020, 09:33:27 AM
From the schematic view, it appears correct, but there isn't enough detail in the PCB view to tell anything.  Did you do a DRC on the PCB to verify there were no shorts in the wiring?
Title: Re: Burned Moteino (need some help with wiring)
Post by: Lukapple on May 11, 2020, 09:47:20 AM
I'm not 100% sure, but I think that I did a DRC check.
I'm attaching an Eagle project files in case if you want to see any additional details.

Hmm, one more thing, when I did this test, I had a pcb connected to external 9Vdc source, and moteino(on that custom PCB board) connected to my laptop using FTDI usb cable. When I connected the wires, my laptop also rebooted - I forgot to disconnect it before the test (unfortunately I didn't burn the usb port). Was maybe that the issue ?  :)
Or may it be that I connected wrong wires or something (for the test I held those wires with hands). I just want to make sure that wiring is correct, before I do another (burning) test.
Title: Re: Burned Moteino (need some help with wiring)
Post by: john4444 on May 11, 2020, 10:55:38 AM
Hi LukApple,
It looks as if your ULN is directly driving a relay coil.
Without a suppression diode, you can expect the kick-back from the
coil to wipe out almost anything connected to it.
A common 1N4000 diode is often the suppression device of choice and will
be able to adsorb the high-voltage pulse when the relay drops out.

Good Luck.
Title: Re: Burned Moteino (need some help with wiring)
Post by: Lukapple on May 11, 2020, 03:31:03 PM
Hi,
Thanks for the hint. But isn't that protection already built-in ULN2003 chip? Do I have to use suppression diode anyway?
Does matter where in the circuit I place it? Is it ok, if i place it at M5 connector?
Title: Re: Burned Moteino (need some help with wiring)
Post by: TomWS on May 11, 2020, 08:46:19 PM
Quote from: Lukapple on May 11, 2020, 03:31:03 PM
Hi,
Thanks for the hint. But isn't that protection already built-in ULN2003 chip? Do I have to use suppression diode anyway?
Does matter where in the circuit I place it? Is it ok, if i place it at M5 connector?
Yes, that protection is inside the ULN2003, but you need to connect the COM pin (pin9) to the high side of the relay (VIN source).

I think VIN from your FTDI board and VIN pin on the Moteino are directly connected, which could have blown our your FTDI board, but not the Moteino. 
Title: Re: Burned Moteino (need some help with wiring)
Post by: Lukapple on May 12, 2020, 02:52:54 AM
FTDI adapter looks good - it works fine with other Moteinos. When I connect "bad" Moteino, FTDI TX light is blinking all the time. And when I hit Upload sketch, it uploads infinitely.
I'm using official Moteino and FTDI adapter from Felix's shop.
I feel really bad for that brand new Moteino R6 with flash chip on it :(

If I connect COM to VIN source (high side of relay), I don't need that additional 1N4000 diode, is that corret?
So I simply do this additional connection (see red bolded line on COM connection - COM connected to "+"):
(https://i.imgur.com/EwGWnmK.png)

Can you confirm this PCB fix?
Title: Re: Burned Moteino (need some help with wiring)
Post by: TomWS on May 12, 2020, 08:52:49 AM
Quote from: Lukapple on May 12, 2020, 02:52:54 AM
If I connect COM to VIN source (high side of relay), I don't need that additional 1N4000 diode, is that corret?
Yes, that is correct.
So I simply do this additional connection (see red bolded line on COM connection - COM connected to "+"):
Quote
Can you confirm this PCB fix?
So, is this a new connection?

I'm not sure why your board shorted out.  The only thing I can think of is that, with the Moteino straddling the circuit underneath, underside traces on the Moteino accidentally touched pins on the ULN2003?
Title: Re: Burned Moteino (need some help with wiring)
Post by: Lukapple on May 12, 2020, 09:27:26 AM
I've tried circuit on the breadboard with diode instead of electric lock and it works fine.
(https://i.imgur.com/SA8YMDc.gif)

So I think that problem was because:
- I didn't have ULN2003 COM pin connected and like @john4444 said, kick-back burned my Moteino
or
- I accidentally touched wrong pin when I held those wires for test with my shaking hands  :-[

There is enough space under Moteino, so it's not touching ULN pins
(https://i.imgur.com/mjkGLTL.png)

(https://i.imgur.com/pz9aUKd.png)


Title: Re: Burned Moteino (need some help with wiring)
Post by: Lukapple on May 19, 2020, 02:47:37 AM
Hi,
I've tried to connect COM to VIN, but it looks like there is conflict with "U4" pin, which opens gate (it connects COM and PP pin on the gate opener motor - and I've noticed that there is 16VAC on that pin)
(https://i.imgur.com/HJ7mJn2.jpg)

However, I've connected without that "COM" on uln2003 and added 1N4001 diode on the VIN - electric lock line, and everything works fine :)