Problems reversing a field-wound motor driven by an electronic speed controller...

Thread Starter

Dodgy Geezer

Joined Nov 30, 2009
181
The maximum output from a '358 is about 1.5V below the supply voltage.
When used as a comparator, does it always output the max voltage? That seems to be what it is doing here.

I have got better results with this configuration. One of the LM358 comparator pins is held low, and the other will only accept power when going in reverse due to a diode. The PWM signal is meant to be flattened by the resistor/capacitor pair. This works most of the time, but the output signal still turns off at full reverse power...
 

Attachments

Alec_t

Joined Sep 17, 2013
15,119
When used as a comparator, does it always output the max voltage?
It will if the non-inverting input voltage is more positive than the inverting input voltage, unless you take steps to reduce the voltage gain of the opamp.
Even if you get this field reversal to work by using a comparator, won't some delay circuit be needed to prevent the motor being reversed instantly when the operator slams the control stick from one extreme position to the other?
 

Thread Starter

Dodgy Geezer

Joined Nov 30, 2009
181
It will if the non-inverting input voltage is more positive than the inverting input voltage, unless you take steps to reduce the voltage gain of the opamp.
Even if you get this field reversal to work by using a comparator, won't some delay circuit be needed to prevent the motor being reversed instantly when the operator slams the control stick from one extreme position to the other?
That's a man-machine interface issue. You need to balance out the danger of damaging the drive-shaft equipment by giving a sudden command against the danger of not being able to avoid a collision because you can't give a sudden command. With a single control stick the operator would know that he was performing a dangerous action by moving the stick rapidly, in the same way as he would know not to command a tight turn at speed, so I have come down on the side of not having a delay. And I would like to get the basic circuit working before adding any extras!

I don't really understand the inverting/non-inverting inputs. I am treating them as just two sensor lines, and I suspect that part of my problem is that I an using them incorrectly.....
 

Alec_t

Joined Sep 17, 2013
15,119
the output signal still turns off at full reverse power...
That could be due to the fact that the common mode input range of the '358 goes from zero only to ~1.2V below the +ve supply rail, i.e. ~6V with a 7.2V supply.
I think the effects of PWM pulsing, plus motor BEMF, are going to cause erratic triggering of the comparator unless you add hysteresis.
I understand that, in ESCs of the type which use an H-bridge of MOSFETS to control speed and direction, one motor terminal is clamped to a supply rail (+V or ground, depending on whether high-side or low-side pulsing is used) while the other terminal is pulsed. If so, an alternative approach to using a comparator is simply to monitor the voltage on one motor terminal and detect when it changes from static to pulsing. Below is a suggested circuit to do that. Simulation shows it should work over a 6V-12V supply range, a 1kHz to 20kHz PWM frequency range, high or low side pulsing and a 1% to 99% duty cycle range.
ESC-reverser.PNG
Here, m1 is the input from one motor terminal. The circuit shares a common ground with the ESC. When m1 is pulsed, C2 charges up and Q1 switches on. When m1 is static, C2 discharges quickly via the Q1 base-emitter junction and Q1 switches off.
 
Last edited:

Thread Starter

Dodgy Geezer

Joined Nov 30, 2009
181
That could be due to the fact that the common mode input range of the '358 goes from zero only to ~1.2V below the +ve supply rail, i.e. ~6V with a 7.2V supply.
I think the effects of PWM pulsing, plus motor BEMF, are going to cause erratic triggering of the comparator unless you add hysteresis.
I understand that, in ESCs of the type which use an H-bridge of MOSFETS to control speed and direction, one motor terminal is clamped to a supply rail (+V or ground, depending on whether high-side or low-side pulsing is used) while the other terminal is pulsed. If so, an alternative approach to using a comparator is simply to monitor the voltage on one motor terminal and detect when it changes from static to pulsing. Below is a suggested circuit to do that. Simulation shows it should work over a 6V-12V supply range, a 1kHz to 20kHz PWM frequency range, high or low side pulsing and a 1% to 99% duty cycle range.
View attachment 164940
Here, m1 is the input from one motor terminal. The circuit shares a common ground with the ESC. When m1 is pulsed, C2 charges up and Q1 switches on. When m1 is static, C2 discharges quickly via the Q1 base-emitter junction and Q1 switches off.

Thanks for all your work on that! I'll have a go at putting it together in a while. I wonder if all ESCs work that way, including the ones which have a reverse function, because those are the ones I want to use it for...?

The motor terminals are going to have quite a lot of noise coming out of them - does your circuit expect that?

In the meantime, I had been working on the comparator - which seemed a more elegant solution to the problem - and ended up going for a single monitoring line like you suggest. My problem seemed to be getting the right component values to smooth the input signal - I think I have achieved that with 33k and 5nf.
I now have a circuit which seems to work on the bench - though I don't know if it's good in theory.. I enclose a schematic.

I'm now having difficulty making it drive an NPN so that I can switch a relay! It drives an LED fine...
 

Attachments

Alec_t

Joined Sep 17, 2013
15,119
I wonder if all ESCs work that way, including the ones which have a reverse function, because those are the ones I want to use it for...?
The H-bridge purpose is to provide a reversing function. The alternative is a DPDT relay.
My circuit would cope with either type and should be reasonably immune to noise on the motor terminals, especially if a capacitor (say, 33u-100u) is connected in parallel with the relay coil.
 

Thread Starter

Dodgy Geezer

Joined Nov 30, 2009
181
I will have to stock up on more components before trying your circuit - would any NPN transistor do? I do have a D667 hanging about.

Also, how would you attach an NPN transistor to the output of the op-amp? The circuit I have seems to work quite well, but I don't see how to connect a transistor to it.

There is one problem which needs thinking about. I don't know what happens in a field-wound motor when it overruns.= if you drop the power sharply. Will extra back emf be generated and could this cause problems?
 

Alec_t

Joined Sep 17, 2013
15,119
The D667 (or any NPN which can handle the relay coil current) will be fine.
how would you attach an NPN transistor to the output of the op-amp?
If you mean in your present circuit, then op-amp output >> resistor >> transistor base. The resistor should be sized to allow a base current about 1/10 of the coil current. NPN emitter >> ground. Relay coil between NPN collector and +v supply.
Will extra back emf be generated and could this cause problems?
A well-designed ESC should cope with BEMF and switching transients, but it doesn't hurt to provide extra suppression components across the motor. Since the relay will be switching the field winding, arc-supressor capacitors across its contacts would be advisable.
 

Thread Starter

Dodgy Geezer

Joined Nov 30, 2009
181
One advantage I have is that the field coil switching will only occur at low voltage - in theory, at the dead point where there is no voltage at all. That will be good for the relay contacts as well.

1/10 of the coil current would be low - I guess a typical 6V relay has a coil using 0.5W. That's 700mA. 70mA at 7v suggests a resistor of about 100ohms?
 

Thread Starter

Dodgy Geezer

Joined Nov 30, 2009
181
That was just a guess - I haven't actually got a relay to measure, I ordered a couple of likely ones off ebay but there was no coil data specified. We would need about 10A max through the contacts for a Taycol, so something a bit bigger than a pub mounted one is called for. perhaps I should wait until it turns up....
 

Thread Starter

Dodgy Geezer

Joined Nov 30, 2009
181
..............Below is a suggested circuit to do that. Simulation shows it should work over a 6V-12V supply range, a 1kHz to 20kHz PWM frequency range, high or low side pulsing and a 1% to 99% duty cycle range.
View attachment 164940
Here, m1 is the input from one motor terminal. The circuit shares a common ground with the ESC. When m1 is pulsed, C2 charges up and Q1 switches on. When m1 is static, C2 discharges quickly via the Q1 base-emitter junction and Q1 switches off.
Well, the op-amp comparator approach seems to work as well as I can test it on the bench without a relay, so I'm starting on the 'pulse-checker'. I don't have any 1uf polyester or ceramic - will electrolytic radial do?
If it runs well, can I put it up on the Taycol board (with due acknowledgement, of course)?
 

Thread Starter

Dodgy Geezer

Joined Nov 30, 2009
181
Yes, but ensure correct polarity. You could use higher values than the 1uF shown, at the expense of delaying the pulsing/non-pulsing decision.

OK - it's important to get the crossover point decision as close to zero as possible - less arcing load on the relay, and better usability for the operator. You don't want a boat slowing to a stop, then lurching forward for a second before going into reverse, or vice-versa!
 

Alec_t

Joined Sep 17, 2013
15,119
Here's the sim of a mod of my circuit, using a pair of NPNs (your D667s would do) connected Darlington-style to drive a heavy-duty relay. The input waveform now has a couple of Volts of random noise superimposed but the voltage across the relay coil switches cleanly.
ESC-reverser4.PNG
 

Thread Starter

Dodgy Geezer

Joined Nov 30, 2009
181
Looks very professional! I'm afraid that work took precedence today - I'll try to do a build tomorrow.

Incidentally, how are you on induction and RFI? I ask because the Taycols had an odd design quirk - the field coil was initially wound as two separate coils connected to each side of the armature, and early 1950s documentation seems to claim that this lowered RFI. They dropped this design by the 1970s, and I can't see why this claim might be made. Can you think of any reason?
 

Thread Starter

Dodgy Geezer

Joined Nov 30, 2009
181
Right = I put together your original circuit driving an LED, building it off recovered components....

First shot was using electrolytics, and an LC954P, which the datasheet claimed to be a general-purpose NPN. The led stayed on all the time.

I thought that maybe the LC954P was dead, so I tried the next one out of the box, which was a C1815. That also had the LED on continuously.

I wonder if the caps are dodgy? Would you like a signal pic from anywhere in the circuit?
 

Thread Starter

Dodgy Geezer

Joined Nov 30, 2009
181
Hmm... I think I have the wrong pinouts for these old transistors. I tried a D467, and that operated well on positive-going pulses. No led at zero, and strong on during positive pulses. The problem was that it also went strong on on negative pulses, until the voltage built up to around 6v, when it turned off. I shall try some more transistors...
 

Alec_t

Joined Sep 17, 2013
15,119
The transistor pin-out is important :). How/where is the LED connected?
A pic of your actual build may help, also the motor spec. 'Scope shots (scope DC coupled) of the waveforms at both ESC output terminals, with the motor connected, would be useful.
What ESC are you driving the circuit with? Do the power supply, ESC and built circuit have their grounds commoned?

Edit: Re the RFI, I'm no expert but perhaps the split field winding and coil shape/positioning allowed partial cancellation of parasitic external magnetic fields.
 
Last edited:
Top