I am currently on a Uno and using the fastled library. Trying to find a simple method of converting the Arduino output to the 12V supply an using that to branch off to my 2 separate LED strings with their own 5V regulators. Was planning(questioning this now too) to step back down to 5V with a resistor zener setup. I would prefer to use an optoisolator as everything else is optoisolated. The environment is extremely noisy and I can't let it get back to the 5V supply that the Arduino and the rest of my control circuit is on.
I honestly went into this part of the project quite ignorant and was having problems with the circuit on the breadboard before I realized the data string was at 800Khz. A 4n25 doesn't work at this speed, lol.
My scope shows only about 2. volts for the highs on the data string, is this normal? Figured that might be with the speed.
I haven't had any luck getting a 2n3904 or 2n2222 to saturate and turn on a 2n3906. Even removing the base resistors only helps a little, and they don't even get hot. Obviously this looses my isolation, but I'm out of my element at this point.
clytle374:
I am currently on a Uno and using the fastled library. Trying to find a simple method of converting the Arduino output to the 12V supply an using that to branch off to my 2 separate LED strings with their own 5V regulators.
I'm lost here already. The WS2812 chip expects a 3.3volt or 5volt datastream.
12volt data will fry the first LED.
Or are you trying to power the strip with that 2N3906.
The 2N3906 is a small-signal transistor. It can't power a LED strip.
AFAIK there are 5volt and 12volt digital strips.
Digital strips expect a constant 5volt or 12volt supply on the strip with a current capability of ~60mA per LED.
The datastream controls the LEDs.
Post a link to the LED strip.
Leo..
Sorry for the confusion. I am trying to convert the logic signal to 12V and isolating it from the arduino would be a benefit. This will got to 2 separate LED strings that have their own 5V supply. Here the data would be shifted back to 5V logic. The environment is electrically abusive. My concern is that running the arduino output directly out to the LEDs is exposing the 5V supply to noise. The LEDs can skip a refresh or 2 and not cause a issue.
Much researching last night leads me to believe that the 3904 and 3906 are simply not fast enough.
More concerning is that it doesn't look like the Atmel can get its output pins to get much higher than 2V at these speeds.
Why make it 12V then? And why seperate it? Both are useless...
Connect one power brick to one strip, the other to the other, give the Arduino power from somewhere and connect together all the grounds!!! and you are done.
I would just send the data wirelessly, that takes care of the remotely part, puts the LED driver bear the LEDs, and Makes wiring easier.
A pair of esp8266 can get the job done..
Put the programs on the esp8266 near the LEDs, get all the "controlled variables" from the esp placed near where you want to control them, and send those variables over wifi to the esp near the LEDs.
My scope shows only about 2. volts for the highs on the data string, is this normal? Figured that might be with the speed.
A normal opto-isolator (like the 4N25) is open-collector and it relies on the pull-up resistor for the positive output. Unless there is something "weird" about the load pulling-down against the pull-up, you should be getting darn-near 5V.
Try it at DC to see if it's related to switching speed.
What is the distance from the Arduino to the LED strips.
More important, what is the total length of wire you have to use to the two strips.
Total wire capacitance is your biggest enemy for unterminated lines.
Converting to 12volt won't help.
And driving transistors into saturation makes them slower.
An Arduino output has a low enough impedance to drive low capacitance cable, e.g. CAT-6, to a reasonable length.
Leo..
Thanks for all the replies. I got it working, and decided to go take a break for a while. I didn't go back and try the 4n35 opto again, I plan on doing that really soon. I don't know what I was doing when I thought I was only getting 2V for highs coming out of the Uno. Too much stress and my 5V bench supply decided to fail and take my Uno and a few other chips with it the night before. That and too little sleep and too much stress I guess. Oh, and I'm rusty on some aspects of circuit design, just like the 20 year old power supply that failed.
First off is the wireless. I agree, but the design requirements are no RF. Wireless would solve many other issue we have.
The main reason for converting to 12V was to not be using the 5V clean shielded supply as an output anywhere, or expose the output pin to the environment. Everything else is optoisolated, I will figure this out later as I can't use a isolated 5V supply with this circuit. This signal wire will go a few feet along a pair of 4 gauge wires that switch 150A, and the whole 12V supply and other signal wires come through a 15ft track with those 4 gauge wires.
This circuit i attached works. It does provide some isolation for the 328P plus a little with the mosfet. My down fall on the previous circuit was that I didn't use a resistor to pull the base of the 3906 back up to shut it off quick. Trying to saturate the 3904 was also mistake. This might be the whole reason the 4n35 didn't work.
Correct me if I am wrong but the circuit I attached is more immune to noise since it is a current, at least it protects the data in pin on the strip. And shields the pin of the Atmel.
Qdeathstar:
Also, chips with a clock line, like ws2801s are more noise resistant, and you can slowdown their click speed...
Good idea, sadly too late. We'll discuss the last guy at a later date.
EDIT: Found the 2V output issue. Scope probe that reads reads right on dc voltages, but not always at higher frequency.