# Mount 360 degree rotator with camera using 2 pins (Power line and Gnd)

I am designing a rotator circuit which consists of a 5v stepper motorenter link description here and 5v DRV8834 driver ICenter link description here. The driver IC got 1 pins which is a step to control the motor. The problem/question is that only a two lines come from the camera top section. The camera top section runs at 12V. Is that possible to use the same 12V line to toggle as a 5V step pulse as well? The idea is as soon as the bottom section is connected to the top section, the Intelligent circuit should recognize whether the rotator is receiving 12V power or 5V step signal. If it is 12V then the system stays on and shouldn't consume current as well doesn't harm the motor. When it receives 5V step signal it goes through the 5V buck regulator (only if needed?) and supply the voltage to the motor and turns on the rotator. Is that possible to connect? I have attached the rough block diagram. Please let me know your ideas.

simulate this circuit – Schematic created using CircuitLab

• I'm confused. Perhaps a sketch of how you want this to work would help. Commented Oct 31, 2017 at 17:16
• Are you looking for something like a slip ring? Commented Oct 31, 2017 at 17:21
• Thanks Trevor. Probably it is good idea to add a rough sketch. I will do that. @Ron No I have already looked into but the budget for the rotator is less. I will add a rough sketch where you will get some ideas. Thanks for both Commented Oct 31, 2017 at 17:38
• Please add hyperlinks to datasheets in your question so we don't all have to look for them. Commented Oct 31, 2017 at 22:32
• Thanks, Transistor. I've tried to add a schematic with block diagram. But it is asking for membership. Let me check is there any free circuit simulator by that I can paste here. Commented Nov 1, 2017 at 13:03

There are a few ways to do this, here is one.

The trick with this one is to send the power and ground through the two wires and modulate the 12V to encode the STEP and DIR signals onto the 12V line. In the schematic below the top part is your transmitter. Note you need the 12V rail and the 5V rail.

simulate this circuit – Schematic created using CircuitLab

The STEP signal turns the 12V on and off. If the DIR line is low the 5V line takes over for the 12V, if DIR is high the output will be open.

The receiver, shown at the bottom of the schematic, rectifies the signal and regulates it to your required 5V.

At the same time the level is compared against reference voltages created from the regulated 5V to extract the STEP and DIR levels. D3, R6 and C3 delay the STEP signal a little to ensure the DIR signal has sufficient setup time before the rising edge.

Considerations: The values shown were calculated and simulated for 1kHz step rate. Faster step rates may run into timing issues that prevent this circuit from functioning. It is also important to keep the STEP signal low for more than about 60% of the time in order for the PWM effect not to starve the regulator. Note though, holding STEP high will actually turn off the stepper eventually.

If you do not need the DIR line it is a bit simpler.

simulate this circuit

In this version I changed the driver side a little to get rid of the invertor gate. The receiver now is just a simple voltage divider and Schmidt Trigger invertor.

The STEP line should be normally low and only pulsed high for 20-30us or so.

When STEP is low, M1 is on sending 12V to the motor board which charges C1 and lets the regulator power your motor driver. When STEP_IN goes high, M1 turns off and the 12V is cut. The receiver, brings the 12V line down to logic levels via R4 and R5 and D2 makes sure that division never goes over 4.7V. The Schmidt trigger invertor then goes high when the 12V it turned off.

EDIT

Here is a better version, faster modulation and less ripple on the 5V.

• Comments are not for extended discussion; this conversation has been moved to chat. Commented Nov 8, 2017 at 16:58
• hi Trevor, this is the place where I really need help! I would like to find out whether I am doing correct way to calculate the base resistor value. This time I made some research and not want to pick the random values as per your suggestion which is good for me to learn. I've used Ib=Ic/hFE to calculate my base current (i know the load current is 100mA and the hFE is 100 so the Ib is 1mA). So R=(V-Vbe)/Ib= (1.8-0.85)/.001=950 ohm (1K). The value calculated is correct? please guide me. Sorry to bother you Commented Nov 9, 2017 at 14:51
• oh no Sorry to really bother you.I thought the top part of the circuit was working and generating an output pulse at the drain by changing the MOSFET M1 to IRF9Z14PBF but it is not. I am getting output pulse on the gate but not on the drain. Let me figure it out using veroboard. Thanks Commented Nov 13, 2017 at 13:52
• I have understood that by changing the D1 as basic rectifying diode will stop the 12v coming from cap which means it doesn’t float and pulled low when the pulse is low? Commented Nov 13, 2017 at 17:45
• That makes sense. I don't think I am going to use full step. So definitely there should be a way to drop the holding current. No problem. Let me check and I will let you know. If not I will post another question. Great thanks for your help so far. You made me love electronics. Commented Nov 21, 2017 at 12:31

simulate this circuit – Schematic created using CircuitLab

Figure 1. Stealing power from the STEP and DIR lines.

Figure 1 shows one slight possibility that I have never seen used.

• The STEP and DIR signals need to be boosted to provide enough current and voltage to drive the motor.
• D1 - 4 tap off and rectify the signals to provide power for the chip and motor.
• The STEP and DIR signals are optimised to maximise the time when the signals are at opposite logic levels. i.e., When DIR is low the STEP should have a high mark-space ratio. When DIR is high then STEP should have a low mark-space ratio.
• C2 is intended to hold maintain the voltage between DIR and GND in the times when STEP and DIR are at the same level. (These times are kept short by the micro-controller code.) Without it there would be no ground reference for the input signals.

One big problem with this is that the signal received by the STEP and DIR inputs will exceed that of the chip - both positive and negative.

simulate this circuit

Figure 2. A pair of transistor drivers buffer the over-voltage STEP and DIR signals to the motor driver.

Figure 2 is an attempt to address this problem.

• +1 but that's really three lines... don't forget ground. Commented Nov 1, 2017 at 17:18
• Also, why is the 100uF cap on the DIR line Commented Nov 1, 2017 at 17:20
• Ahh @Trevor! I didn't explain adequately although I did explain what C2 was for. There is no GND connection. I'll see if I can do a better job. Commented Nov 1, 2017 at 17:29
• OH.. appologies, I did not recognize it as a full bridge.. my bad. Commented Nov 1, 2017 at 17:47
• Still... I think the 4.7mF cap would handle the both high or low transistions pretty well. Commented Nov 1, 2017 at 17:51