Electronics > Beginners

Adding a horn on a delay: where to begin?

<< < (5/7) > >>

vmallet:
Thanks again Ian, very helpful.

One more question. In your original message you said:


--- Quote from: Ian.M on March 28, 2019, 11:18:48 am ---It has input from the RC timing circuit R1,C1 via R2 and positive feedback via R4 to provide hysteresis (to get clean 'snap action' switching).   The hysteresis is set by the ratio of R2 to R4.

--- End quote ---

"The hysteresis is set by the ratio of R2 to R4". Do you mean "R2 to R1"? R4 is just there for the positive feedback and 'snap action', right?

Thanks

   Vince.


vmallet:
Progress!

Picture: on the right side of the board I have emece67's design; on the left side I have Ian.M's discrete Schmitt design with a 100k R1 resistor. As expected, Ian's circuit brought the green LED on in close to a second, and emece67's circuit turned the red led on after ~14s.


Now on to some questions about emece67's design:

--- Quote from: emece67 on March 28, 2019, 09:50:44 am ---

--- End quote ---

* DI1/DI2 are reverse polarity protection just in case. Yes?
* RZ/DZ/CZ are current limiting, over-voltage protection and decoupling. Yes?
* RO is effectively a pull-up resistor that will bring the MO's gate high once the comparator turns on. Question though: why 10k? to limit the wasted current that will flow through it?
* DO: what is this diode used for?
* overall function: RT1/RT2 provide a reference voltage to the comparator. RC1/RC2 provide the target voltage that will eventually be much higher than RT1/RT2 and trigger the comparator to turn on and activate the mosfet. At first C is discharged and brings the RC1/RC2 voltage down, but as it charges it will slowly get to the target voltage, hence the delay. About right?
* Now what's DC in here for?
* In a circuit like this, how would you model C's charging time? Is it a standard RC circuit with C/RC1? or C/RC2? or C/(RC1/(RC1+RC2))? Or something else? :)
This project is teaching more than expected!

Ian.M:

--- Quote from: vmallet on April 03, 2019, 06:22:46 am ---"The hysteresis is set by the ratio of R2 to R4". Do you mean "R2 to R1"? R4 is just there for the positive feedback and 'snap action', right?

Thanks

   Vince.




--- End quote ---
Nope.  I meant what I said, although its an oversimplification.

Its easiest to see if you override Vc with a voltage source (- terminal grounded), with its value set to PWL(0 0 0.5 14 1 0) which sweeps from 0 to 14V in half a second then sweeps back down to 0.  The easiest way to do that is to use the copy tool to duplicate the source V1 (bottom left)complete with its label and ground, then edit the label of the copy V2 from Acc to vc and its value to the PWL expression above.

You can then plot Vc, drv and Ib(Q1)and explore the effects of changing the ratio of R2 to R4 yourself.     Consider the balance of currents through R2 and R4 when Ib(Q1) is zero, which is right next to the switching point, and what that must mean about the voltage across each resistor.   

Decreasing R3 to 1K will make the ref voltage steadier and the hysteresis effect easier to understand.

Nice to see you've got it working in real life on the breadboard. :)

emece67:
.

vmallet:
Thanks Ian.M and emece67 for your recent answers, every bit helps with the overall understanding :)

I am exploring the arduino route a bit further as I believe I will have other uses for that chip once it's in the car (maybe drive a volume knob for the head unit instead of those "+" "-" buttons).

I've downloaded KiCAD and tried to draw the schematic of what my design might look like. First time putting a circuit together (on my own), first time drawing a circuit, and first time doing so with an EDA software...


I would appreciate any comment on the design (form or content) as I have so much to learn here.

The relay coil has an 85.5 ohm resistance and draws about 145mA at 12.5V. I am currently driving it with a single 2N4401 which can pass ~600mA max if I read the datasheet correctly so that should work. The 200ohm resistor is there to limit the current through the base; I tried to pick a value that lets enough current pass through so the transistor would let enough current go through for the relay, yet not too much to avoid dropping too much voltage and risk taking the transistor out of full saturation. Clearly something is still nebulous in my mind here!

Next step is to try driving the relay coil with a mosfet instead, it seems it would be more straightforward.

I did not know how to represent the fact that the trigger to the system (the existing horn circuit) is an external signal that will go high at 12V when turned on. I represented it with a switch but obviously that's not what it is.

The "Setup" section is a way for me to have a switch to choose how the new horn should behave from a few predefined settings: OFF, no-delay, 300ms, 600ms (or something, i'll tune the values once it all works). I played with this config and I can easily pick up my 4 values with a wide margin of error. Not sure if it is the right way to approach something like that.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod