2015年1月13日火曜日

Building a 7 MHz small transmitting loop antenna, part 4

Part 4 of this article series focuses on the PWM circuit for precise and slow control of the motor that drives the capacitor.

Attempt 1: Analog-to-analog motor control circuit 

Before discussing the final PWM circuit I used to control my motor, allow me to discuss another highly interesting circuit: the 7N3WVM "Remote Motor Controller" described here: http://www.qsl.net/7n3wvm/DC_mot_control.html. Please have a look at that page before proceeding.

The 7N3WVM circuit is attractive because it seems to offer an intuitive interface to control the remote motor: a locally-operated DC motor that is turned to generate an analog DC control voltage, which is then amplified by a power amplifier and sent to the geared motor. If clockwise rotation of the control motor generates a positive voltage, then counter-clockwise rotation generates a negative control voltage. Either polarity is properly amplified by the power amplifier and is sent along to the remote motor, allowing bidirectional control by turning the shaft of the local control motor left or right. What's more, faster rotation of the local control motor generates a higher voltage, leading to a higher voltage at the remote motor and faster turning of the remote motor.

The system sounds ideal, and initial tests were quite encouraging. I actually wired up a previous loop antenna using this motor control method. However, there is unfortunately a subtle but crippling flaw in this system: the motion of the remote motor is unreliable (more on that in a moment), so when turning the local control motor shaft indoors, you never know if your local knob rotation had no effect, some small effect, or a too-large effect at the remote motor. So you're operating essentially "blind", randomly turning the local control knob left and right, fast and slow, but never really knowing if the remote capacitor is moving at all, moving slowly, or moving too fast.

So what causes this unreliability in the motion? The problem is that rotating the local control motor's shaft generates a varying analog DC voltage depending on how quickly and how smoothly you rotate the shaft. For very slow rotations of the control knob, the generated voltage, after amplification, is too small to turn the remote motor. So nothing happens, and worse yet, you have no way of knowing that nothing happened (unless you implement some means of sensing the remote motor's current angular setting, via e.g. a potentiometer as mentioned in Part 3).

Then, if your steady hand rotates the control knob at just the right speed, then the remote motor will rotate slowly and smoothly. However, if you rotate the control knob too quickly, the local voltage jumps very high, leading to a very high amplified voltage at the remote motor, leading to a quick and jerky rotation of the remote motor. And again, with no feedback at the local operating position, you have no way of knowing when this happens.

I experimented with the supply voltage of the power amplifier; 7N3WVM recommends 3 volts. But I found that 15 volts worked best (note that the NJM2073D chip is rated for a maximum of 15 volts supply voltage), using a 3V motor for the local control motor, and a 3V geared motor (with 661.2:1 reduction) for the remotely-controlled motor. With 15 volts supply voltage for the NJM2073D power amplifier chip, even relatively small voltages, caused by slow rotation of the local control knob, were amplified enough to cause rotation of the remote motor. But even in this best-case scenario, I still could not completely solve the issue of unreliable, jerky rotation. Sometimes, the remote motor would not rotate at all; sometimes, it would rotate too fast.

I think it is very important that any remote control scheme work reliably: if you take some action locally (push a button, flip a switch, turn a knob), then it is imperative to know that something well-defined definitely did happen at the remotely-controlled device. As elegant as 7N3WVM's scheme is, it unfortunately fails this test, at least in my setup with my choices of motors.

I think the 7N3WVM scheme might be made to work well if some of the following ideas are applied:

  • Use a higher-voltage motor for the local control motor, to ensure that even slow rotations of the local control knob generate relatively high DC voltages. This should help ensure that slow rotations more reliably generate enough voltage to drive the motor at the remote end.
  • Use a higher gear reduction ratio on the geared motor at the remote end. My motor used a 661.2:1 reduction ratio; a further reduction ratio would physically limit the maximum rotational speed of the remote motor's output shaft, which would make jerky motion more tolerable.
  • If possible, add a potentiometer to the remote motor shaft to sense the remote motor shaft's current rotation. Then, display the potentiometer value with an ohmmeter at the local control position. This will allow visualisation at the local control position of the effect (if any) that the control knob rotation had at the remote motor.
  • When operating the local control knob, make a series of short rotations, separated by a brief and full stop of the control knob, instead of one smooth slow rotation. The intermittent nature of the series of short rotations is probably generating a pulsed output voltage which seems more reliable in ensuring motion of the remote motor.

Attempt 2: Transistor PWM control circuit

The previous paragraph mentioned that in the 7N3WVM control scheme, a pulsing voltage (generated by a series of short control knob rotations) was more reliable in achieving remote motor motion, compared to a steady low voltage (generated by a continuous, slow rotation of the control knob).

Indeed, a well-known technique for achieving reliable slow rotation of a motor, without stalling, is to use a pulse-width modulated (PWM) voltage. The technique and its motivation are described in many places, so I won't repeat the explanation here; see for example this page for a good introduction: http://www.electronics-tutorials.ws/blog/pulse-width-modulation.html.

The above page presents a PWM circuit using a 555 timer IC. I wanted a discrete transistor solution, and found a simple PWM circuit here: http://www.techpowerup.com/forums/threads/make-your-own-fan-speed-control-under-1-usd.124633/#post-1932968.

After building the above transistor PWM circuit and hooking it up to my geared DC motor, I was very pleased to see that it did allow reliable and very low-speed rotation of the motor. Unfortunately, after a few minutes, the smell of burning electronics drifted through the air, and I realised that the last driver transistor was smoking hot and certainly on the verge of failure. I used 2N3904 transistors throughout, and the motor was obviously pulling too much current through the driver transistor.

An obvious solution would be to use a power transistor capable of handling the motor current, but I had none on hand. And anyway, it seemed rather pointless to think about power transistors, when I already knew that I had a component on-hand capable of handling the motor current: the NJM2073D power amplifier chip from my previous experiments.

Final circuit: BJT PWM + power amplifier to drive motor

So, the logical next step was to use the transistor PWM circuit to generate a pulsed voltage, that would serve as the input to the NJM2073D power amplifier, which would then drive the motor. The final circuit as as follows.


Q1 and Q2 form an astable multivibrator. The values of the base bias resistors, R3 (for Q2) and R4/R10 (for Q1) were determined experimentally to yield a low-frequency pulse train. (An easy way to verify the pulse train frequency is to connect a piezoelectric earphone between ground and the Q2 collector and listen for the clicking or buzzing sound.) Switch S1 allows shorting out one of the Q1 base bias resistors, R4, which reduces the total Q1 base bias resistance from 570k to 100k. This has the effect of increasing the frequency of the pulse train, which leads to faster rotation of the output motor. With S1 open, very slow motion of the output motor is possible; with S1 closed, faster motion is possible.

The Q1/Q2 circuit was designed for operation off of 1.2 volts and was initially powered off of a separate 1.2 volt battery. Later, when reworking the circuit to use my main 12 volt power supply, I originally used a few silicon diodes to form a simple voltage regulator to supply 1.2 volts to the Q1/Q2 circuit. But during testing I empirically found a simpler solution: simply inserting R12 (10k) between the 12 volt positive rail and the Q1/Q2 circuit yielded about 1 volt available for Q1/Q2, and the Q1/Q2 multivibrator functioned properly in this simpler configuration. This is a rather ad-hoc solution, but it works.

Q3 is the driver transistor. Originally, the motor was connected directly between the Q3 collector and the positive rail. Now, instead, the Q3 collector does not drive the motor, but instead only provides input voltage (from the multivibrator pulses) to supply to the NJM2073D power amplifier. In 7N3WVM's original NJM2073D circuit, driven by the voltage generated by a DC motor, the input pins 5 and 8 are floating and connected to the DC motor terminals. 7N3WVM's "floating input" configuration allows both positive and negative polarities to appear at the output pins 1 and 3. However, in my circuit, instead of a floating input at pins 5 and 8, I have permanently tied pin 5 to the positive rail (through R13) and pin 8 to the negative rail (through Q3). This means that the output voltage at pins 1 and 3 will have only one fixed polarity and that the output motor can only be driven in one direction. Therefore, I added a DPDT switch at the output (S2-S5) to allow reversing the motor direction by flipping the DPDT switch to reverse the motor connections to the output pins 5 and 8. Physically, the DPDT switch also has a "neutral" position in the center where it is not connected to any output, which allows stopping the motor once the appropriate capacitor setting has been reached. For operating convenience, I chose a spring-loaded DPDT switch that automatically returns to the central neutral position when pressure is removed (an "auto-return" DPDT switch). This allows momentary pressure on the switch in either direction to rotate the motor in either direction, and automatic stopping of the motor when one's finger is removed from the switch.

Resistor R13, between input pin 5 and the positive rail, was determined empirically to limit the input voltage available at pins 5 and 8 such that the geared motor was just barely able to rotate. If R13 is too small, the input pulses at pins 5 and 8 are so large that they result in a strong, jerky motion of the output motor for each pulse. If R13 is sized appropriately, the input pulses (and output pulses) are reduced in strength such that the motor smoothly and slowly rotates. If R13 is too large, then no rotation of the motor is possible because the input pulses and output pulses are too small.

Due to the number of empirical adjustments made to the circuit, it is likely that the circuit will need to be adjusted if used with a different motor and/or a different capacitor (whose shaft stiffness will determine how much power the motor needs in order to rotate it).

Video of PWM-controlled motor in action

The following video shows the operation of the PWM-controlled motor. Notice the slow rotation of the motor gears and the extremely slow movement of the capacitor vanes, which are important to allow fine adjustments to the capacitor setting.

The video starts out with the slowest PWM pulse train. Later in the video, I close switch S1 which leads to faster motion. I also switch the DPDT switch to show reversal of the motor motion.

There is some backlash when reversing direction; it takes several seconds for the capacitor shaft to start rotating in the opposite direction. This was expected and is tolerable.

Most importantly, the circuit (after the empirical adjustments described above) is very reliable. When voltage is applied, the motor always rotates, at a slow and reliable speed. This makes remote operation easy; in particular, it is easier than the 7N3WVM analog-motor-to-analog-motor circuit, which was unreliable and prone to both under-responding (motor stalling) and over-responding (jerky rotation). But with the PWM circuit, it is possible to know with certainty that the remote motor will rotate in response to the local switch positions: with the DPDT switch in the upper position, the motor will definitely rotate clockwise with a well-defined maximum speed and no jerkiness (due to the speed limit imposed by the multivibrator pulse train); with the DPDT switch in the lower position, the motor will definitely rotate counter-clockwise, again with no jerkiness; with the DPDT switch in neutral, the motor will stop.

The system of course is not perfect: as with any mechanical system, there will be some unpredictabilities in the operation like slightly varying rotational speed, temperature-dependent expansion of parts or heating of grease, slow startup and overshoot on stopping due to friction and inertia, and gear backlash when reversing directions. Nevertheless, I expect that the system will be sufficiently convenient, accurate, and reliable for tuning the loop antenna.


2 件のコメント:

  1. Very valuable post, and certainly something to follow! Once the horrible hot melt glue is changed, you can have real reliability!

    返信削除
    返信
    1. It sounds like you might also be interested in building a similar analog motor control circuit? If so, I'd be interested in hearing what works best for you, especially if you try the 7N3WVM approach. I recently discovered that Tamiya makes a cheap motor with a much greater (almost ten times) reduction ratio than the motor I'm using. The motor is the Tamiya 70110 4-Speed Crank-Axle Gearbox Kit, which has a reduction ratio of 5402:1 (my current model only has 661.2:1). With a 5402:1 physical gear reduction ratio, it might not be necessary to use PWM, and the 7N3WVM circuit might work as-is.

      削除