Basically I am trying to send serial data from a Atmel to a string of ws2812 LEDs. I need to provide some isolation from the output pin to the LEDs located in a seperate place. My plan was to convert the data string to 12V and then back down at the LEDs in hopes of providing some noise immunity. WS2812 LEDs have their own 5V supply.
WHYThe environment is very electrically noisy and the atmel is on a good 5V supply and shielded along with a PLD that is controlling logic functions. The atmel only handles the lighting but is connected to many of the PLD inputs for data and a diagnostic function, but also on the same 5V supply. The main is 12V from a automotive type system. Very large loads are being switched on it. Transients of 8V to 30V are expected. Logic circuit is tested and everything else can handle the conditions.END_WHY
Originally I tried using 4n25 and 4n35 optos, but they don't switch nearly fast enough. The data string is 800Khz, which I didn't realize in the beginning, and uses a short pulse for a 0 and a long for a 1. Next I built a amp driving a 3904 with the atmel output and it drove a 3906, just like the attached circuit but with a 3904 instead of the 2n7000. I tried bypass caps and getting the transistors out of saturation, no luck there. The attached circuit works and I've played with values, but afraid I'm on the edge of it not working. I attached a screenshot of the scope output. So my questions are.
Am I making a mistake turning the current back to a voltage for the LEDs with the resistors and zener(3.9V)
What through hole opto can handle this? This is the preferred route since with an opto the whole 5V circuit can have an isolated ground. At least the transistors and mosfet should slow down anything nasty, maybe only blow the atmel.
Is my mistake selecting a 3906 for this, or something else.
PS. I went to school for electronics and have lots of practical experience, just not in this area.
Thanks in advance for any input.