This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pypilot motor controller
#1
Hello,

Is this motor controller https://pypilot.0337ml-user.freehosting....duct_id=50 opensourced ? I want to build one to test pypilot with my very old ah2000 drive unit, but I wasn't able to find schemes.

Thanks !
Reply
#2
all i can get out of the arduino code is
pins 7/8 are limit switches optional
pin 9 controller pwm
pin 4 shunt resistance. does a lot with this..temp end of travel ? 23/A4.?
mare liberum
Reply
#3
I've bought a VNH2SP30
Since i've an arduino nano, i think i can try to compile and run it. But it's disappointing, in a "revolution" made by an open source pilot like pypilot, that hardware controller is not open sourced Sad
Reply
#4
The controller is completely opensourced free software. See arduino/motor/motor.ino

I do not have the VNH2SP30, but I ordered some. I should have soon. This is why it is not supported by the code.

You would need to modify motor.ino, and change the way pwm works to drive this controller rather than a standard speed controller which uses the pwm as a speed signal rather than to actually switch the mosfets.

I also always optically isolate the arduino from the raspberry, so keep this in mind.
Reply
#5
i don't know how i missed this, but its making more sense to me now..
https://github.com/seandepagnier/brushed_tgy
mare liberum
Reply
#6
I have been testing today a new design which drives mosfets directly from the arduino and no ESC is used.

It can only do brushed motors, and it's designed for much higher power, to drive 30 amps continuous or 60 amps in peak. The typical ESC I used before were "30 amp" but have much smaller transistors and would be a problem to drive more than 10 amps, and even then only with good cooling. The "30 amp" esc work great for 2-3 amp motors like windshield wiper or old tiller pilot and wheel units.

This version can mount the mosfets directly to an inverter style box, and the mosfets are 1-2 milliohm on resistance. I also have all 60 volt parts which is safer and longer lasting, and additional protection for voltage spikes.

After initial issues, it seems to be working fine and the mosfets stay completely cold driving my wiper motor.

It has a lower idle current because there is only one uC now, so this saves power. In the future I may replace the 5v regulator on the arduino with a switching one to further save power.

I can also easily design for 12, 24, 48 or any voltage needed.

I hope to test soon sailing a boat with hydraulic motor. The motor draws 15 amps just moving the rudder. I will report my results.
Reply
#7
(2018-06-12, 09:17 PM)seandepagnier Wrote: ...
It has a lower idle current because there is only one uC now, so this saves power.  In the future I may replace the 5v regulator on the arduino with a switching one to further save power.
...

I think you are heading in the right direction here, adding a simple "H" bridge, But:
Would it not be simpler and more efficient to get rid of the Arduino completely and just add an ADC to the RPi ?

Come up with a drip proof box with a heat sink and terminal strip for connections and you would have a very simple and easy to install autopilot with better functionality than commercial units that cost thousands of dollars. 

Cheers,
JM.
Reply
#8
(2018-06-14, 12:54 PM)NahanniV Wrote: I think you are heading in the right direction here, adding a simple "H" bridge, But:
Would it not be simpler and more efficient to get rid of the Arduino completely and just add an ADC to the RPi ?
The arduino is probably the simplest way to add an ADC to a RPi already.

There is optical isolation to protect the raspberry and the simplest way to do that is over a uart, not spi.

Furthermore, the raspberry has difficulty generating decent pwm signals especially for 4 channels.

Finally, the arduino can react to overcurrent, end of travel or rudder feedback stops much faster than the raspberry ever could stopping the motor much more quickly.

I got the current down to 16mA for the controller which isn't great.  About half of this is the cheap regulator and power LED.   Finally, if it were running at 3.3v instead of 5v it would drop significantly.   So it's definately possible to make the controller use 5mA or less eventually.  It uses about an extra 1.5mA when it's driving the mosfets.

A different uC could probably get the consumption down to 2-3mA
Quote:Come up with a drip proof box with a heat sink and terminal strip for connections and you would have a very simple and easy to install autopilot with better functionality than commercial units that cost thousands of dollars. 

The mosfets I am using make it possible to run at 15 amps continous without a heat sink, but 60-80 amps with one.

I tried bolting them to an aluminum case with insulating pads, and insulating washers, and I do not like this.  It seems too easy to accidentally short out.  I will redesign the board so that the mosfets are clamped a different way.
Reply
#9
"There is optical isolation to protect the raspberry and the simplest way to do that is over a uart, not spi."

it would seem that the opto should be between arduino pins and the 12v mosfets
or are you powering the arduino with 12v.?
i have a few MOC3041's left over that i got for other projects.
i've been going thru my parts bin and the builder bug bit me..
mare liberum
Reply
#10
(2018-06-15, 11:25 AM)jim321 Wrote: "There is optical isolation to protect the raspberry and the simplest way to do that is over a uart, not spi."

it would seem that the opto should be between arduino pins and the 12v  mosfets
or are you powering the arduino with 12v.?
The analog voltage and current measurement for the motor would also need to be isolated, so it's not possible with simple optical isolation. I am protecting the raspberry from the motor controller, not the arduino.
Quote:i have a few  MOC3041's left over that i got for other projects.
i've been going thru my parts bin and the builder bug bit me..
The pypilot code is yours to change and adapt to whatever hardware you can find that will work. I will do my best to help, but I have a lot of reasons for doing things the way I did .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)