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
Introduction and Getting Started
#1
Greetings,

My name is Adrian, and I have a 1982 Mason 43 cutter-rigged sloop, which we've owned for 23 years, and which currently resides on the Chesapeake Bay (VA, USA).  When we were about 20 years younger than today, we took our three kids cruising in the Caribbean and US East Coast (up to Maine), and explored the US East Coast and Caribbean for about 3 years.

By day, I'm a software developer, can read code, and write Java, C, and Python with the best of them, but circuits beyond the Radio Shack 150-in-1 project box are not my forte.  So, not total noob, but not far from it.

What brings me here is our aging Robertson AP200 autopilot.  I won't go into all the shortcomings of the AP200 (which, if you know its quirks, is actually decent), but will say it does not have a tack feature.  So, my solo tacking consists of putting the wheel over to 2 o'clock or 10 o'clock on the opposite side, waiting for the jib to blow through,  moving the helm back over to 10 o'clock or 2 o'clock on the opposite side to stop the fall-off, quickly sheeting in, tacking the staysail, then moving the helm over AGAIN to the proper balanced setting on the opposite tack.  In winds upward of 20kt, this experience can leave me breathless and, as my years progress, I'm tending to favor more sedate, leisurely experiences.  So, basically, I'm looking for auto-tack.  And remote control - that's another biggie!  Not having to get on my knees in the cockpit to see the display on the existing AP200 so I can make course adjustments would be a major bonus, especially if the weather is rough and our boat's tumblehome sends buckets of water over the helm.  Plus, I hear great things about Sean's creation, and think it will steer better than what I now have.  But, as I'm not an EE, I believe I could benefit from some mentoring, and that's why I'm here. 

Some more details about my autopilot:  Robertson AP200 -> Simrad.  Discontinued long ago.  Fluxgate compass.  J101 Junction Box (fwiw).  Hydraulic ram connects directly to tiller on rudder post below-decks - more than adequate to steer boat.  Ram is driven by 12v reversing-polarity hydraulic pump.  Not sure of current draw.
 
So, to get started, I have the following components:
  • Arduino Nano
  • IBT-2 controller
  • Raspberry Pi Zero W
  • Nokia 5110 LCD
  • MPU 9255 (sensors)
  • USB cables
  • Some 40 pin male/male headers
I need to rig this thing up initially to get started, before I try to "harden" it into a final product.  Here are some questions that I think are all about "What are best practices?":
  • Should I buy stranded or solid hookup wires?  I'm thinking stranded, but maybe solid is good enough and easier?
  • Should I get ribbon cable(s)? I recall seeing one picture with a ribbon cable that had the display mounted on a connector in the middle of the cable, and the MPU at the end (I think).  So, both GPIO connections on a single cable.
  • Should I buy a PCB board(s)?  What kind?
  • Should I get special prototyping headers?  (I have male/male, but no special female connectors for the wires, so I can't use them as-is) 
  • Do I need more than the IBT-2 to drive my hydraulic ram? I'm basically not sure I understand enough about the concerns around this.  The wires that go to my motor are not that large -- I believe it's controlled by low-power solenoids, and the actual power supply is direct (i.e., doesn't go through the junction box) with a heavier gauge wire. As I write this, it occurs to me I have more research to do "in the field."
  • I'm thinking the interface point should be directly to the motor (i.e. the solenoids), rather than trying to patch into (and possibly destroying) the working J101 junction box.
  • Should I prototype it using a breadboard (etc) initially prior to trying to build the "final product?"
  • To operate from the unit (not via my cell phone) what kind of buttons are recommended? 
  • Do you guys with successful builds have an emergency kill switch installed, in case you have an OMG moment ("Dang, my navigation is good - I clove that daymark in half!")
Adrian
Reply
#2
(2022-05-03, 02:37 PM)vadrian Wrote: Greetings,

My name is Adrian, and I have a 1982 Mason 43 cutter-rigged sloop, which we've owned for 23 years, and which currently resides on the Chesapeake Bay (VA, USA).  When we were about 20 years younger than today, we took our three kids cruising in the Caribbean and US East Coast (up to Maine), and explored the US East Coast and Caribbean for about 3 years.
welcome
Quote:I need to rig this thing up initially to get started, before I try to "harden" it into a final product.  Here are some questions that I think are all about "What are best practices?":
I'm sure you are aware already but just in case:
https://github.com/pypilot/workbook/wiki
Quote:
  • Should I buy stranded or solid hookup wires?  I'm thinking stranded, but maybe solid is good enough and easier?
Wow, no one even asks such questions. I dont know. stranded corrode sooner but it takes a long time. If there is a choice I would suggest stranded marine wiring that is tinned. If not: use whatever works.
Quote:
  • Should I get ribbon cable(s)?  I recall seeing one picture with a ribbon cable that had the display mounted on a connector in the middle of the cable, and the MPU at the end (I think).  So, both GPIO connections on a single cable.
  • Should I buy a PCB board(s)?  What kind?
  • It is all up to you. I offer some products on my store that will save you this trouble. You can also study the designs and build your own.
    Quote:
  • Should I get special prototyping headers?  (I have male/male, but no special female connectors for the wires, so I can't use them as-is) 
  • The more non-soldered connections you introduce the lower reliability you will have. This is already an issue of the nokia5110 display which uses tabs pressing on the pcb and it last on average 2-3 years. I moved to jlx12864 screen.
    Quote:
  • Do I need more than the IBT-2 to drive my hydraulic ram? I'm basically not sure I understand enough about the concerns around this.  The wires that go to my motor are not that large -- I believe it's controlled by low-power solenoids, and the actual power supply is direct (i.e., doesn't go through the junction box) with a heavier gauge wire. As I write this, it occurs to me I have more research to do "in the field."
  • I'm thinking the interface point should be directly to the motor (i.e. the solenoids), rather than trying to patch into (and possibly destroying) the working J101 junction box.
  • I don't have a lot of confidence in the 43 amp rating. Even at the claimed 16 milliohms, the board would have to dissipate 30 watts which probably would require a fan.

    It all depends on your motor and how hard it has to work. Beating upwind it may draw a lot more current to move in one direction. So for example if your worst case was 20 amps, then you likely need a significant heatsink. The heat generated goes up with square of current.

    The IBT2 uses 7 and 9 milliohm mosfets. My high power controller uses 2.5milliohm mosfets and put 4 in parallel reducing the resistance < 1 milliohm. My controller does not need any heatsink or fan up to 30 amps. A less efficient controller is generally cheaper, doesnt last as long (heat kills components) and wastes more power as heat and has slightly reduced motor speed which means the motor also has to run longer.. and with slightly more delayed reaction which causes the autopilot to also correct a little bit more and therefore work slightly harder. So, even though it's may be only a few percent difference in top motor speed (7 milliohms is still quite good), the total power wasted compounds a bit more than that.
    Quote:
  • Should I prototype it using a breadboard (etc) initially prior to trying to build the "final product?"
  • To operate from the unit (not via my cell phone) what kind of buttons are recommended? 
  • Do you guys with successful builds have an emergency kill switch installed, in case you have an OMG moment ("Dang, my navigation is good - I clove that daymark in half!")
  • Adrian

    If you have a clutch or bypass valve solenoid etc to engage, it is highly recommended to put a switch in series with this circuit so you can always regain manual control regardless of what the autopilot decides to do.
    Reply
    #3
    Thanks for the info. I am definitely on a steep (for me) part of the learning curve. Is the IBT-2 a motor controller? (I'm not necessarily saying I'd use it over your controller, which sounds fabulous - I'm just trying to understand what the components are). Does your motor controller still require an arduino, or does it connect directly to the raspberry?
    Reply
    #4
    I dont mind which controller you use, I am only making a comparison so you understand the differences.

    My motor controllers have the microprocessor built in and so function as an arduino already.
    Reply
    #5
    (2022-05-06, 02:04 AM)seandepagnier Wrote: I dont mind which controller you use, I am only making a comparison so you understand the differences.

    My motor controllers have the microprocessor built in and so function as an arduino already.


    When I first wrote this post, I knew nothing: I was on the 0th floor at the onset of this endeavor.  I'm no longer on the bottom floor, but certainly not at the top yet.

    I think I can drive pin 6 low to put my Arduino / motor.ino (git SHA df6757c290330a49f9d4cf9e57b9d98aae04b0a3) into H-Bridge mode, and then use D9/D10 as left/right, and D2/D3 as L/R-Enable.  I will try that with my low-power computer fan motor (my AP desk dummy).  


    But, in the interest of following the happy path to a working system: Where can I find out more about your (@Sean) motor controller(s)? Is there a store where I can just order one?  I looked online, but must be looking in the wrong places. Since the PWM mode on the github motor.ino appears to be tailored for the VNH2SP30, I am guessing your motor controller uses a different arduino sketch.  Is that right?

    Thanks!
    Adrian


    BTW: I could also use some guidance on how to configure the current-sense pins D4 and D5. Does this mean current sense across the shunt at pin 1? And how would I know whether to use 0.01 or 0.05 ohms? I suppose I would use the lower (0.01 ohm) resistance because my motor draws up to 20A - is that right?
    Reply
    #6
    There is more information available for you. You can buy a motor controller at https://pypilot.org/store/index.php?rt=p...uct_id=124; if you scroll below you will see a 2-page schematics pdf that specifies the current-sense configuration; more about the current sense options is described in the motor.ino code itself. You might also read through the pypilot workbook I wrote last year; it was supposed to tie it all together and it contains various links to source information.
    Reply
    #7
    Thanks for the info and the link. I did go through the workbook wiki, and refer to it often. For someone with your EE chops, it's probably all very unambiguous and clear, but it's taking me, personally, some time to reach full understanding. I appreciate everyone's patience.

    The controller you referenced is for a motor drawing no more than 7A. My motor is rated at 20A, so I would need the larger controller. I suppose I could just obtain the heavier controller and connect it right up to my RPi0 (although then I'd have to invent some other clever purpose for the Arduino and IBT-2 I already have).

    Questions about the controller:
    * Is it already made or custom-order?
    * Is it available?
    * What's the lead time?

    Questions about the rudder feedback:
    * I see the controller has (1) +5v, (2) GND, and (3) the sense voltage. What is the sense voltage range expected by the high-power controller?
    * In my installation, the rudder feedback gets (1) +12, (2) GND, (3) sense voltage 1.48<=v<=5.1 (determined experimentally). In my situation, can I feed +12 to my RF100 from some other source and connect only the (2) GND and (3) sense voltage wire input on the controller? (Or will the controller not work properly if the sense is not against the 5v reference it provides?).
    * If the answer to the previous question is "no," could you suggest how I can connect my existing rudder feedback to this controller?
    Reply
    #8
    The controllers on my website are available. I can ship usually within a week or two from order.

    Check the schematics:
    https://github.com/pypilot/pypilot_schematics

    as for sense voltage. The range is 0-5v, but near the edge of range it will disable feedback. So typically 0.2 to 4.8v would be fine. A lot of times the range of 1-4v is more typical for actual configurations.

    It is a little more dangerous to feed 12v from an external source just in case it somehow allows the sense wire to go out of range (above 5v) This is why I suggest using resistors to drop the voltage. For example, output of 5.1v goes to two resistors, say 1k and 5k in series to ground. Then connect the sense of the controller between these resistors. Typical range of resistors to use would be from 1k to 10k. If they are too low the rudder feedback will supply too much current, if too high, the other resistors (see schematic) will dominate. You could also potentially add diodes for protection.
    Reply


    Forum Jump:


    Users browsing this thread: 1 Guest(s)