Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8041

Automation, sensing and robotics • Re: Programming a shipmodel and transmitter continued 2.0

$
0
0
Hello Ame,

That's okay, no hard feelings here. Good to hear my post cleared up quite a bit of questions. Thanks for your input!
Sorry if I was a bit harsh. I did state my assumptions, and now we have learned a lot more behind the design and goals.

It seems that you have five propulsion elements:
Two stern azimuths
One retractable azimuth in the bow
Two bow thrusters

These are all quite complex by themselves, but orchestrating them together is a challenge.

Let's look at the stern azimuths. You say you need to be able to command them to rotate to any angle. You sense the angle using an AS5600 on each azimuth, and rotate them with a stepper motor. From the photos it looks like you are using 28byj48 steppers. You also have a propeller or something, which is driven by a motor. What kind of motor is it? Is it bidirectional, or does it just turn one way, from 0 to 100% speed? Do you need to know the speed, or just be able to vary it?

Do the stern azimuths operate independently? i.e. do you have one control to set speed and azimuth for both motors, or two controls (speed and azimuth for port side, speed and azimuth for starboard side).

If you can explain this then it should be straightforward to describe an algorithm that accepts motor speed and angle, and drives the hardware appropriately. ghp has already suggested using a thread to handle the angular position, which is a good solution, but you might prefer a state machine in your main loop where each iteration of the loop calculates whether to take a step, and which direction.

Next, go on to the bow thrusters or retractable azimuth.
At some point the stern Azimuths can be selected to be controlled by either of the 2 joysticks (so both from the right or both from the left joystick) or independently. Independent control seems to be the easiest to start out and will give the most options for testing and possible troubleshooting should any device decide to cut out on me. This also with the focus on being able to sail. The added attribute to the retractable azimuth is a linear potmeter registering the amount of retraction of the entire unit so I can lock the steering and motor control when it is retracted and also turn it to a fitting position if not already before it hits the bottom of the hull. This is also to be added after having control over the main propulsion, we're talking about being able to do sea trials so I will be paying attention to what I'm doing.

The motors will have RPM measured, but this is purely because I can and need something to keep tension on the timing pulley anyways. Because of the cherry on the icing (fully automated position hold, if possible even relative to an object like another ship model) I have 2 9DOF sensors which will relay course and speed back to the transmitter, but this too is not intended for any control over the motors (there won't be no cruise control or what not). Motor control will be as precise as the motorhats can make it, that will do just fine.

I use old Graupner Speed 500E brushed DC motors for the main engines, there will be a Raboesch Blue RM410 7,6V engine for the retractable azimuth and Raboesh Blue RM 430 12V motors for the bow thrusters, all motors are DC brushed motors.

The end result will also have the following working functions:
4 working cranes
5 working winches (not on cranes, though 2 are mounted to a rotating derrick, so 2 servo functions per winch)
6 working fire monitors (rotating left/right and up/down)
1 working fire suppression system on the helodeck
2 moving (up/down, left/right) searchlights
6 davits for lifeboats
6 working lifeboats (controlled through a second NRF24 module in the boat but for close range)
2 working A-frames launching ROV's with working lights
2 moonpool doors under the 5 winches
1 secret ROV hangar door in the moonpool
1 working ROV hidden in the secret garage due to size (2 propellers for level sailing, 1 dive propeller, 1 or 2 working arms and a camera, ROV will be connected to the boat through USB cable both powering the ROV and acting as a WiFi dongle for life view, unless there are better solutions for this)
1 helicopter
33 groups for interior lighting, 32 of which turned on/off randomly, hopefully with regard to the amount of outside light
21 different signal lights in the mast, these are to be controlled by function from the transmitter but wired independently for freedom of which is turned on and which not. this can light up like a Christmas tree in certain situations
3 groups of normal floodlights
3 groups of bigger, brighter decklights
1 more searchlight on the bow of the ship (too far forward to make it turn and move up and down)
2 moving helmsman chairs, operated randomly though returning to the centre position when the ship is manoeuvring
3 Panama lock lights, which is turned on is controlled by the position of the helmsman chair
2 rotating radars
Some welding lights to show that the crew is working
3 cooling water pumps, controlled by the status of the ship (ready to sail or moored, controlled by a button on the touchscreen on the transmitter, starting a program showing the starting of all 6 main generators, the real ship has electric motors actually moving the propellers)
2 working anchor winches, including a pump per anchor for flushing the anchor chain and anchor
2 dive bells, including a welding light fitted in the bottom

I suppose that's about it, I couldn't find more functions on the real ship so that's that.

Statistics: Posted by Tweety777 — Tue May 13, 2025 6:56 pm



Viewing all articles
Browse latest Browse all 8041

Trending Articles