0
\$\begingroup\$

I need some help with a circuit that will accept a digital input (0V-5V) and output 5V at 40mA for 200ms when the input goes high (5V), then drop to 20mA until the input drops low (0V.)

I had thought about using a capacitor to provide the 40mA that would discharge in the 200ms with a resistor that would then limit the current to 20mA, but I have no idea how to do that, or even where to start to make it work.

The load for this is an electromagnet that attracts a neodymium magnet. There are three in a row that makes a wheel turn as part of a clock. Basically a very slow motor.

For testing, I have used a pair of resistors where one provides 5V 40mA and the other provides 5V 20mA, then manually connected them to a coil. The 40mA moves the wheel, and the 20ms holds it in place. In testing, I tried many variations before settling on these values.

I had thought about using a larger set of shift registers so I would have two pins per electromagnet, but was hoping for a more elegant (at least electronic-wise) design.

This is way over my head design-wise, so any help would be greatly appreciated.

\$\endgroup\$

1 Answer 1

3
\$\begingroup\$

To rephrase the requirements: it sounds like you need two 20mA current sources (with 5V compliance voltage), one current source is always enabled and the other current source is controlled by a 200ms One-Shot that accepts a 5V logic trigger. (If I have misinterpreted the spec and you needed it to start with 0mA current before the trigger, rise to 40mA immediately after trigger, and then drop to 20mA after the 200ms delay, then you need both current sources to be controlled by separate One-Shot triggers with different time delays.)

(Update: "If the digital input is off (0v), no output to the coil. IOW, when it returns to 0v, the output to the coil should also turn off. The digital signal isn't a trigger. If on, the coil should be energized at 40ma for the first 200ms, the 20ma until the digital signal goes off.") -- This can be achieved with the same building blocks: two 20mA current sources in parallel, source#2's enable is driven by the same signal as source#1's enable, but with a 200ms one-shot timer function.

You mentioned the need to scale the design to handle 9 coils, that would be 18 identical current sources (either that or use 2 current sources and an analog mux or switch for routing). Depending on what resources you have available, it could be worth making a PCB once you have the first current source design how you want it.

Here is a thread about one possible current source design: Current source design

You can configure a common ICL7555 or NE555 timer as a One-Shot (or use the 556 if you need two One-Shots). An alternative to using the 555 timer would be to use an Arduino; 200ms timing should be pretty easy to achieve with that. I'm assuming that you have an Arduino or some equivalent microcontroller board generating the digital timing signals, so it should not be difficult to use two digital outputs instead of one. First enable source#1 and #2 for 40mA, then wait 200ms, and then disable source#2. If the microcontroller is handling other tasks then an interrupt-driven or timer-driven approach is better than idling with the platform's delay() function.

You can construct each of the current sources as an independent, testable unit (test using a resistor of known value that can handle the 20mA load current without exceeding the compliance voltage limit).

\$\endgroup\$
2
  • \$\begingroup\$ Almost. If the digital input is off (0v), no output to the coil. IOW, when it returns to 0v, the output to the coil should also turn off. The digital signal isn't a trigger. If on, the coil should be energized at 40ma for the first 200ms, the 20ma until the digital signal goes off. Using 555 or similar would be more involved than just adding more SIPO shift registers. Altogether, there will be 9 coils to be controlled, \$\endgroup\$ Commented May 1, 2020 at 7:59
  • \$\begingroup\$ updated based on new requirements \$\endgroup\$
    – MarkU
    Commented May 1, 2020 at 8:25

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.