OpenMarine
PyPilot with Raspberry Pi Motor Controller - Printable Version

+- OpenMarine (https://forum.openmarine.net)
+-- Forum: Pypilot (https://forum.openmarine.net/forumdisplay.php?fid=17)
+--- Forum: General discussion (https://forum.openmarine.net/forumdisplay.php?fid=18)
+--- Thread: PyPilot with Raspberry Pi Motor Controller (/showthread.php?tid=2394)



PyPilot with Raspberry Pi Motor Controller - ole - 2020-03-01

Hello, I managed to get PyPilot running from my Raspberry alone without the need for an arduino, there are still some features missing of course, but I plan on adding them later, to make it a fully compatible replacement for the arduino driver.

I would like to commit the changes to the pypilot github repository, but there are some things I had to alter to make it work within pypilot, since it is currently hardcoded for the arduino.

For Sean:
What do you think would be the best procedure, if you're at all willing to merge the changes into pypilot, since from what I read you're against using the raspberry as the driver for the motor controller.

I was thinking about implementing a settings file option for configured which driver the user would like to use in the ~/.pypilot home directory. Or would you rather it was a commandline argument (which the program has none of atm.)

Let me hear your thoughts about this :-)


RE: PyPilot with Raspberry Pi Motor Controller - seandepagnier - 2020-03-03

Could you elaborate on how you managed to get the motor controller to work without an arduino? The raspberry has no adc to detect if the motor stalls.

I suggest:

1) you have eeprom on i2c which defines the motor controller and which gpio pins it uses.
2) you have a config file which is the same as #1 but doesn't require eeprom


RE: PyPilot with Raspberry Pi Motor Controller - zankiki - 2020-03-10

Why you are against using raspberry for control of motor controller?
I preparing to make autopilot with pypilot (already have RP4 and Moitessier Hat) next winter, and any information is welcome.
Only difference is that I will use hidraulic pump & controller for this... ( https://pypilot.org/store/index.php?rt=product/product&path=72&product_id=131 )


RE: PyPilot with Raspberry Pi Motor Controller - seandepagnier - 2020-03-11

The reasons I'm against using the raspberry for a motor controller:

1) difficulty generating pwm signals from raspberry
2) no adc for measuring stall voltage and other inputs needed
3) less flexible in reusing different hardware components.
4) limited pins on raspberry already used for display, keypad, other sensors..
5) prevent damage to raspberry pi from motor controller problems
6) allow locating motor controller in a different location from sensors and raspberry. If currents in the motor controller are high enough it can throw compass sensor and software doesn't compensate this yet.

A micro controller to run the motor controller is only a few added components.


RE: PyPilot with Raspberry Pi Motor Controller - zankiki - 2020-03-11

So, you would like to say that:

NOT USE: raspberry with moitessier hat - hydraulic pump controller - hydraulic pump

TO USE: raspberry with moitessier hat - tiny pilot computer - hydraulic pump controller - hydraulic pump

Is that correct or I miss something?


RE: PyPilot with Raspberry Pi Motor Controller - seandepagnier - 2020-03-11

all of the controllers I am building have a an arduino so can be used with moitessier hat or tinypilot.

I believe the OP is suggesting driving the motor controller directly using the raspberry pi.