Frackkkk
Discovered the hard way that Eddies body needs a bit more clearance to fit over the controller board I made…
Back to the drawing board…
Frackkkk
Discovered the hard way that Eddies body needs a bit more clearance to fit over the controller board I made…
Back to the drawing board…
I looked at various options and decided cutting a part off the fiberglass body piece was going to be the easiest solution. I figured I can easily re-attached the cut off part. I marked off where I wanted to cut with masking tape and then used a Dremel tool with a cut off blade…
It cut pretty easily and didn’t seem to chip the finish much…
You will notice a hole on the top of the grey plastic box used to mount the power switches. This is for the umbilical of various wires to the moving part of Eddie. But the mounting of the emergency power off switch kinda blocked the path for the wiring. I did a little re-work and mounted the EPO switch on the front. This probably makes it more usable and frees up room for the cabling.
I mounted the controller board and started with the power and signaling cabling for the first 2 motors…
Next I have to rig up position sensors for each of the motors and program the NANOs. The code should be easy as it is just a copy of the first controller but these controllers drive 2 seperate motors rather than just the single motor used in the base.
Finally got off my butt and cleaned up the code…
Added a couple safety features:
Limit Switch Inputs - If either triggered will stop and shut down motors
Sensor Value Checking - If rotation sensor value is out of bounds it will stop and shut down motors
Neither will help if the NANO goes south but then hopefully the motor driver thermal cutout and/or circuit breaker will come into play if the mechanism inadvertently hits a physical limit
And I have the E-Stop button that shuts down all power to the motors…
Don’t want Eddie killing anyone…
…not anymore
Or not yet…
IT WAS NEVER PROVEN! THEY SLIPPED! NO ONE READ THE WARNING SIGNS!
you eat one stray tourist in a sleep deprived hallucination DECADES AGO and it’s all that anyone remembers…
So the motor driver for the base works fine. Its a NANO driving a single VNH2SP30 motor driver.
Its load is minimal as it is just panning the base and the driver barely gets warm…
The next two motors are in bottom of the arms and move the first two joints (shoulder and elbow in robotics talk apparently). Since I wanted to avoid running long wires for the noisily motors I figured I could mount things in the arm. So for these motors I used a NANO to drive two motors drivers.
And in my limited testing these motors only seemed to need a few Amps at 12V and my drivers would easily handle that…
So I made up new code that can drive two sperate motors and rigged up the position encoder for the first axis
Fired it up and it kinda worked… I set the PID to minimal values initially so I could confirm my motor polarity was correct (it wasn’t). Then got a little more aggressive in the settings and it did work. Using 2 seperate faders on my DMX console I had control of the first two axis!!
But it started working intermittently and I smelled what I thought was my soldering iron, which should have been off. And it was…
The tiny VNH2SP30 motor driver was smoking hot and its thermal protection must have been cutting out.
So looks like I have a few new problems:
The motor is drawing way to much current for the controller. In initial testing it seemed like it would be fine but it’s obvious way to much for the VNH2SP30 (though its rated for over 10A). Im going to setup a ammeter to see what its actually using. I did monitor the power supply voltage and there was no appreciable sag in the 12V rail so the power supply appears to be fine…
The motors rated voltage is unknow to me. I’m using 12V because that worked when I tested them initially. Its possible these may run on 24V (in which case the current draw would be 50% of what it is drawing now). Unfortunately my motor drivers are only rated to 16V.
This axis has the highest mechanical load as all the weight of the arms and head are on it. The motor lifts the arm much slower than it lowers it. It doesn’t have any sort of counterweight or spring to help it. And once the motor starts lowering it really struggles against the inertia to start lifting. I was thinking adjusting the PID may help (though not sure if there is a easy way to have seperate PID values for lifting vs lowering) but this may be due to the motor not having the required power due to me usign too low of a supply voltage. I play with the supply voltage but I don’t have any spare motors and they are not replaceable (robotic arm was made in the 80s by a company that no longer exists)
So I’ll start by monitoring the current and see if bumping up the motor supply voltage to 16V (limit of existing driver) helps.
I’m gonna look around for a beefier motor driver. Do not wanna spend too much $$ so may try these from AliExpress:
Rather than something much more $$ (but much better) from Pololu. Also want something that will fit in the space I have available…
I have also found that using my little DMX lighting console is a pain. If it gets powered down the channels stay off when powered up rather than going to whatever the slider is set at. And it has a master fader that adjusts all channels and I keep knocking it and then wondering what the channels to move to where they should…
A while back I starting on a animatronic centric DMX controller and its time to finish it. It has 8 channels. 4 slide faders (each with a bump button) and a 4 way joystick (X & Y as you expect, Z from twisting the knob and a 4th channel from a button on the knob). Driven by a Teensy and it has an OLED display to show channel data and allow configuration of the channel parameters. I have the running portion working great but got bogged down on the programming options portion…
Another possible issue is the high PWM frequency I am using on the NANO…
I have it set for 31kHz as I can hear the motors whine at 3.9kHz and 420Hz (the only other options)
Looks likes the VNH2SP30 is only rated for 10 kHz…
Spent some time troubleshooting:
As you can see it still seems to hunt at a steady position which I don’t experience in the previous motor I setup in the base. However I think I know why:
The arm motor has the load of gravity pulling it down so it is constantly having to fight this (the pan motor doesn’t)
The rotation sensor is reading movement from the axis shaft and since the amount of motion is not much (mebbe 30 degrees) the range of the sensor output voltage isn’t much. While the sensor can output from 0V to 5V for a full 360 degree range (which the NANO analog convertor translates to a 0-1023 value) my input voltage swing is minimal so I only get a change of less that 10% of this. Couple this with the 10 bit limitation of the NANOs AD convertor I suspect I don’t have enough granularity in the sensor signal to get a smooth operation…
If that makes sense…
I can think of a few options:
And in the event that the high PWM frequency is also causing issues I may look to see if there are any soft PWM libraries that let me set the PWM output frequency to something other that the 4kHz or 31kHz options I have with the hardware based counters I am using… Though I may run out of steam on the NANO so may not be worth it…
Looking around to find a better micro for my motor controllers than the NANO without spending too much $$… I also want something with a small form factor…
The Raspberry Pi Pico ($5.73 @ Digikey) has the all the features and is almost at AliExpress NANO clone pricing (well mebbe double but still cheap)
I also like the Seeed XIAO RP2040 ($6.70 @ Digikey) but it only has 11 GPIO pins and that limits me with using 2 motor drivers. But it is small and has an onboard RGB led for showing status.
The RP2040 has a 12 bit ADC (so better resolution than the 10 bit in the NANO which may help with the narrow range on my sensor input) and seem to have an adjustable PWM output frequency (that will let me move it to above the hearing range but below the limit of various motor controllers.
But I will need to add level translators for the 5V RC PWM control signal input and for the motor controllers that need 5V logic (though lots of the newer motor controllers support 3.3V logic, just not the ones I have a pile of)
Both are also supported on the Arduino IDE which I’m sure is crap but nicely aligns with my coding ability… I’m still using 1.8 so mebbe it is time to try 2.x
I downloaded and tried the Arduino 2.3 IDE and it is dramatically faster compiling the code than my 1.8.x version was so certainly worth moving to… Time will tell if I have issues with any of my older code…
I built a new motor controller board this time using a Seeed XIOA RP2040…
I do like the small form factor of the Seeed XIOA and the many features of the RP2040. I have some of the cheaper RP2040-Zero clones on the way…
Does it require two power supply levels?
There is an evaluation board from Infineon Semiconductors that does level shifting (IC is EIC…). It also has galvanic isolation (may not be needed here).