Infrared motor control

AllyCat

Senior Member
Hi,
Both motors full ahead: Left 23; Right 42
Left stop, right full ahead: Left 1; Right 76
Right stop, left full ahead: 42, Right 1
Looking again at those figures, Is "Full Ahead" the (approximately) same speed (rpm) in each case? If it is, then something is "wrong", perhaps with the PICaxe's earthing path or Reference/supply voltage.

Of course, if the battery has a high source (internal) resistance then the voltage will fall when both motors are running at the same time, and both will turn more slowly. But your "both" figures are almost down to half of the "single" figures, which would suggest the battery voltage is almost halved (and the motors turning at half speed) ? If you have a "spare" ADC input on the PICaxe, perhaps you should add a 2 : 1 potential divider (e.g. 10k + 10k) to monitor the battery voltage.

Cheers, Alan.
 

Eng460

Well-known member
Hi Allycat, did you know that quite moderately priced modern digital voltmeters do contain direct inductance measurement? Along with capacitance, transistor testing and, if you select carefully, even a thermocouple and temperature reading, all with auto ranging. All most useful to the hobbyist, even if they are not quite industrial or laboratory standard.

If you have a good Fluke or similar, I can understand why that would be your “go to” multimeter, but as a second or third often comes in useful, you might find a very useful addition to your tool box is actually quite moderately priced. And remember, I go to my local electronics bricks and motar store. You can probably buy even cheaper on the net.

Eng460
 

AllyCat

Senior Member
Hi,

Well, yes, I nearly mentioned the LCR-T4 (there's an Aussie review on YouTube if you happen to have an hour to kill ;) ) , but I took the view that if the OP didn't already have a suitable "meter", then there was no need to buy anything (and wait for it to be shipped), particularly as he hasn't said where he's located.

OT: Personally, in addition to the above, I (still) have an "AVO" Model 7 and a Model 8 (tricky to get the 15 volt batteries now) among several other "multimeters", acquired usually at minimal cost during 50 years or more. :) And a quick advert for the PCB Scope (currently out of stock :( ) or the DPScope on which it's based.

Cheers, Alan.
 

hippy

Technical Support
Staff member
Both motors full ahead: Left 23; Right 42
Left stop, right full ahead: Left 1; Right 76
Right stop, left full ahead: 42, Right 1
Looking again at those figures, Is "Full Ahead" the (approximately) same speed (rpm) in each case? If it is, then something is "wrong", perhaps with the PICaxe's earthing path or Reference/supply voltage.
The numbers look right to me. The 'both full ahead" appears to reflect that one motor has about half the effective resistance of the other.

That the left motor reading almost doubles when run alone, and so does the right, suggests to me that when both are on they are over-straining the supply, causing the voltage to drop, reducing the current through both. That's perhaps not unexpected when the supply seems to be 6 x AA batteries.

I would be expecting the motors to run faster when run individually than when both run together, but that's just an aside.

The problem is we are looking at evidence only indirectly obtained which may or may not reflect the reality of what is actually happening.

I would step back and take three multimeter readings; what the current is when only one motor is connected directly to the battery, and for the other, and when both are connected in parallel. I would also measure the battery voltage for all three cases.

I must admit that I've lost track of what the perceived problem is, what it is we are trying to determine or resolve. I don't think there is anything wrong per se, that everything is how it would be, and the readings consistent, if the batteries simply aren't capable of running both motors at the same time.

The better first step may be to run each motor off its own battery supply. If the READADC10 reading are the same for each respective motor, whether run separately or both together, that would point to it being an over-strained supply when there's only a single supply.
 

WhiteSpace

Well-known member
Thanks very much @AllyCat and @Eng460. I made some good progress last night that I will report more fully later. Interestingly both motors when locked and fed from 2xAA then 3xAA (1xAA didn’t produce very reliable readings) showed much more consistent readings from which I was able to calculate a stall current of 2A for the full 6xAA. I made the connection only momentarily in each case, so I hope no damage done. But that doesn’t explain the figures to which @AllyCat refers above - I was planning to check all the paths, leads etc this evening. I’m planning to upgrade to a 28x2 for the project itself (from 20M2) so I should have the odd ADC free. I had already been thinking of a voltage indicator, so thanks for the suggestion.

I have a UNI-T digital multimeter that measures temperature and frequency as well as V, I, R, capacitance, continuity, but not inductance. I got it about 5 years ago. I think it’s a budget brand, but quite a decent one. I was just starting out at the time a Fluke seemed extravagant. I’m based in the UK.

Thanks again.
 

WhiteSpace

Well-known member
Thanks @hippy too. I think I’m on the right track now thanks to the help here - more work this evening and then I’ll write it up properly in case it’s of wider interest.
 

Eng460

Well-known member
Hi Whitespace, I am glad that you are now able to make some progress and will be interested to see the next steps.

I am sure that meter will serve you well for many years. I still have in my tool box a really cheap one that was bought for my son when he was about 12 years old. He is now in his forties, and has progressed to more sophisticated instruments, and didn’t want to keep it. But that original one still serves well and agrees with the other meters I have bought since. Like Allycat, I would definitely not suggest buying a new meter just to measure inductance in this sort of project.

In fact it is difficult to work out what you would be measuring. When you think about the motor windings and the commutator brushes, it is likely that as you slowly turn the motor, you are mostly measuring the equivalent of one coil operating in parallel with two others. And because the magnetic field strength is varying as you change the relationship of the armature poles to the fixed magnets, inductance will at best be highly variable, and will certainly be hard to interpret. However with resistance measurement, the result is possibly less variable, though still always involving more than one coil. The stall current is still defined as the current with the rotor locked, and is also the peak current when the power is applied to start the motor, so those effects are inherently taken into account whichever way you measure it.

Allycat, you know, I had actually typed in “AVO or Fluke”, but edited it out before posting because I did not want to be misunderstood. I expected that you would have good meters, but have noticed that they are less likely to include inductance. Also I agree 100% that I would not recommend buying a meter until one works out why it is needed, and then for most of us, we have to wait until we can afford it. There is so much enjoyment to be had from the hobby without buying excess equipment, no matter how nice to have, and inductance measurement is probably the least essential for what most of us do.

Eng460
 

WhiteSpace

Well-known member
I had thought this morning that I would have success to report - after a couple of days of testing, I realised on the way to work today that that I had made one fairly serious error in my circuit build which I thought was the answer, but correcting it doesn't seem to have resolved the issue. It's been an interesting couple of days and I have learned a lot, but I'm not sure that I'm very much nearer a solution. I think I now need to tear the whole thing down and rebuild it bit by bit.

Hippy commented that he had rather lost track of what I was trying to determine. Originally I was trying to understand how to determine a value for ReadADC10 that would equate to the stall current, as shown by the sense resistors at the base of each H-Bridge. The in-use unstalled values were very different between the motors, with no obvious reason. There were very helpful explanations from AllyCat and Eng460 that it's difficult to make meaningful measurements of motor resistance. I followed their advice and measured the current with each motor momentarily stalled, with 2 and 3 AA batteries. Multiplied up to 6 AA batteries and the working voltage of the motors, that equated to a stall current of 2.0A, which is more or less what the supplier had said. Interestingly both motors showed the same stall current, unlike the ReadADC10 figures, which consistently showed one motor drawing nearly twice the current of the other in their unstalled full speed operation. So perhaps I can just ignore the inconsistent current readings at unstalled operation and set trigger values that reflect the stall current for both motors.

Hippy asked whether the motors turn more slowly when one is running than when both are running, which might indicate that the battery is running out of power. The answer to that one is "no" - outside the circuit, so just connected to the battery, and with a couple of gears, both motors were turning very consistently at 250RPM whether one or the other or both were connected. When both were connected, they drew 110mA off 7.45V; when the L motor was connected, 50mA and when the R motor was connected, 60mA.

Interestingly though the motors rotate at only around 185RPM when connected in the circuit

I tried to measure the resistance of the sense resistors (0.18A) in a voltage divider with another known resistor, to check whether they were the same, but this only resulted in a very hot smell. I swapped them over in the circuit and there was no obvious change in the readings, so it's not the resistors.

The more productive test was to test the current flowing through each of the 4 P-Channel MOSFETs at the top of the H-Bridge. I measured this with the ammeter between the source pin of the MOSFET and the cathode of the protection diode next to the battery.

I ran each motor separately and both together, forward and reverse. Here are the results:

23519

I've ringed the results that are worrying. From my fairly limited understanding of H-Bridges, I don't think I should be getting both upper rail MOSFETs drawing current at the same time. There might be some leakage current, but this would be in the uA or nA range. If I understand correctly, a current means that there will be shoot-through between (eg. in the case of Forward left), the right hand P-Channel MOSFET in the left motor H-Bridge and the right hand N-Channel MOSFET. I'm not entirely sure why all my MOSFETs aren't totally fried, although it may explain why they have been getting so hot.

I've also only just spotted that while the right motor draws more current than the left when both are going forward, the opposite is the case when they are reversing. When only one motor is running, they seem to draw more or less the same - a fraction under 1A.

I thought that I had the answer - I realised that I had connected the pull-up resistors for the upper rail MOSFETs to the 5V regulated supply for the ICs etc rather than to the 7.8V unregulated supply to the motors. I have learned that the difference between them exceeds the gate threshold voltage for the MOSFETs (they are logic level NDP6020P with a VGS of less than 1V, so they must have been turned on). But moving the jumper leads from the pull-up resistors to the unregulated voltage level hasn't resolved the issue. I've checked and rechecked all of the connections - that I haven't accidentally mixed up any of the connections. One option I suppose is that my messing about so far, shorting the MOSFETs for quite a long period of operation, has now damaged them so that they won't properly turn off. Is that possible? Is it possible to test a MOSFET?

Next thing to try is to connect the two driver chips to the 7.8V supply - they need a minimum of 4.5V and perhaps the 5V regulated supply isn't quite enough. If that doesn't work, as I said, I will go away and take the circuit down and rebuild it one motor at a time. If I've missed anything obvious please let me know!

Thanks
 

AllyCat

Senior Member
Hi,

I'm also very confused because I thought that you had confirmed (with a multimeter) that the motors had very different resistances. But....
Next thing to try is to connect the two driver chips to the 7.8V supply ….
I don't think we've been shown a circuit diagram of your "H Bridge", but I would have thought that connecting the "driver" chips to the same supply rails as the FETs would be absolutely fundamental to its correct operation (the old forum used to have a "shocked" smiley, but :eek: seems to be the nearest now ;) ).

Cheers, Alan.
 

WhiteSpace

Well-known member
Thanks AllyCat. That looks shocked enough! I should probably be displaying a whole row of red face smileys. Yes, the ammeter showed different resistances for the two motors unstalled, and yet they had the same stall current when I locked them and touched the wire to the battery. I had initially thought that I should run the driver chips off the same regulated 5V as the Picaxe, IR receivers etc, but maybe that’s not right. The diagram (in an earlier post) shows the TC4469s connected to 12v like the motors but as I am replacing the 555 that they use for PWM with the Picaxe I thought that I should put the driver chips on the regulated supply too. I hope it’s as simple as changing them up to the 7.8V, because otherwise the circuit works very well - the IR control translated from pots on the transmitter works better than I expected and gives good motor control. Just need to sort this bit! Thanks again.
 

hippy

Technical Support
Staff member
When both were connected, they drew 110mA off 7.45V; when the L motor was connected, 50mA and when the R motor was connected, 60mA.
That is good news. It seems they are more matched than they appeared to be. Not perfectly matched but in the same ballpark and, as the combined current is the sum of both individually, I would say those are readings one can rely upon and use.

The diagram (in an earlier post) shows the TC4469s connected to 12v like the motors but as I am replacing the 555 that they use for PWM with the Picaxe I thought that I should put the driver chips on the regulated supply too.
So, "I’ve copied it exactly, except that instead of the 555 chip, the Picaxe provides a PWM signal" wasn't exactly correct then :)

Run the TC4469 from the battery rather than 5V and everything should be better.

With VIL of 0.8V, VIH of 2.4V the inputs should be compatible with the PICAXE digital outputs.
 

AllyCat

Senior Member
Hi,
I've ringed the results that are worrying.
I think it's the UNringed (non-zero) currents that you should have been worried about. Those half to one Amps were the "through" currents, heating up the FET(s) because the upper transistors weren't being turned off (in fact actively turned on).

If the motors really only need 50 - 60 mA, then even a READADC10 across the 0.18 ohm resistors isn't going to indicate very much (1 or 2 ?). You could probably increase the resistor values, or use the internal FVR1024 as the reference for the ADC (the FVR1024 is not "recommended" by Microchip for the ADC, but IMHO acceptable in this application). That should at least get the measurement back into double-digits and still give a "full scale" of over 5 Amps (stall current for each motor). BTW, in your original schematic, I would just "pull out" the NPN (2N3904) and take what was the base connection to a PICaxe ADC input.

Cheers, Alan.
 

hippy

Technical Support
Staff member
If the motors really only need 50 - 60 mA, then even a READADC10 across the 0.18 ohm resistors isn't going to indicate very much (1 or 2 ?).
Probably not much more than that but, if we are not looking at measuring current drawn, only looking to determine stalls, it may be acceptable if the read value jumps significantly enough when stalled.

A jump from 60mA to 375mA when stalled should push a READADC10 reading to over 10, which should allow normal running and stalled to be differentiated. If stalled currents are higher the jump will equally be larger.

But the idea of dropping Vref for the ADC to create greater values is a sensible suggestion.
 

WhiteSpace

Well-known member
:mad::mad::mad: - very red face: thanks very much guys, particularly @hippy and @AllyCat for so much assistance, and many apologies for taking up so much of your time. It looks as though the issue was indeed that I had mistakenly connected the TC4469s to the 5V regulated supply rather than the 7.8V unregulated motor supply. Is that because the MOSFETs saw the "high" output from the TC4469 (at VDD - 0.025 according to the datasheet) as lower than their gate threshold voltage and therefore turned on even when the chip was sending a "high" (off) signal?

I think it's the UNringed (non-zero) currents that you should have been worried about. Those half to one Amps were the "through" currents, heating up the FET(s) because the upper transistors weren't being turned off (in fact actively turned on).
Yes, I had thought that the 0.5A to 1A currents were the currents that i wanted and that the smaller currents were the through currents. I realise that it was the other way round.

So, "I’ve copied it exactly, except that instead of the 555 chip, the Picaxe provides a PWM signal" wasn't exactly correct then :)
More :mad::mad::mad:! I hadn't thought that using a lower voltage supply was a real difference. It wasn't quite that simple. Apologies again.

So now the maximum current drawn by either motor is 0.06A, at full ahead with a fairly light set of gears. The max RPM has increased considerably, to 245 RPM (compared with 250 measured out of the circuit, which probably just reflects the battery protection diode) instead of the 185 or so that I was getting in the circuit previously. The MOSFETs aren't getting hot. What's still odd is that with the motors running, the feedback from the left sense resistor is consistently around 3-5, but around 5-10 from the right motor.

BTW : The circuit in Post #13 comes from Microchip's AN807 Application Note -

https://static5.arrow.com/pdfs/documentation/mcp/application note/00807a.pdf
Yes, that's the one.
 

AllyCat

Senior Member
Hi,
Is that because the MOSFETs saw the "high" output from the TC4469 (at VDD - 0.025 according to the datasheet) as lower than their gate threshold voltage and therefore turned on even when the chip was sending a "high" (off) signal?
Yes, but it's almost more fundamental than that: Nearly all IC pins (input and output) have (electrostatic) "protection" diodes to prevent the voltage straying much "outside" the supply rails (e.g. Vdd + 0.6v to Vss - 0.6v). Strictly, the upper FET driver current flows "out" of the pin, whilst the current from the gate of the external P-channel FET (to turn it on) is "into" the pin. So even if the upper driver were "off", the pin voltage could not exceed Vdd + 0.6, which would still pull the external P-channel gate "on" (negatively w.r.t. its Source) by about 7.8 - 5.6 = 2.2 volts.
What's still odd is that with the motors running, the feedback from the left sense resistor is consistently around 3-5, but around 5-10 from the right motor.
It's definitely still worth trying to find the reason for that. It's quite difficult to measure (accurately) resistors as low as 0.18 ohms, but rather easy to (accidentally) include some additional resistance (of that order) into a circuit. So my guess (assuming that you haven't mistakenly connected the two 0.18 Rs in series) is that there is some "unexpected" resistance in a connection or connector to the resistor in your circuit. For resistances as low as that, measuring the voltage drop (using a multimeter) with a moderate (known) current (e.g. your motor) and applying Ohm's Law, is likely to be a more definitive measurement than any other method.

Finally, if you continue with the 0.18 Ohm values, consider READADC10 with FVR_2048, but using only a byte value (include a MAX 255 for safety). That would give approximately a convenient 10mA / step and a maximum (full scale) of 2.7 Amps (@ 500 mV) . Note that at 2.5 Amps, the power in the resistor will be 2.52 * 0.18 = 6.25 * 0.18, or a little over a watt (about as far as is wise to go in a simple "measurement" circuit). In the original Microchip circuit the "trip point" was a transistor Vbe, or about 600 mV.

Cheers, Alan.
 
Last edited:

WhiteSpace

Well-known member
Well I have learned a huge amount about Picaxe in the last 6 weeks, although at times it has driven me to distraction. Since I last reported, I have:
  • kept my head down most of the time, after the embarrassing incident of connecting the upper rail MOSFETs to the 5V supply for the Picaxe rather than the 7.xV supply for the motors (apologies again to the very patient @AllyCat and @hippy for the wasted time)
  • discovered that I had destroyed one of the upper rail MOSFETs as a result of the above (probably not the first forum member to have smoked a component, as far as I can see)
  • added in a battery voltage checker
  • added in a current calculator based on a sense resistor (although not yet an interrupt to stop motors in the event of a stall)
  • added another of the little OLEDs to display the above
  • added a second Picaxe on the receiver side to drive the OLED so as not to slow down the transmission of commands to the motors
  • learned how to communicate between Picaxes with Serin/Serout, and how to break down and reconstitute word values for transmission (is it worth making serial comms between Picaxes a bit clearer in the manual - it really focuses on communication with PCs and other devices and it was only really on this forum that I learned how to use it as between Picaxes)
  • added a check function to the IRIN/IROUT which seems to have eliminated the rogue signals that sometimes reversed one or other of the motors mid-flight
  • discovered the value of using Sertxd as a diagnostic tool to see where the code fails (which happened very many times). Again, would it be useful to explain this in the manual
  • learned the value of SYMBOL and a bit of structure: this thread is very useful - https://picaxeforum.co.uk/threads/listing-order-for-bit-byte-and-word-variables-in-code.31860/
The thing that has taken most of the time to work round is the timing of IRIN/IROUT. The length of the timeout on IRIN is critical - too short and it will just miss the transmission and keep cycling round without receiving the command. Perversely, the other big factor is the effect of SerTXD. I had put in lots of them so that I could see what was happening, but of course that meant that less and less was happening because it was getting bogged down. For one test I sent 100 IROUT transmissions in succession, with a SerTXD between each one to show the value transmitted. That took 5.4 seconds - 54ms per cycle. Without SerTXD it took 3 seconds/30ms per cycle. That made all the difference between transmissions being received and not.

I'm quite pleased with the check function. It's not a proper checksum; instead, it looks for a repeat of the same value within a cycle of 3. I had originally allowed for a repeat within 4, but on studying the output from Sertxd it was clear that there was nearly always a repeat within any group of 3. Here's a snippet:

Rich (BB code):
ReadTSOPinputs:
      
GetLeftIRIN:

ReadLTSOPinput1: ; add "L" in the middle of the label otherwise there is a duplicate label name in the code to get the R motor command

      Do until IRINvalue1 < 52
                  
            Irin [noparse][[/noparse]100, ReadLTSOPinput2[noparse]][/noparse], TSOPinput1, IRINvalue1; get left motor control signal first.  Simpler to say which one we want first, otherwise need an if... loop to allow for right control coming first.  Timeout to the second TSOP,
      
      Loop ; now we have first IRIN value, so proceed to get 3 more.  do we really need 3 or would 2 be enough

      Irin [noparse][[/noparse]75, ReadLTSOPinput2[noparse]][/noparse], TSOPinput1, IRINvalue2;
      
      Irin [noparse][[/noparse]75, ReadLTSOPinput2[noparse]][/noparse], TSOPinput1, IRINvalue3;
      
      [noparse];Irin [75, ReadLTSOPinput2], TSOPinput1, IRINvalue4; [/noparse]
      
      put 500, IRINvalue1, IRINvalue2, IRINvalue3;, IRINvalue4
      
      If IRINvalue1 = IRINvalue2 OR IRINvalue1 = IRINvalue3 then ;OR IRINvalue1 = IRINvalue4 then; checks for a repeat signal.  Even if IRINvalues 2 to 4 may be values for R motor, LIRINvalue has to be a L motor value because IRINvalue1 must be less than 52 and one of the others must match it in order to be accepted
            
            Let LIRINvalue = IRINvalue1 ; if it gets a repeat, sets LIRINvalue as the repeated value and goes to get a R signal
            goto GetRightIRIN
      
      ElseIf IRINvalue2 < 52 AND IRINvalue2 = IRINvalue3 then; same principle
            
            Let LIRINvalue = IRINvalue2
            goto GetRightIRIN
            
      Endif
            
The output looks like this:

3 LIRINvalues from TSOP1 = 27, 27, 27,

3 LIRINvalues from TSOP2 = 0, 93, 93,

3 RIRINvalues from TSOP1 = 80, 80, 80,

3 RIRINvalues from TSOP2 = 0, 0, 0,

And the winners are: LIRINvalue 27; RIRINvalue 80

Sent via SerialOut: xyz, 22, 0, 22, 0, 0, 0, 7775, [1E], _

3 LIRINvalues from TSOP1 = 27, 27, 27,

3 LIRINvalues from TSOP2 = 0, 80, 80,

3 RIRINvalues from TSOP1 = 84, 84, 84,

3 RIRINvalues from TSOP2 = 0, 0, 0,

And the winners are: LIRINvalue 27; RIRINvalue 84

The SerTXD here is the serial communication of current and voltage to the OLED chip. Hippy had suggested using an 08M2 to handle the IRIN, transmitting the motor commands to the main 28X2 on the receiver side via Serin, but after a certain amount of experimentation I reversed the setup, using the separate Picaxe to run the OLED rather than the IRIN. The reason is that the thing that slows down the transmission of motor codes to the motors is the display, so it seems better to leave IRIN and motor PWM to communicate closely with each other and to minimise lag between them.
 
Last edited:

WhiteSpace

Well-known member
Following on from the above, I was also quite pleased with these calculations, which tested my O-level maths! They convert the ADC figures from sense resistors and a voltage divider into word values for current and voltage.

Rich (BB code):
Let LeftCurrent = LeftFeedbackVal * 100 / 41 * 100 / 9; this is a simplification of nADC *1020/205*100/18 which is in turn a simplification of nADC/1023 * 5000mV / 0.18R ; there's some error in this calculation, but less than 1 nADC.
;Let RightCurrent = RightFeedbackVal * 100 / 41 * 100 / 9

Let RightCurrent = RightFeedbackVal * 100 / 41 * 100 / 9; as above

Let VoltValue = Voltage * 100 / 102 * 83 / 27 * 5
And then these values are transmitted to the OLED chip via serout:

Rich (BB code):
Serout SerialOut, N9600_8, ("xyz", LeftCurrent.msb,LeftCurrent.lsb, RightCurrent.msb,RightCurrent.lsb, VoltValue.msb,VoltValue.lsb ); sends current and voltage as pairs of byte values that are then reconstituted on the display chip.  "xyz" is the qualifier that marks the beginning of the transission to ensure that bytes are decoded in the correct order
This is then reassembled into the original word value (thanks @hippy for the explanation in another post that I now can't find) and then broken into digits to send to the OLED:

Rich (BB code):
If LeftCurrent > 999 then
            ;let b11 = LeftCurrent DIG 0 + "0" ; this splits LeftCurrent w11 into 3 digits for display, ignoring the 3rd decimal place,
                  ;and adds a decimal place and a zero.  Not sure why the + "0" is necessary,but it works
            let LCurrentHundredths = LeftCurrent DIG 1 + "0"
            let LCurrentTenths = LeftCurrent DIG 2 + "0"
            let LCurrentUnits = LeftCurrent DIG 3 + "0"
            
            let b22 = 0

            do
            lookup b22, (LCurrentUnits, ".", LCurrentTenths, LCurrentHundredths, "A"), b21 ;this takes the 3 digits of and feeds them in succession to b21
            ;which points to the right place in ram
      
            gosub DisplayCharacter
            inc b22
            loop while b22 <= 4
Of course it's entirely unnecessary to show voltage and current on a display on the vehicle, but it's been an interesting challenge to implement it and it looks good on the little OLED. I'm sure there's a much easier way of doing all this - have ended up with 3 separate 28X2 chips, which is rather extravagant - but at least I understand how all this code works. Hopefully if anyone else is grappling with any of the same issues this will save some time.

There's quite a bit more tweaking to do, and I need to write the code to shut the motors down if the current shows a stall, but it now seems to be stable, transmitting the instructions to the motors in around half a second, which is quite good, I think.


23688
 

Attachments

Top