Go Down

Topic: Problems with a MOSFET relay (Read 11512 times) previous topic - next topic

KirAsh4


Guess I'd be surprised if the LED string could receive data without being powered on. Maybe that's not what you're saying.


It won't, but at least if the MCU is already sending data, when the string comes on at least its not waiting on the MCU ...

Another thought is to separate the VCC to the LEDs from the VCC to the drivers and have the drivers come on with the MCU and turn the LEDs on afterwards.

TomGeorge

Hi, you say the LED strip is custom made, can you show us a diagram of the circuitry in the strip so we can see what we are working with.

There must be some digital circuitry, do you have control of individual LEDs when you control it. If you can control individual LEDs then there must be more than just drivers on the strip.

By the way have you tried bypassing the supply pins of the LED strip by putting say 10uF electrolytic capacitor between positive and negative at the LED strip connector.

Tom  :)
Everything runs on smoke, let the smoke out, it stops running....

KirAsh4


Hi, you say the LED strip is custom made, can you show us a diagram of the circuitry in the strip so we can see what we are working with.

Attached.


There must be some digital circuitry, do you have control of individual LEDs when you control it. If you can control individual LEDs then there must be more than just drivers on the strip.

There isn't.  It's a single driver IC with matching capacitor for every two LEDs.  That's it, nothing more, nothing less.  On the "other side" is an MCU driving the signal and clock lines.


By the way have you tried bypassing the supply pins of the LED strip by putting say 10uF electrolytic capacitor between positive and negative at the LED strip connector.

The drivers take care of that with their cap.  Each one has its own.

As I said earlier (a few times), without the Omron relay, everything works fine and as expected, for hours and hours (till the battery dies).  As soon as the relay is put in, things fail.  I have not had a change to try raising the current through the relay yet - got busy last night.  I'm going to try and work on this tonight, although I may  ditch it all together for a simple MOSFET as Jack suggested, especially since I don't need the voltage isolation, it's all working off of the same battery.  It's acting as a simple ON/OFF so I don't need anything too complex and a MOSFET does the trick.

TomGeorge

Thanks for the circuit, the resolution of the diagram is not clear enough to tell me what number the IC is, can you let me know.
As I see this circuit it comprises not just of driver but a decoder/driver, the CLK and DIN inputs have to be able to read digital voltage levels.

With full 5V supply to the strip all is well, because the 1 and 0 levels equal the levels produced by the Arduino.
When you go to the opto/mosfet relay your supply to the strip drops to 2.5V, now the levels that the decoder will accept as 0 and 1 also drop, especially the level representing 0, the Arduino is still outputting 5V logic levels of 0 and 1.
Remember logic zero is NOT zero volts, and logic 1 is not necessarily supply volts.
This means that the digital input can and in this case is being misread.

Look at the spec of the decoder/driver and see what its voltage restrictions are.(Don't forget to tell us the IC number)
I understand  that the opto/mosfet is the cause of this drop. Have you measured the voltage dropped across pins 3 and 4 AT the opto/mosfet pins to make sure that the  drop is in the mosfet?
The circuit also shows that bypass caps have been fitted to each decoder which is fine.
Tom

Everything runs on smoke, let the smoke out, it stops running....

KirAsh4

Tom, I get the feeling you did not read any of my previous posts.  A lot of what you are asking and/or suggesting has already been answered.  So a quick recap is in order:


  • ICs are LPD8806S drivers configured in constant current and 6-channel independent modes.

  • Nominal voltage is 3.3V to 5.5V.  Minimum is 2.7V, max is 5.5V.

  • The strings are powered with a single Li+ battery that fluctuates between 4.2V (fully charged) down to 3.0V (fully discharged).

  • The whole thing works fine when the relay is not being used and the battery's connected directly to the string.  It will run for hours before the battery reaches its 3.0V cut-off value at which point the LEDs (and drivers) will shut off.

  • Arduino was originally supplying a 5V signal but I've since switched it to 3.3V, originally as a test, but now it's permanent.  This voltage difference has absolutely no effect on the unit working when the relay is in the circuit.  In other words, the unit doesn't work properly with either voltage with the relay.  It works fine without the relay.



Please note, this is not the first time I've worked with these drivers (or many others for that matter), however it is my first time using this *specific* relay and having trouble.  I have some IRs on order and as soon as they come in I'll switch things around and see how those work.  I don't need the opto isolation that the Omron relay offers.  It just happened to be the only relay I had handy and thought I could make work.

Let me repeat one thing here: the drivers *WILL WORK* with a voltage as low as 2.5V and signal lines at 3.3V.  This I tried and tested several times now.  I never said that the relay dropped the voltage to 2.5V, you misread that somewhere.  I simply stated that there's a significant voltage drop across the relay and maybe that's the cause.  I just can't figure out why.  And yes, I measured it, I didn't just guess it.

At this point I'm shelving this problem because as I said, I don't need the isolation the relay offers, nor do I feel like constantly battling it when a simple MOSFET could do the job.  I will wait for those to come in and continue testing then.  Instead I focused on color adjustments and doing some more captures:






TomGeorge

Okay, fine, now that all results are stated in one place, the problem is still that the relay is the problem.
Again can I ask you to measure the voltage at pins 3 and 4 of the relay and see if the drop really is the relays fault.
Also, do you have access to an oscilloscope, look at the supply voltage going into the strip and see if there is any noise when using the relay.
The drop is caused by a resistance of-course and that will deregulate the supply to the strip so any current change, such as when a LED changes state, will cause a supply voltage change at the strip.
Hence misreading of the data and clock lines due to logic level references changing.

Tom

You have used this strip before, what did you use then to switch supply, why change?
Everything runs on smoke, let the smoke out, it stops running....

KirAsh4


Again can I ask you to measure the voltage at pins 3 and 4 of the relay and see if the drop really is the relays fault.

I did which is how I discovered the difference.  Whether the relay is on the high side or low side, it does the same thing.  Voltage out of the battery is one value, out of the relay it's several tenths lower.

Also, do you have access to an oscilloscope, look at the supply voltage going into the strip and see if there is any noise when using the relay.[/qoute]
Nope.

You have used this strip before, what did you use then to switch supply, why change?

An on/off switch that powered them from a computer PSU.  However this is a different design running of off a battery.  Because of the amount of amps the LEDs will be pulling, I would need a rather large switch for which I do not have the physical space for.  So using a relay or MOSFET to switch the higher current side of the unit is the only solution here: I'll use a small ON-OFF-ON switch to power the unit in different configurations.  First ON turns the MCU on so I can work with it while connected to a computer without needing the LEDs on as well.  Second ON will have both the MCU as well as the LEDs on.  Ideally I would have used an OFF-ON-ON, however I have not been successful in finding one that will work for this project.

KirAsh4

Quick question, how can I reverse the attached schematic so that I'm cutting off VCC, and not GND.  I don't want the connector (which goes to an LED string) to have live VCC on it as that could potentially cause problems.

KirAsh4

*bump*

(before I start a new thread)

JChristensen


Quick question, how can I reverse the attached schematic so that I'm cutting off VCC, and not GND.  I don't want the connector (which goes to an LED string) to have live VCC on it as that could potentially cause problems.


A P-channel MOSFET can switch the high side. What are the potential problems with the low-side switch?

KirAsh4

It will put the full battery power onto the strips which have a ground plane on one side and VCC plane on the other side.  So if anything that happens to be connected to either ground or something else on the circuit (a broken wire for that matter), happens to touch the exposed LED pads, or where the strips are soldered together, that will cause either a short, or some other type of damage.  I've always been told to never leave a high side connected to anything for that reason.  So I prefer to cut the VCC line as opposed to the GND.

So how would I do that?

JChristensen

#41
Aug 09, 2013, 03:17 pm Last Edit: Aug 09, 2013, 03:19 pm by Jack Christensen Reason: 1

It will put the full battery power onto the strips which have a ground plane on one side and VCC plane on the other side.


But if the ground is switched (courtesy of the MOSFET) what matter does it make?

Quote

So how would I do that?


Seems like someone just posted a high-side MOSFET switch here on the forum in the past several days. I'd have to go searching when I get some time.

KirAsh4

This only cuts the ground to the string, not the whole device.  That's done that way on purpose.  So if something else that is live contacts that live VCC plane ...

JChristensen

Unless it's in a metal enclosure that's connected to the main ground and I were in the habit of of working on energized circuits, I'm not sure how much sleep I'd lose.

KirAsh4

Yeah, I'm trying to eliminate places where there may be an exposed pad or wire connection, or even the very edge of the PCB itself since the strip will have copper exposed to facilitate soldering two together (instead of a header since there is no room for one on either side).  The solder pads extend to the very edge on the board, it's cut and sanded that way.

So yeah, I would prefer to cut VCC from them and leave the GND plane connected.  If a data or clock line comes in contact with it, nothing will happen.  If it's a VCC line, well shit.  The other way around if either the data line or clock touches the live VCC, it will burn out the LED driver(s) and possibly other components.

I'll look around for a P-channel setup.  I think I saw one last night but I was too tired to focus.

Go Up