Ideas for 0-5vdc motor control

You can choose between PWM or 1-2ms (MOT_PWM_TYPE).

Good point. I forgot how “Brushed BiPolar” output works. This could be level shifted and filtered/converted to get the desired result for the application.

Nice. I think my isolation concerns can be met with a simple optoisolator as well. Gonna head down that route.

1 Like

If you are talking about the control arm, I do think it is a Hall Sensor.

I have that module arriving from Amazon between June 10 - June 20. I have orders a couple others options, but none seem to produce a 5v out…

I was able to throw together a circuit to do the job. I used some old 6N138s and LM358 op amp to make a super simple isolated DAC. Here’s the schematic:


And the prototype on a breadboard running a motor from a PWM gadget I made:

2 Likes
2 Likes

This is the way.

And if you want manual/ride-on control as an option, just use a switch to isolate the generated signal from the old stock hardware. Pretty easy circuit if you can handle the above!

100% my intention. Switching to 100% manual override will be as simple as adding a single DPDT switch. So much better than a mechanical linkage.
Thanks all for the inspiration and help!

2 Likes

Nice!

Ordered this today. But now going to have see about making your DAC.


Also I found male and female plugs to keep from having to splice into the existing plug.

It took forever tofind the Male plug ($20.24).

The connector only has 3 wires actually going to it; signal, +5 and ground. I just went for it and cut the signal wire. I’ll probably use (fantastic) Wago connectors to hook it all up.

The DAC circuit I made works but as I explained in the demo the LM358 isn’t a rail to rail op amp so the forward speed isn’t maximized because it can’t bring the output fully to +5v. I’m looking for a better amp now. It should work as is but if you make the thing, use a separate amp per controller so as to not cause any potential interference. Also socket the op amp IC so that a better amp can be dropped in; they all pretty much have the same footprint.

I also came across this…

I also planned on using a switch to go from manual to RC. This is one I found. Remember you have a natural switch on the control arms and a seat switch.

Would love to find an plug switch where I can plug it in and automatically switch between the modes. I have also thought about a relay board to do the switching. So when you plug the controller in, it will also power the relays to switch over.

I used that exact relay module on my scag and ferris mower conversions. They work great but you need to have 4.6 firmware which fixes the logic inversion issue for driving the relays (they default ON on powerup which can be bad). I’ll probably use them again in this conversion for the PTO drive. And lights just because.
Personally I wouldn’t use those ESCs due to ground loop concerns. You’d have to tie all the signal grounds together which creates a big loop inductor. EMI induced into the loop will create voltage spikes which could damage the controllers.

Redrew the schematics with the LM358 IC as a chip. Checking if I missed something.

1 Like

Looks nice. What did you use to generate this? I used Kicad, yours looks much nicer.
One thing to add might be some bypass caps on the power source from the mower. Also I might combine R4 and R5 into a potentiomer so that the gain can be adjusted. The other pot is for zero centering. Both should be trimpots.
I have uncle bezos dropping off some MCP602 op amps tomorrow. They might work better as they are rail to rail amps. Will keep you posted. Thanks for doing that!

1 Like

I used Adobe Illustrator (AI) to draw it. I also used AI to open the specs PDFs for the ICs to get more info for their illustration.

Now I am going to have to search on how to use a bypass cap, will redraw to make sure I don’t screw anything up.

How were you planning on powering the flight controller and PWM adaptor.

I plan on using two separate DC to DC tranformser connected directly to the 48v battery.

First transformer will be 48v to 12v the second will be 12v to 5v. Each having their own power bus. Wondering if this might help with ground loop…

Well shoot it looks like the MCP602 ICs Jeff delivered today were counterfeits. They don’t go anywhere near the rails as advertised. I saw where others had this issue with them as well. I’ll try ordering some real ones from digikey.
The LM358 can work but you won’t get maximum speed out of the mower especially in forward.
That said it’s probably fine because the mower is crazy fast anyway.
As far as powering I plan to use the existing DC-DC converter on the mower (the silver box under the switch panel). I’ll run 12v to the Kakute H743 wing FC which has a huge 5V regulator on board. It’s the one I use on all my rovers.
Bypass caps just go across the power wires (+5 and ground). They are used to filter out noise on the power bus. Typically a larger electrolytic to handle the big swings and a smaller ceramic type for the higher frequency transients.

I’m using the Cube Orange (pixhawk). Could use a the Power Module from the 12v to FC. Also got the cube purple and rover base.


Do you think not using the existing DC-DC converter and the self-contained option would help the ground loobback? (Still learning (re-learning)…

Trying to make it a plug and play and move from one mower to another (electric and gas)

I thinking of using one of these for the PTO and Lights

Also looking into a isolation transformer to solve/help with ground looping, trying and exerimenting with options.

What value do you think this should be?

Thanks,

Here is an update: