2

Design goals/Problem: I want to design/build a device that can detect a specific input voltage between 0-5 vdc (I'm not sure exactly what voltage yet, but let's just say it's 2.8 vdc as an example) and when it does, it provides a connection to ground for the control side of an automotive relay (something like this)

This relay has a coil with a 1.3w power rating. The device would operate in an automotive application, with the purpose of activating the coil side of the relay when the device senses 2.8 vdc on the input line. The device would operate on typical automotive electrical power (12-15 vdc). The relay will be used to control a high-power circuit (reverse lights). The input is a variable-voltage transmission range sensor (it outputs a different voltage between 0 and 5 vdc depending on what gear is selected - this is an existing sensor on the vehicle that provides a signal to an instrument cluster that shows what gear is selected - but I don't know the output voltage-to-gear matrix yet, gotta do some testing), so this device is basically a reverse-sensing device used to activate the reverse lights using a relay. The application is for my UTV (off-road vehicle).

My questions:

  1. would it be possible to design this using only discrete components, and if so, how? I'm thinking it could, but option 2 below might be easier and more cost-effective.

  2. what about using something like an AT-TINY 20 to accomplish this, or is this "overkill"? I imagine it could be programmed to detect the voltage easily enough and control the output (ground) for the relay using the GPIO pins, but I also imagine I would need some additional discrete components (MOSFET to control the ground side of the relay due to the current requirements of the relay coil - 1.3w, which at 12vdc nominal would be about 110ma if my ohm's law calculation is accurate), since I doubt the AT TINY can handle that much current sink to ground.

I'm just getting into electronics and trying to learn (I've picked up a myriad of development boards - an ardunio uno, Rpi zero w, BASYS3 FPGA board, and a few TI TIVA LaunchPads - to play with), so I'm unsure of how to reach my design goals for this device due to my lack of knowledge. My background is an an automotive technician, specializing in electronic engine/powertrain diagnostics and electrical diagnosis. I'm currently taking college classes for Engineering Technology as well.

I also realize that this could be accomplished with some type of switch on the shift linkage that operates the relay directly, but where's the challenge/fun in that? BORING.

Thoughts?

MX372
  • 21
  • 1

2 Answers2

1
  1. It would fall under a window comparator, there are ugly ways to do this with transistors, but really you would use an op amp for the problem (alternatively a dedicated comparator IC) this is usually a dual op amp IC and 3-5 resistors + power supply and some other components to drive your ouptut relay)

  2. Its not overkill if it does the task and is within your scope of knowledge to solve the problem, "when all you have is a hammer...." in this case you would be using an NPN or mosfet to actually switch the relay coil leg to ground like in the first case.

Reroute
  • 4,517
  • 6
  • 14
1

They make chips that likely do exactly what you want - turn on an open collector output when an input reaches a specified voltage. They are called things like power sequencers or voltage detectors.

Here is an example of one where you can specify the threshold voltage up to 6V....

enter image description here

https://www.maximintegrated.com/en/products/power/supervisors-voltage-monitors-sequencers/MAX16052.html

...but there are many others to pick among depending on what voltage range, what output, what kind of reset behavior, etc.

You could also do this with an ATTINY using the built in analog to digital. You'd likely need an LDO (and decoupling cap) to regulate the 12V down to 5V to power the chip and you'd also likely need a transistor (and flyback diode) to drive the relay.

bigjosh
  • 10,088
  • 32
  • 52
  • Thanks! So using something like the MAX 16052, I would need an external voltage ladder to set the input voltage to be detected, and use a MOSFET to control the relay coil from the output of the 16052? – MX372 Jun 28 '20 at 08:06