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
Reading rudder sense
#6
(2018-08-22, 02:23 PM)jodi001 Wrote:
(2018-08-21, 05:25 PM)jim321 Wrote: https://github.com/pypilot/pypilot/blob/.../motor.ino
in openplotter
it needs to be installed on an arduino then connected to the rpi board ..i use usb.
then it will show up in the serial tab, set it up there, and then pypilot tab will show it too..

Thanks for reply. I hav e downloaded motor.ino and modified it and then upload it to Arduino. I can see that my changes takes effect. But I cannot get the H-bridge relays to work. I have changed row with code: uint8_t rc_pwm = 1;  to uint8_t rc_pwm = 0; but my relays does not operate when seting AP course and wiggle the IMU. Is there any other code that needs to be changed in order to get H-bridge to work?

I have no sensors for servo travel, temp et. connected. All my adc pins are grounded

There is a digital io pin to detect rc output which sets the rc_pwm variable.  So the modification you made probably does nothing.   The code is not designed for actual relays the mechanical kind make a clicking noise.

If you cannot detect the end of travel, you will stall the motor, and this is a waste of power, and also hard on the mechanical system, it can eventually burn out the motor, but just to get started you could try it...


Grounding the ADC pins is not correct.   This will cause over temperature fault.   Maximum temperature is 0 volts.  Either connect these pins to 3v3 or 5v, or modify the code to not read temperature or fault from it.

I encourage building your own controllers, unlike all other autopilots available. I even provide source code and support for this, but I am concerned because, so far from feedback I have seen, everyone wants to cut corners.  This includes:

  1. Not using current measurement.   This can cause problems, as well as not giving the autopilot the ability to feel how hard to turn (weather helm sense) and no way to determine power consumption to monitor and tune the autopilot correctly.   You should have this, even if you have rudder feedback.
  2. Not using temperature sensors.  This could potentially burn out the electronics, and again, no way to monitor it.
  3. Using usb connection to arduino -  NOT RECOMMENDED!!  I know it seems nice but it's cheating.  This creates a ground loop, and can burn out the raspberry pi if there are any problems in the controller, maybe even if there aren't.   I use optical isolation, and have prevented killing raspberry already.   If you kill your raspberry and don't use optical isolation, it is not my concern.
  4. Using inferior drivers like relays or p-channel mosfets.   I use all n channel mosfets for maximum efficiency and reduced cost.  No one uses relays or p-channel mosfets anymore, this is obsolete technology.  Why it is being mentioned?   Relays are a really bad idea for a number of reasons.
  5. no fuse and reverse polarity, and ESD protection.   This is less important, but I recommend it.
I have all these features for my controllers available from http://pypilot.org/store/   I tried to keep the controller as simple as possible, but I also want good results.

So.. feel free, do what you want, but you may encounter problems.


Yesterday I sailed 20 miles up the winding nanticoke river in maryland completely on autopilot route following adjusting only sails.   I am sailing everywhere on autopilot, even tacking under autopilot against 25 knot winds.
Reply


Messages In This Thread
Reading rudder sense - by jodi001 - 2018-08-17, 12:57 PM
RE: Reading rudder sense - by seandepagnier - 2018-08-17, 02:17 PM
RE: Reading rudder sense - by jodi001 - 2018-08-21, 01:18 PM
RE: Reading rudder sense - by jim321 - 2018-08-21, 05:25 PM
RE: Reading rudder sense - by jodi001 - 2018-08-22, 02:23 PM
RE: Reading rudder sense - by seandepagnier - 2018-08-22, 04:07 PM
RE: Reading rudder sense - by jodi001 - 2018-10-02, 09:10 AM
RE: Reading rudder sense - by seandepagnier - 2018-10-02, 07:49 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)