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
First PyPilot install (tiny pilot, RC control, Ethernet)
#1
Hi all good people, I am now intending to do my first PyPilot install. I have tried to find information, but for sure there will be things I ask about that has been covered before, I am sorry about that, please be helpful with a link if that is the case. In the beginning I will focus on the HW side of the project, later I will for sure need some SW support, but I haven't started tinkering with that yet, so I don't know where I will find challenges that I need your help. Also I am not a native English speaker so don't expect ant high quality literature.  

I will use a few words to give some background about me so you understand where I am coming from. The fun stuff starts soon, if you don't care about me fell free to jump to the next section. I used to design and install electrical equipment in boats (navigation equipment, motor controll panels +++), however I stopped a few years in to NMEA2000 (signal -K is still just a cool name for something in my mind). This means that I understand what most navigational is suppose to do, I can install and calibrate stuff according to a manual, but I don't know how things does its magic. Also worth mentioning is that I have basic electronic skills (can solder and follow a manual), and basic SW skill (mostly python and automation programming). Last but not least I have been using linux as my daily driver since the late 90's, mostly Debian based distros the last 12 years. With other words I think I know something, but my knowledge is full of holes and mostly outdated. 


The boat is a two motor 45' motorboat, approx 18 tons and hydraulic steering. The boat has an autopilot already, but it does not work. I can't be bothered to figure it out since it is from the 80's and I don't expect to find spare parts. The rudder indicator and steering pump works and I am planning to reuse them. The steering is hydraulic, with a bidirectional pump (no valves for direction). My plan is to first get the AP up and running with the goal of having using tracking, FU and course. How to setup a FU and mode selection input i have yet to figure out. If someone have some hints that would be grate, but for now my main focus is to get something working. Later plans is to install a new radar and sensors for the motor. Maby make a nice dashboard and get the boats in to the 2000's. One step at the time.

Attached is a drawing on what I think is one way of doing this. Please help me figure out what is wrong with my schematics  and what parts I should use instead.

A word on Ethernet. Can I use cabled Ethernet (not WIFI) between the tinypilot and the Ocpn? I grew up in the 90's and really don't like wireless, I also prefer the safety aspects of a system that a 12 year old geek can't bring down.


Bill of material:
Motor controller https://www.robotshop.com/en/smart-h-bri...a-max.html
MCU  SparkFun SEN-15335
Arduino Nano
optokopler Mikroelektronika MIKROE-1878
Power supply 24 - 5 V
Raspberry PI 2
Ctek rudder indicator

random hydraulic steering from the 80's


Attached Files
.pdf   Pypilot.pdf (Size: 71.48 KB / Downloads: 242)
Reply
#2
The only question you have asked is if you can use ethernet?

I dont see why not, but there is no script by default that will use ethernet. So depending on how you use it, you may need to edit the scripts (networking.sh) in /opt

After modifying these execute "filetool.sh -b" to ensure the changes are persistent after reboot.
Reply
#3
Thanks for the feedback. This is good news  Smile.

I am also have the following questions where I feel uncertain:

  1. The IMU, I have fond  this, Will that work Does my schematics look ok?
  2. Optocoupler I did not find an optocouler that I seel was a 100%. From what was available and what i think will work I found this. In my perspective this is just 1/0's so I think it will work. Any comments on the wiring or selection of optocoupler
  3. GPS receiver shuld ir be connected to the Ocpn computer or the tynypilot RPI?
Reply
#4
Hi,

For question number 2: On my recent build, I've been using the ADUM1201 Isolator. And for the short workbench test that I have done, it works fine.

ADUM1201 Isolator @ Aliexpress

Regards,
Wouter
Reply
#5
1) yes: the icm20948 is a good sensor
2) I do not use optocoupler for the inertial sensors, I use the opto coupler for the uart connection to motor controller
3) you can generally connect gps whichever way is most convenient for you. If it connects to opencpn computer it can forward the gps nmea sentences (along with APB messages for route following) with a tcp connection on port 2022. If tinypilot detects and connects to signalk somehow, pypilot can get gps from that. If gps is connected to tinypilot, generally gpsd will handle the gps and use sirf binary format, and tinypilot will output gps on signalk if it can, or you can make a connection in opencpn to gpsd of the tinypilot 2947. If tinypilot receives gps over serial (non-binary) with gpsd disabled usually manually but anyway... then it will forward nmea over tcp.

In latest unstable, pypilot can generate gps output at 10hz blending the gps with inertial sensors and output is sent as nmea or signalk giving smooth speedometer etc.. but its still in testing and uses an extra 10-15% cpu on the zero (kalman filter implemented in python...)
Reply
#6
(2022-09-20, 08:00 AM)Vic Wrote: Hi,

For question number 2: On my recent build, I've been using the ADUM1201 Isolator. And for the short workbench test that I have done, it works fine.

ADUM1201 Isolator @ Aliexpress

Regards,
Wouter
Thanks, I will put that on order!


(2022-09-20, 08:36 AM)seandepagnier Wrote: 1)  yes:  the icm20948 is a good sensor
2)  I do not use optocoupler for the inertial sensors,  I use the opto coupler for the uart connection to motor controller
3)  you can generally connect gps whichever way is most convenient for you.    If it connects to opencpn computer it can forward the gps nmea sentences (along with APB messages for route following) with a tcp connection on port 2022.   If tinypilot detects and connects to signalk somehow, pypilot can get gps from that.    If gps is connected to tinypilot, generally gpsd will handle the gps and use sirf binary format, and tinypilot will output gps on signalk if it can,  or you can make a connection in opencpn to gpsd of the tinypilot 2947.  If tinypilot receives gps over serial (non-binary) with gpsd disabled usually manually but anyway...  then it will forward nmea over tcp.

In latest unstable, pypilot can generate gps output at 10hz blending the gps with inertial sensors and output is sent as nmea or signalk giving smooth speedometer etc.. but its still in testing and uses an extra 10-15% cpu on the zero (kalman filter implemented in python...)
Thanks for the good answers. I will change my optocoupler and put the parts in to order!

Does anyone have a good (and available) USB GPS receiver to recommend?
Reply
#7
for usb gps, the standard one is bu353 now the bu353-s4.
Reply
#8
So far things are moving forward. tinypilot and opencpn is working and talking togeter. my next step is programming the arduino, here I have found my first set of problem I dont know how to solve. When I try to make the motor code this happens.



Code:
marius@berit-opencpn:~/motor-controller$ make
makefile:131: warning: overriding recipe for target 'serial'
makefile:114: warning: ignoring old recipe for target 'serial'
make: *** No rule to make target '/usr/share/arduino/hardware/arduino/cores/arduino/avr-libc/realloc.o', needed by 'motor.cpp.elf'.  Stop.


anyone that can help here?
Reply
#9
It seems recently arduino version installed from apt was upgraded from a really old version that was used before.

So unless you have version 1.0x installed its going to give build errors. I am working on this right now.. the issue is avrdude in git (and the version in apt) has some issues:

https://github.com/avrdudes/avrdude/issues/1107
Reply
#10
Thank for the update! I would love to be at assistance, but this is not my cup of tea. If you want me to test a fork just let me know :-)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)