harvie
Full Member level 1
Hello,
i have following circuit:
"VBUS" is 24V bus limited to 200mA, it serves for both power and data transfer.
If i want to transmit logic HIGH i leave it like that. If i want to transmit logic LOW i pull it down to 7V.
That way i can always have regulated 5V supply using LDO.
Problem is that i want to support multiple standarts, each of them uses different threshold voltages.
So i am using isolated ADC (PWM with optocoupler and RC low pass filter) to provide reference voltage "BUSREF" which is used as threshold for opamp. I am succesfully using this to RX the bus and provide TTL output using optocoupler. But now i want to TX so i need to pull down the bus to reference voltage when triggered using optocoupler.
There is also a zener diode that prevents bus from going lower than 5V if there's something wrong with reference voltage.
The attached TX circuit "kinda works", but it ends up doing lot of weird stuff and voltage transitions on bus are slow and ugly. I am unable to run UART serial data through it. Even baudrate of 2400 does not work properly. So i need to get sharp and clean transition. Any ideas how to improve?
I've tried following without success:
- using darlington transistor
- adding hysteresis resistor to opamp
- moving optocoupler from base of the transistor to positive input of the opamp
- - - Updated - - -
BTW i use LM385 opamp, i ditched LM393 comparator that i've originaly designed to circuit, because it can only sink small current, while LM385 can both sink and source bit more current
i have following circuit:
"VBUS" is 24V bus limited to 200mA, it serves for both power and data transfer.
If i want to transmit logic HIGH i leave it like that. If i want to transmit logic LOW i pull it down to 7V.
That way i can always have regulated 5V supply using LDO.
Problem is that i want to support multiple standarts, each of them uses different threshold voltages.
So i am using isolated ADC (PWM with optocoupler and RC low pass filter) to provide reference voltage "BUSREF" which is used as threshold for opamp. I am succesfully using this to RX the bus and provide TTL output using optocoupler. But now i want to TX so i need to pull down the bus to reference voltage when triggered using optocoupler.
There is also a zener diode that prevents bus from going lower than 5V if there's something wrong with reference voltage.
The attached TX circuit "kinda works", but it ends up doing lot of weird stuff and voltage transitions on bus are slow and ugly. I am unable to run UART serial data through it. Even baudrate of 2400 does not work properly. So i need to get sharp and clean transition. Any ideas how to improve?
I've tried following without success:
- using darlington transistor
- adding hysteresis resistor to opamp
- moving optocoupler from base of the transistor to positive input of the opamp
- - - Updated - - -
BTW i use LM385 opamp, i ditched LM393 comparator that i've originaly designed to circuit, because it can only sink small current, while LM385 can both sink and source bit more current