Attached is the start of the circuitry and description. It was a WORD document, then RTF, then plain text but the website would not accept any of these. So I extracted the picture and just cut and pasted into here. PDF here we come? If anything is not clear, ask me or Google the phrase that is not understood. even my PAINT picture seemed to have problems and was originally reported as an invalid file, though that has altered even as I type. You can see it on a Windows computer at least by clicking and selecting one of the options such as Background image. I have now tried an Android tablet and clicking away managed to view the diagram.
Now that the boat has floated, I'm properly starting this design blog. I'm intending to describe the dual ESC and mixer with the aim of teaching some relevant electronics as we go.
The first thing in any design is to define what we are going to do, Then consider what sources we have to manipulate in order to achieve the objective.
In this case we have a Tug that manoeuvres worse than a slug. Windage is a disaster with little keel and a high non central superstructure.
The obvious thing to do is to fit a rudder mixer so rudder operation also changes the speed of the motors to help out, especially in reverse, or even stopped. These are commercially available, but this version of the boat cannot use such commercial gear because the required motor signal is not available. All we have is the present motor drive signal direct on the motors and the servo signal to the rudder, which is conventional. We could scrap everything and start again, butβ¦..
The requirements are:-
When stopped, rudder only will turn the boat by sending the motors in opposite directions, with no throttle applied.
When going backwards, if the rudder is deflected more than about 25% the motors will change speed (be modulated) so as to help create a turn.
When going forward slowly, large rudder signal will change motor speed significantly. However, at full speed, even full rudder will not change the motors much, if at all, because the boat might tip over. In fact, full rudder at full speed can only slow one motor, because full speed cannot be exceeded.
With less than 25% rudder, with throttle applied the boat responds to rudder only.
With throttle applied, no motor may be reversed nor may more than full speed be demanded.
So now let's look at the inputs required.
We need to know Throttle setting (speed) and direction, forward or back. That is not too bad. The motor on this boat version is driven by an H bridge with a forward signal and a backward signal. The repetition period is 8.6 msec and the mark/space ratio determines the speed. So we have to blend these two to get speed and record which of the two is active so as to obtain a forward and back direction signal. If neither is present then speed must be zero and we can derive a Stopped signal.
We also need Rudder deflection and direction. The servo signal containing this information for the rudders is nearly conventional.
A short pulse is repeated every 8.6msec. 1.05msec is full left rudder and 1.95 msec is full right rudder. 1.5 msec is straight. There are several methods of extracting this; I chose a simple filtering and gain method as being a low component count.
The other thing to consider is the battery. These have a distressing habit of having a changing voltage as they discharge. One can work at just less than a minimum voltage, using a voltage regulator. Or take the more aggressive approach and do a design that uses every bit of battery voltage available. I choose the latter because it has less component requirements. This is called a ratiometric technique; all circuit design is done using ratios of the battery voltage at that instant. With one exception we don't generally worry about volts absolutely, at any point we have a proportion of the battery voltage.
So let's look at the input circuit FIG1 that gets these signals for us. Itβs actually quite simple. The picture is attached to this post. I hope its readable.
Abbreviations.
Below, for instance SPeeD would be written SPD. I interpret once only, but abbreviations like this usually go in groups of 3 characters.
If you see, for instance, B/3 that means 1/3 or 33% of Battery Voltage
All inputs are changed (limited) to be either zeros or full battery volts. So voltages beforehand do not matter. Protection resistors also make it difficult for a mistake to blow up the existing PCB.
WHITE and YELLOW are the wires presently going to the motors. These are removed and go to this circuit. There is no need to go into the deckhouse PCB.
I just describe the WHITE forward channel. As we have disconnected the normal load, I feel better giving the old circuit a little load, thatβs R1. D1, R3 and C1 form a fast attack, slow decay filter; a short pulse will easily keep this charged enough until the next one arrives.
Going down and left, Q1 is an ORed inverter. WHITE OR YELLOW will turn on Q1 so SPeeDPulseWidthModulation is the signal that digitally represents speed in either direction.
R8C3 are used later to tell another circuit about SPeeD in ForWarD only.
U1,2 and 5 are Schmitt trigger inverters. These are funny beasts, but handy. If the input reaches 2B/3 the output goes to zero. It will stay there until the input drops to B/3, when it will go Hi, to full 100% of B. So it gets rid of noise without using lots of filters.
The RUDDER servo signal is extracted by breaking into the white servo wire and grabbing the signal from that. Its generally at only 2.5-3V or so, quite low. Q2 doesnβt care. Anything above 1V causes a LOW on its output, R10, and hence a HI on U5. So there we have the 1.05 to 1.95 msec pulse at a known rate, representing rudder position, now βslavedβ as a proportion of our B voltage. With a bit of filtering, we are ready to go.
Finally, AND gate U4 detects that both FWD and BCK are STOPPED. All required signals are present and correct.
It wasnβt that bad was it?