Electronics > Beginners
Adding a horn on a delay: where to begin?
vmallet:
TLDR: I'd like to add a 2nd horn to my car with a (configurable) 500ms delay; I'm just starting to learn about electronics and would like to see how folks would go about implementing something like this.
I have a car with a crappy old horn and a new air horn ready to be installed. Because I have just started learning electronics (with online courses starting with the basics of resistors, capacitors, etc) (i'm a software guy by trade), I figured it'd be nice to do something that would teach me something along the way.
I'd like to hook up the new horn as a "supplemental" horn that would trigger only after a "configurable" delay, say 500ms. So on just a tap of the horn, only the old one would go; but press longer and after 500ms the new one would kick in too. Ideally, I'd like to have a 4-way switch so the new horn can be: OFF, 0ms-delay, 250ms-delay, 500ms-delay (or something).
My newbie intuition would be to have some sort of small MCU that would be able to take in input the "delay" configuration switch, and the horn on/off action; have some basic logic in there to decide whether or not to drive the air horn; and then some way to switch the air horn on/off as an output. Easier said than done for me; there's plenty of voltage concerns I'm not too sure about. If I were to tap into the 12v line to the existing horn, how do I translate that to the 5v input of the MCU? Or, what's the right way to drive a 10A 12V current for the air horn with the MCU's 5v-low-current output? mosfet? relay? both?
I'm hoping that with a few suggestions I'll be able to go dig and learn about some areas and eventually come up with some design that could make this happen. Right now it's just very nebulous :)
Thanks for your ideas!
RobertHolcombe:
Using only discrete components may be more useful as a beginner in learning the basics
https://www.electronicshub.org/time-delay-relay-circuit/
Ian.M:
While I agree with
--- Quote from: RobertHolcombe on March 28, 2019, 06:28:19 am ---Using only discrete components may be more useful as a beginner in learning the basics
--- End quote ---
and its necessary to have that understanding of the basics to successfully interface a MCU with automotive systems, it helps if you provide a link to a well designed circuit to start with.
The circuit linked has no hysteresis, so relies on the magneto-mechanical hysteresis of the relay mechanism to provide snap action contact operation. Unfortunately, the relay will be critically underpowered at the moment of contact closure, which, depending on the exact relay mechanism design, may cause excessive contact bounce, and due to the high load current, this may result in contact damage, possibly even contact welding.
Also, with a 3.3V Zener in the base circuit, at least 20% of the potentiometer adjustment range will produce an infinite delay, and the relationship between potentiometer position and time delay will be highly non-linear.
The circuit description is also somewhat lacking. It doesn't mention that the TIP122 is actually a Darlington pair, nor explain how the capacitor at the transistor base performs its alleged function of preventing "relay clicking".
AndyC_772:
I'd argue that the 'basics' these days do involve using a microcontroller for this kind of thing.
Many years ago, it used to be the case that the sensible, appropriate way to perform simple timing and logic functions was to use 74 series logic, the classic 555 timer, and similar components.
Nowadays, though, that's no longer true. A PIC12F is the same size as a 555 timer but is way more flexible, capable, and easier to make changes to.
That said, in this particular application, the power supply you have available is 12V plus a lot of noise and spikes, so it may be simpler to come up with a discrete design that can run off that supply directly, rather than adding protection and a voltage regulator to produce a sufficiently clean 5V (or 3.3V, or whatever) to run a microcontroller. The final design will probably end up with similar complexity whichever route you go down.
Why not try both approaches, and see which you prefer? I guarantee you'll learn a lot of useful things either way.
For switching a simple load on/off in an automotive environment, I'd use a relay.
emece67:
.
Navigation
[0] Message Index
[#] Next page
Go to full version