0
\$\begingroup\$

So just to give some background I've designed a circuit to suit the following task.

  • 12V DC Motor moving a carriage up and down a column
  • 2 'End stop' magnets, active-low hall effect sensor attached to carriage
  • Motor must move continuously to one end stop, change direction etc.

The physical motor/end stop construction cannot be changed in anyway, the motor and hall effect sensor are part of a pre-existing product

This is just a one off test rig but as I'm relatively inexperienced in circuit design I can almost guarantee I've done it the most awkward/overly complex way. I was hoping that people could provide maybe some insight into design changes

Personally I don't like my 'momentary to latch' circuit using the PNP, relay and inverters but was unsure of another way of doing so and this is the area I'd like critique on mostly. I got some input from another more experienced colleague who mentioned analogue switches or potentially using optocouplers.

Any input is appreciated, thanks.

enter image description here

\$\endgroup\$
6
  • \$\begingroup\$ I am unfamiliar with motor control but work frequently designing latches and flip flops. If you just want a level -sensitive latch, I would recommend a standard latch with transmission gate input and buffered output. This will reliably and simply hold whatever boolean value you apply when the transmission gate is open and pass that value through the output inverter/buffer, depending on which polarity you want. \$\endgroup\$
    – jbord39
    Commented May 25, 2016 at 16:37
  • \$\begingroup\$ Please describe what exact functionality do you expect of this latch: at what event should it discharge the stored "level 1"? The problem is: what happens if it holds the Hall effect sensor value forever? \$\endgroup\$
    – Master
    Commented May 25, 2016 at 16:46
  • \$\begingroup\$ @Master To add a little more detail, the motor always resets back to a centre point so on powerup it isn't touching the sensor. Basically my logic was it will move in a direction, see the negative from the hall effect sensor, turn off the PNP which changes the state of the NOT latch circuit, which changes the state of the NPN. Which either turns the DPDT relay on or off depending on its current state changing the motor wires polarity and direction \$\endgroup\$
    – user103993
    Commented May 25, 2016 at 19:25
  • \$\begingroup\$ So you need to change the relay (C1 A1 B1...) position each time you get a Low Logical Level from your Hole sensor, right? \$\endgroup\$
    – Master
    Commented May 25, 2016 at 21:00
  • \$\begingroup\$ Are you sure that the Hall sensor makes just one falling edge? I.e. there is no ringing, when the input signal goes low / high many times? \$\endgroup\$
    – Master
    Commented May 25, 2016 at 21:19

2 Answers 2

0
\$\begingroup\$

schematic

simulate this circuit – Schematic created using CircuitLab

Figure 1. CD4013 flip-flop.

A CD4013 D-type flip-flop will update its outputs on each positive-going clock transition based on the 'D' input. The Truth Table in Figure 2 shows the relevant inputs and outputs. By feeding \$ \bar Q \$ back to the data input we can get the device to toggle each time that the CLC signal goes high.

R4 and Q2 invert the logic of the Hall sensor as per your requirements.

enter image description here

Figure 3. Extract from CD4013 datasheet.

Be aware of a problem with this whole contraption: if you power-up with the carriage on the sensor there is no way for the logic to know which way to run the motor. You will need to come to some arrangement. If the carriage falls by gravity then it's just a matter of swapping the motor leads to ensure that on power-up it always moves up.

\$\endgroup\$
3
  • \$\begingroup\$ The motor resets back to a central position and has a mechanical stop to prevent falling due to gravity. Do all D-Type flip flops work off rising edge? Just thinking work off the falling edge could reduce the components further \$\endgroup\$
    – user103993
    Commented May 25, 2016 at 19:32
  • \$\begingroup\$ Most clocks work on rising edge. You have a second flip-flop available but I can't think of any way to get it to work as an inverter. \$\endgroup\$
    – Transistor
    Commented May 25, 2016 at 20:04
  • \$\begingroup\$ You can use an inverter between the clock and clock pin of the flop and it will become a negative edge triggered flip flop. \$\endgroup\$
    – jbord39
    Commented May 25, 2016 at 20:51
0
\$\begingroup\$

schematic

simulate this circuit – Schematic created using CircuitLab

Being completely ignorant of motor control I may be misinterpreting your need. But if you just need to latch a binary value you need a cutoff (looks like you are using a relay-style switch) and a bit storage node (back to back inverters are pretty standard).

Above is the schematic for a very general digital level sensitive latch. Depending on how much buffering you need you can remove some/most/all of the buffering inverters (NOT6, NOT3, NOT4). Also depending on which signal you are interested in passing, you may not need both FET's in the transmission gate (NFET passes good 0, PFET passes good 1).

NOT2 should be weaker than NOT6, to prevent contention when NOT6 wants to write a '1/0' to the bitnode and NOT2 wants to write a '0/1'. This can be done with packaged circuits by adding a bigger resistor b/w the supply voltage and the actual supply pin of the logic gate you want to weaken.

Alternatively NOT2 can be converted into a tri-state inverter and given the same signals as the transmission gate. That way when the transmission gate is open the tri-state feedback element is in high-impedance state and will not fight with NOT6 to write the data into the bit node. But this is more of a power saving technique and since this is a motor control circuit I would bet the huge majority of your power will come from the motor and not the latch.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.