first post, help with simple amp control circuit

Thread Starter

robinscottlawrie

Joined Feb 15, 2018
96
Hi all, first post, so i hope this is a suitable place to ask my questions!

anyway, ive built a beefy classD amplifier, and i designed (with help) a little circuit to control startup and shutdown. on powering up, a timer starts, and after 4 or so seconds, trips a relay that takes amps out of standby mode, this allows the dsp and bluetooth modules to boot up and settle down before the speakers become active.

on shutdown, i have a small (0.35VA) transformer, which provides 6v to the circuit. when the power is cut this immediately loses output, and cuts the relay off, which puts amps into standby before the main smps ramps down.. this avoids any pops or clicks.

circuit i have built is in screengrab attached.
current circuit.jpg

it works just fine, HOWEVER, the "sense" transformer is only 30% efficient and despite being tiny and having virtually no load, it heats up.... a lot.

its in a confined space with other warm components around it.. after 2.5hrs the trafo's plastic case is reading 90 odd degrees c.

obviously this is unacceptable.. if i left it on all night it might well melt a hole through the floor.


so. i wish to modify my circuit. the timer is fine.. simple 555 and giving just the right delay.

my idea was to swap the trafo for an ac optoisolator. high value resistor to drop the mains down, and the output used to break the signal from the timer to the relay, maybe via another transistor if necessary.

im trying to keep this as compact as possible.

ive laid out a suggested circuit in spice, but i am a *complete* noob, firstly in spice, and also, to be honest, in electronic circuit design. i know what i need, and i can propose a method, but selecting component values? doh.

also for some arcane reason spice is telling me i have a floating node, so the sim wont even run.

attached is a screengrab of the proposed modified circuit.
optoisolator option.jpg

if anyone there is inclined to help me "finish the job" and take it from my sketch to a set of component values which will work, without getting hot, ill be very grateful. if requested i can upload my spice file, although only the first one actually works, and the optoisolator in spice is not an ac one.. with an ac one i assume i could leave out the diode and capacitor i placed before it.

cheers all!
 

AlbertHall

Joined Jun 4, 2014
12,625
To fix the floating mode, you need to add a ground connection on side of the mains input just to keep the sim happy - not in real life!
 

Thread Starter

robinscottlawrie

Joined Feb 15, 2018
96
To fix the floating mode, you need to add a ground connection on side of the mains input just to keep the sim happy - not in real life!
thanks, that got it working, however im not getting the result i want. timer is still working but i cannot get the opto to do anything.. can i upload you guys a file to fiddle with? id imagine a few minutes work for someone who knows what they are doing..!


the sim is set up to run for 10 seconds, and the ac supply switches off after 300 cycles


desired result is 0v on the output until timer trips, then 12v on output until ac supply is cut.


bear in mind thats a generic opto chosen cos it was in the library. im sure there are much more suitable ones available. when i looked into adding a downloaded model to spiceLT i almost ran out of the room screaming. rather more complex process than id hoped.. i mean, why do i have to design the node..?
 

Attachments

Last edited:

Thread Starter

robinscottlawrie

Joined Feb 15, 2018
96
thaks! that works, but im utterly perplexed why there is a second 555 in there. care to give me a rundown? surely i just need the opto to act as a switch to disconnect the timer out from the output? ideally id avoid adding another ic, firstly cos id have to order more, and secondly cos im trying to reduce the footprint as much as possible.
 

Thread Starter

robinscottlawrie

Joined Feb 15, 2018
96
actually looking at your design, i cannot figure it out at all, not only have you added a second 555, youve got nothing connected to the outputs of either.

edit: ahh i see you are using the discharge trigger pin as an output.
 

AlbertHall

Joined Jun 4, 2014
12,625
You had the transistor in the opto connected backwards. With it the right way round after the '555 times out you get a series of pulses at the output at 50Hz - which is what the opto produces. The second '555 is continuously retriggered by the opto signal so it doesn't time out until the mains dies.

actually looking at your design, i cannot figure it out at all, not only have you added a second 555, youve got nothing connected to the outputs of either.
I don't use the main output but I use the discharge output which is an open collector which pulls low when the timer is not triggered.
 

Thread Starter

robinscottlawrie

Joined Feb 15, 2018
96
ahh o, elegant.. now i can follow it.

would a simple capacitor not be enough to smooth out the output (or input) of the opto enough to keep a transistor triggered? that way i could keep it to one 555..?

bear in mind an ac opto has two led emitters in antiparralel (correct term?) so is active on both sides of the ac waveform.

i dont doubt your version is the proper way to do it, but ive already built the circuit, and its working great ideally id like to reuse the basic timer ive built as far as possible..
 

AlbertHall

Joined Jun 4, 2014
12,625
Incidentally, if Q1 is feeding 250Ω, then ideally R4 should be 10 times that, say 2.2k. This will ensure that Q1 is saturated and drops minimum voltage. It would also probably be a good idea to add a resistor between base and emitter of Q1 to make sure it turns fully off, say 2.2k.
 

Thread Starter

robinscottlawrie

Joined Feb 15, 2018
96
beat me to it! here is my attempt which keeps my basic timer untouched. any major issues?

the output isnt quite as clean as yours, and it takes a touch longer to switch off, but given its only driving a relay id imagine it was fine?
 

Attachments

AlbertHall

Joined Jun 4, 2014
12,625
The optocoupler needs to pass 6mA. You would need to check the spec of the coupler you actually use to see how much current you would need through the LED to make that possible.
 

Thread Starter

robinscottlawrie

Joined Feb 15, 2018
96
thanks for the tips guys.. !

anyway, ill probably try to stick with my version (if possible), since the timer circuit is already built. it uses a couple less components, and its my design!! (whatever that means..)

and regarding the optoisolator, this is a model i was considering.. its available, not too expensive, and AC capable.

https://datasheet.lcsc.com/szlcsc/LTV-814_C10790.pdf

im not sure if the CTR is sufficient (i dont really understand it to be honest, but i understand that a higher CTR means i can use less current in the input led's and hence less meaty resistors to drop the voltage). ideally id use the 1/4w resistors i already have tons of. dont mind using a couple if necessary but im trying to avoid heat generation.
 

AlbertHall

Joined Jun 4, 2014
12,625
First, you should probably use two resistors in series from the mains to keep within the voltage rating of the resistors.
upload_2018-2-16_10-41-36.png
What the above means is that with a diode current of 1mA, the transistor might pass anywhere between 0.2mA and 3mA so if the one you get happens to be at the low end of that range, to get 6mA you would need to run 30mA through the diode! If it happened to be at the other end of the range then you would need only need 2mA.
To get around that problem you could make Q1 a darlington transistor (or two transistors wired as a darlington) then you could increase the base resistor to reduce the current required from the opto.
 

Thread Starter

robinscottlawrie

Joined Feb 15, 2018
96
ok thats not exactly an exacting spec!

ill check around if there are any more tightly rated or suitable optos, otherwise ill consider a darlington pair.. probably using a pair of transistors as i have a bag of common types. do i need to use a particularly sensitive one for the first in the darlington pair ?
 

AlbertHall

Joined Jun 4, 2014
12,625
ok thats not exactly an exacting spec!

ill check around if there are any more tightly rated or suitable optos, otherwise ill consider a darlington pair.. probably using a pair of transistors as i have a bag of common types. do i need to use a particularly sensitive one for the first in the darlington pair ?
Any reasonable low power transistor will do the job.
 

Thread Starter

robinscottlawrie

Joined Feb 15, 2018
96
hmm, thinking rationally, if your version of the circuit allows very low current operation of the opto (and therefore lower wattage resistors needed on mains input) if i have to add an extra transistor to mine, i may as well just do your version. it gives a cleaner output after all.

i think i will be dropping my supply voltage to 12v anyway, which means i can ditch the divider network at the end and drive the 12v relay directly. in the end im gonna just rebuild the thing. im sure i can make it smaller.
 
Top