6

I am currently trying to "hack" my way through a door lock, whose PCB cannot be changed. The task is to replace the motor for turning the cylinder with a Solid State Relay.

However, the only contacts available are the ones of the motor itself. Some kind of motor driver (not readable because small part & conformal coating) powers the motor for 200 ms using a positive voltage (+1.5 V), then does nothing for 5 s until it powers the motor with negative voltage (-1.5 V) to turn it back into start position. The motor appears to be isolated from P Power and GND of the PCB itself.

What I want to do - instead of powering the motor - is powering an SSR with the same contacts (desoldering the motor and put some circuitry in, that will eventually trigger the SSR from the positive pulse until the negative pulse appears).

I also have a 4,5 V Supply on the board, which is to be used to power the extra circuitry and trigger the SSR.

Here's a graph to visualize it better:

Input to Output

As you can see, what I want to do is similar to a basic on/off push button toggle switch turning on at the first toggle and turning off at the second toggle.

This would not be a problem to realize using a 555 timer as a Schmitt trigger like this:

enter image description here

However, the 555 is not meant to work with negative pulses (or is it?).

I'd appreciate your help, since I am fairly new in the electronics world.

ocrdu
  • 8,705
  • 21
  • 30
  • 42

2 Answers2

4

A circuit like this should work.
The op-amp is single supply powered by the +4.5V supply.

A positive input pulse above 0.5V + 1 diode drop (about 1V) will drive the opamp output high
and it will self latch.

A negative pulse applied to Q1 emitter will turn it on and pull opamp noninverting input low
and drive opamp output low.

As shown Q1 will pull OA input below ground. This can be prevented if required by various means.
One method of many would be a resistor in Q1 collector and a diode clamp of opamp input to ground.

The opamp can be any single supply amp with ground included in output and input range. eg a low cost and readily available LM358 dual opamp would be adequate.

Resistor values are "out of my head" and are probably 'about right'.

A diode could be added in Q1's emitter to allow only negative drive, but is probably not needed.

schematic

simulate this circuit – Schematic created using CircuitLab

Russell McMahon
  • 147,325
  • 18
  • 210
  • 386
4

A schmitt trigger sure seems the way to go. The issue, as you pointed out, is that a negative input will not be appreciated.

Since the ±1.5V signal is driving a motor, I think we can assume that it's a very low impedance source, and we can use it to offset a biasing potential, using only resistors:

schematic

simulate this circuit – Schematic created using CircuitLab

This is a resistive potential divider between the positive supply and the input, to offset the input signal:

$$ \begin{aligned} V_{OUT} &= V_{IN} + (5 - V_{IN})\frac{R_1}{R_1+R_2} \\ \\ &= V_{IN}\left(1-\frac{R_1}{R_1+R_2}\right) + 5\left(\frac{R_1} {R_1+R_2}\right) \\ \\ &= \frac{1}{2}V_{IN} + 2.5 \end{aligned} $$

Given your ±1.5V input (blue), what this gets you is orange here:

enter image description here

That's a perfect signal to operate a schmitt trigger, with hysteresis of a few tenths of a volt, centered around 2.5V:

schematic

simulate this circuit

R3 and R4 set the centre potential, R5 provides a small amount of positive feedback for hysteresis, and the comparator compares the offset input potential with the centre potential.

If you use an LM393, as shown here, you need R6 to pull up the open-collector output of the device, but you could also use a regular op-amp and omit R6. An op-amp should be a rail-to-rail output type, such as a TLC2272, since many models (like the LM358) might struggle to get their outputs high enough to reliably trigger digital logic inputs.

This circuit produces the following response, which differs from your original graph in that the output returns low upon the leading edge of the negative input pulse:

enter image description here

Simon Fitch
  • 27,759
  • 2
  • 16
  • 87