I'm trying to create device that allows to play music with motorcycle engines - something like that. I need help with electronic circuit to make that work. Bikes which I would like to use have fly by wire throttles, and throttle sensor is device with two potentiometers inside: Throttle Position sensor

I added that circuit to make that work: 1 Way

So - I have used PWM output from microcontroler to send whole 5V to ECU SIG pins, and "smooth" them to proper throttle open % by PWM. But it has 2 problems: 1 - R6 and R7, on one bike they are OK, but when I put that exact same circuit into another I get "CHECK ENGINE" Error. Then i have to increase resistance to 1.5k Ohm. I would like not to use mechanical pot to change resistance. That problem might be due to some voltage leakage? 2 - PWM smoothing doesn't seem to hold RPMs very well.

So now comes time to redesign circuit. First thing I came up with is using simple Up/Down protocol digital potentiometer like MCP4021. That way I can solve problem 1, by making some presets in MCU memory and select proper for each motorcycle. I've only used one DPot instead of 2 (R6, R7) to make voltage on both ECU_Sig lines closer to each other (no mismatch in resistors R6 and R7). Will that work? Thats circuit (dont mind digital potentiometer control pins): Digital Potentiometer

Second problem is harder for me to solve, but I have some ideas. What I know is that I have to use DAC, and OPAmp to boost voltage from 3.3V(using STM32 for now, but probably I will go with MCP4725) to 5V to take advantage of full throttle range. I'm using LM358 there. Have You got any better recommendations regarding OPAmp? That is circuit for DAC - OPAmp boost: DAC - OPAmp boost

And now I'm looking for way to connect that to motorcycle ECU. I don't want to connect that straight to it, but with using MOSFETs, so when not used that circuit will be "disconnected" from motorcycle, and won't cause any problems. I'm not in favour of relays etc. Because in future I'm planning to use that circuit as throttle blipping device for downshifts, relays are too slow. There is only one way of connecting that I came up with: Connecting 1

But there is one major problem I see (correct me if I'm wrong). Whem OPAMP_OUT will drop to low voltage (lets say below 0,5V for AO3401A PMOS) Vgs would be at -0,5V with Gate grounded and it will be constantly ON, so I'll have to provide software "ALLWAYS DAC HIGH WHEN NOT USED", so that I could "disconnect" that circuit. Do You have any other ideas how I could achieve that?

  • 2
    \$\begingroup\$ Top Gear did this with cars but they used the exhaust note... \$\endgroup\$
    – Solar Mike
    Nov 24, 2020 at 9:45
  • \$\begingroup\$ Yes, I'd like to use exhaust note sound, but still need help with circuit :) \$\endgroup\$
    – xkam555
    Nov 24, 2020 at 18:45
  • 1
    \$\begingroup\$ There are probably too many questions in one posting to be compliant with the rules on EE, but I couldn't stop myself from upvoting this. \$\endgroup\$
    – ocrdu
    Nov 25, 2020 at 14:03

1 Answer 1


The P-mosfets can push the pot wire high, but they cannot pull low so well. Whenever the source voltage is a volt or so lower than the pot setting on the right, current will flow through the flyback diodes regardless of your On/Off or PWM. (I also don't see any smoothing or low-pass filtering of the PWM signal.) You'd need a device with a rail-to-rail push-pull output stage to influence the pot sensor both ways.

What about keeping it simple and using either a PWM signal with an RC-filter or a DAC signal and feeding that into two separate op-amps, each connecting to one pot slider. Needs more research to determine what happens when op-amps are unpowered. Possibly wiring a bidirectional analog switch IC after the op-amps.

Can you do this with a chainsaw, too?

  • \$\begingroup\$ I need IC between my module and motorcycle (safety). Switches like TS3A5223 seems like a good solution, but voltage at NC/NO pins can only be as high as VCC voltage. I don't want to power additional components with ECU 5V pin (I don't want to interfere motorcycle circuitry too much). I'm also thinking about mosfet relays like G3VM-402F - that is not as fast as bidirectional analog switch (1ms vs 50ns turn on time), but thats fast enough. Also I/O pins can be at way higher voltage level regardless of input voltage. What do You think about that? \$\endgroup\$
    – xkam555
    Jan 1, 2021 at 9:58

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.