Using 24V12 with ground switching PWM signal?


I bought a Polulu 24V12 Motor controller to control an electronic throttle as a bypass valve for an IC engine project.

The throttle is a 2A 12V sprung motor that I will control using PWM from my ECU.

The issue I see is that my PWM output from the ECU is ground switching. I.e. it is a normally floating channel that is grounded. Normally the PWM controlled device would have +12V on one pin and the switched earth on the other.

BUT, The 24V12 needs to see a positive PWM on the PWM pin right? So how do I overcome this? If I put the PWM
ground switched wire on the PWM pin, the circuit sees no control PWM as it is merely switching a GND to a GND.

If I put the PWM ground switched channel to the GND pin of the logic circuit, wont the whole circuit see a bad GND?

Otherwise I could put 12V to the GND pin and then this would switch with the PWM, but again the logic circuit loses its GND.

Any ideas how to solve this?

Thanks! :smiley:


Do you actually have our High-Power Motor Driver 24v12? Our Simple Motor Controller 24v12 is a different product and does not have a PWM input.

It sounds like your PWM output is an open-drain or open-collector output. If that is the case, you should be able to connect it to the PWM input of the driver along with a pull-up resistor to 5 V. This way, the input will alternate between being pulled high to 5 V and driven low to ground. The grounds between the ECU and the motor driver should be connected normally.

By the way, please be very careful if you are using this engine in an actual vehicle. We do not recommend using our products in situations where their failure is likely to cause injury or damage.

- Kevin

Hi Kevin,

Yes is it definitely the high power circuit :confused:

I found the answer on the Megasquirt forum as well, now have a 100k pullup tied in parallel to +5V on the PWM line.

BUT, the circuit is not working. I have it all connected up and have tested the PWM output and it works as expected, however, I never see an output on the motor control channels.

How can the circuit become damaged? Nothing is burnt on the board. I took care to cover the 5V pin next to the V+ on the logic side before I applied any power to avoid this short.

A second question - how does the locked anti-phase operation work if the grounds on logic and power side are shared? I wanted to test this operation as the PWM operation does nothing, but I cannot complete a 5V circuit as the instructions are to share both logic and power grounds. I have 12V power, and 5V logic, so how can I use the locked-antiphase mode??? Unless I separate the grounds and ground the logic circuit back at my ECU?

Thanks for the concern but this is not a part of the airpath of the engine where a failure could cause a runaway engine, i.e. it is not main throttle. Both failing open and close would result in a low-power condition, the throttle itself is sprung…

Any ideas how I can test the circuit further to make sure of a failure?


I am concerned that 100k might be too weak of a pull-up; could you try a resistor in the range of 1-10k? If that still does not work, could you please post a diagram or some clear photos of your setup showing how you have everything connected?

I am not sure I understand your questions or concerns about using locked-antiphase mode. To use it, you would connect logic high (5 V) to the PWM pin on the driver to while connecting your PWM signal to the DIR pin on the driver. The different motor and logic voltages should not matter, nor should the presence of a common ground, as long as you have everything connected properly.

Please note, though, that it is very unlikely that the driver could be damaged in such a way that sign-magnitude mode doesn’t work while locked-antiphase mode does, so I recommend that you pick one mode of operation and stick with it instead of repeatedly switching between the two modes while we are trying to troubleshoot your setup.

- Kevin


I am only trying to use PWM. The other mode is not useful to me, was only using it to test the circuit was not dead.

I think my problem may be simple, I realised that I had the GND’s both connected to the motor control, but not also connected to the logic GND back at the ECU, so the PWM was not grounding. I will try it again. I don’t usually make a mistake like that but I think I might have!

I will retest again with the 100k pullup (as suggested by the ECU forum), and see if it works this time.