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:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ST1000 embedded TinyPilot - Projectlog & Questions
#11
The original tiller pilots usually place the compass on the opposite end of the tiller pilot from the motor, so I recommend locating them there. You can run the i2c wires a few feet so the raspberry doesn't need to be, just keep the magnetic sensors away from anything a magnet sticks to or current carrying wires. This includes the 12->5v switching regulator.
Reply
#12
(2019-03-30, 01:29 PM)seandepagnier Wrote: The original tiller pilots usually place the compass on the opposite end of the tiller pilot from the motor, so I recommend locating them there.   You can run the i2c wires a few feet so the raspberry doesn't need to be, just keep the magnetic sensors away from anything a magnet sticks to or current carrying wires.   This includes the 12->5v switching regulator.

Tnx! Realised that myself also and have been puzzling with it for a while, see my next post for more about that.

So now on to realising everything within te original enclosure. Firstly, a picture of the victim, a broken ST1000:

[Image: IMG_0509.jpg] [Image: IMG_0510.jpg]


Opened up and without the broken pcb it looks like this. Fluxgate in bulge on one side, pcb above it, motor completely on the other side:

[Image: IMG_0514.jpg]


Plenty of room for our stuff in there right? Firstly the IMU. When there's such a nice spot layed out for the fluxgate, it makes a lot of sense to keep using that place:

[Image: IMG_0519.jpg] [Image: IMG_0526.jpg]


But then the puzzling starts. I want to make everything as neat and tidy as possible. Especially because there are a lot of moving parts inside which can become tangled with loose wires, etc. Also reusing the button membranes and the display window is a must. So reusing the original pcb mounts for a basic self-made pcb with at least the buttons and display on it seems to be a good choice.
So I started some mocking up, measuring how much more I can fit up there. The biggest problem seems to be the dimensions of the 5110 display with breakout. There's not much space between te uppermost buttons and the top of the available space for the display. The only viable option seems to mount the display 'upside down' and trim off the second row of connections on the other side. Hopefully that will work out..
But besides of the display there seems to be plenty of space for all the components, only height is an issue. On the upperside you only have 2-3 mm's. The underside is a bit roomier with 5-6 mm's of space. So that's exactly enough for the Pi Zero and other components, but only when you solder the Pi directly to the circuitboard. So no removable headers for this project.

[Image: IMG_0586.jpg] [Image: IMG_0590.jpg]

This leaves me with two viable options to realise the total package. The first one has the Pi, display and buttons in front and all the motorcontrolling parts in the back. So I have to make to circuitboards then. But with some more puzzling it also seems pretty possible to fit everything on one and the samen circuitboard, a design which I actually like a bit more. The ESC and converter are still over 100mm away from the IMU then, about the same as with the original ST1000, so that will probably be far enough. But I will make the final decision when all the parts have arrived from overseas. Because of the mounting on a circuitboard I will probably switch to an Arduino Pro Mini instead of Nano as well..

Option 1, Pi Zero up front, motorcontroller in the back:
[Image: IMG_0599.jpg] [Image: IMG_0602.jpg]

Option 2, everything together in the original spot:
[Image: IMG_0600.jpg]
Reply
#13
Once you are setup up, you should plot the imu.compass in the scope and watch it while manually driving the motor. If the wiring or motor magnetic fields interfere you will see the compass readings change. If the amount they change is small enough it should be ok.
Reply
#14
Exactly my thoughts. Will perform some tests, also with load applied. The first parts are about to arrive, so not too long before I can start tinkering and testing Cool

For now I am wondering how you've implemented the 2-wire rudder-sensor option. Using 2 resistors and a potentiometer it seems impossible to me to get the same 'output' voltages as with a single potentiometer acting as voltage divider. And the voltage change will never be linear with the change in angle.. So I am very curious how this works.


Also, when using the normal 3 wire setup with a 270deg potentiometer I'll be measuring through about 90 degrees. As the rudder endstops on the boat allow about 45 degrees of travel to either side. That will mean that a 5V current fluctuates between 1.66V and 3.33V. As far as I have understood in case of the voltage and current measuring you're comparing to a lower voltage than this. Wouldn't that be a problem? Or do i have to add a second voltage divider or use the 'comparison voltage' from the Arduino instead of 5V?

Happy to learn Shy
Reply
#15
Little update: all the parts have been delivered. Installed TinyPilot and flashed the Arduino. Then when trying to flash the ESC I had a surprise, no ATMega 8A in an ESC that has been know for that for years. So still waiting for another one to arrive. But apart from that I have started testing my setup on the breadboard Cool 

Will post some pictures later this weekend!

At the moment I have some debugging to do because the IMU errors and the Arduino won't connect. So probably you have to enable hardware UART throug RasPi-config on the Pi-Zero after TinyPilot installation? And I remember that there were some options for initialisation of the IMU as well, I think in the OpenCPN plugin? Will dive into it through SSH soon.

On the bright side: Nokia screen and the buttons worked right out of the box, as does the web-remote page :-)
Reply
#16
I owed you guys (and girls) some pics!

First the big surprise: this ESC that was well known to be easily reprogrammable to brushless seems to have changed from architecture recently. So no AtMega-8A anymore and no clue (for me at least) on how to flash this thing, although flashing 'points' are present on the PCB. But hey, the Pi Zero is alive at least!

[Image: IMG_0700.jpeg] [Image: IMG_0722-e1560273693243.png]

Time to hook up more stuff to the Pi! Visuals first, of course.. Cool

[Image: IMG_0727.jpeg] [Image: IMG_0725.jpeg]

Well, that was quite easy, let's try the motorcontroller part (unfortunately without ESC yet). First a clean picture, this is an Arduino Pro mini with rudder pot, rudder limit switches, shunt (the big white resitor) and the voltage dividers for shunt and voltage measuring hooked up to it:

[Image: 0EDA9B31-EEFD-4A20-8435-801370DDB38A.jpg]

Then just hook it up to the Pi via an isolator, hook up the IMU, some buttons and a buck-converter as well and you suddenly have this mess:

[Image: IMG_0733.jpg]


But hey, we're getting somewhere! Arduino and Pi can talk with eachother as long as I don't put the ADUM1201 isolator in between. That will hopefully be fixed by adding some pull up resistors.


The not-functioning-yet IMU is more of a headache though. Can anybody provide me some hints on how to check I2C communication on TinyCore Linux through SSH? The 'normal' I2C-tools aren't present. And the initial IMU-calibration, eg. factory calibration, which is available through OpenPlotter, is there any option to perform that procedure at the TinyPilot terminal as well?
Reply
#17
Update:

Got the IMU working by disconnecting the Nokia screen. Somehow something went wrong with the screen which gave noise or ruined the 3.3V supply from Pi. Screen was also having troubles working and didn't show any backlight, so probably something went wrong there, or the screen itself is just bad. But hey, a functioning IMU is more important!  
update: could have been due to a shortage I had on the breadboard which consumed lots of power. Will test with the screen again soon.
update 2: screen and IMU have been stable for ours yet. Backlight is also functioning since I discovered it needed to be connected to ground instead of 3v3


Still wondering about the advanced / factory IMU calibrations though. Installed the PyPilot plugin to my notebook, but didn't have all the fancy options from OpenPlotter in there. Let's see how it performs on the boat after some calibration time though. Seems quite slow in it's reactions for now and pitch and heel will drift over time.
update: the IMU seems stable now. Somehow I was in the misunderstanding that you have to start the six-sides-of-a-box calibration by pressing some button or running some command. But now I finally understood that it is automatically detected when you perform this procedure.

[Image: IMG_0736.jpg]
Reply
#18
(2019-06-11, 11:13 PM)FMJ Wrote: Update:

Got the IMU working by disconnecting the Nokia screen. Somehow something went wrong with the screen which gave noise or ruined the 3.3V supply from Pi. Screen was also having troubles working and didn't show any backlight, so probably something went wrong there, or the screen itself is just bad. But hey, a functioning IMU is more important!  
update: could have been due to a shortage I had on the breadboard which consumed lots of power. Will test with the screen again soon.
update 2: screen and IMU have been stable for ours yet. Backlight is also functioning since I discovered it needed to be connected to ground instead of 3v3


Still wondering about the advanced / factory IMU calibrations though. Installed the PyPilot plugin to my notebook, but didn't have all the fancy options from OpenPlotter in there. Let's see how it performs on the boat after some calibration time though. Seems quite slow in it's reactions for now and pitch and heel will drift over time.
update: the IMU seems stable now. Somehow I was in the misunderstanding that you have to start the six-sides-of-a-box calibration by pressing some button or running some command. But now I finally understood that it is automatically detected when you perform this procedure.

[Image: IMG_0736.jpg]

Great to see you built your own tinypilot!  I am glad to see the picture.

You can change many parameters to make reaction faster, try increasing the gains.
Reply
#19
Victory! Motor is moving. After some struggles I got the second ESC programmed. Firstly it moved the motor only to one side. But after attaching the rudder feedback it is moving back and forth. It even makes nice little sounds..

Only strange thing left is that I almost always see the min_rudder or max_rudder error-message. Voltage ranges from 0-1,1V when turning the potentiometer all the way. But already when I am say 0,05V away from 'center' I see the min or max error. Any clues on that?
Reply
#20
You might have to set the rudder range higher and reset or recalibrate the rudder. It's been recently improved so I recommend pulling pypilot from git.

Alternately, try grounding the rudder feedback wire or ensure it is near zero volts (or above 1.1) to disable rudder feedback.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)