OBJ lesson needed!
lardom
Posts: 1,659
in Propeller 1
I'm working on a robotic arm that has DC motors. I'm using potentiometers to control the position of the arm. To control the 'gripper' I used a slide switch to open and close it and two limit switches to stop the motion.
The problem was that the other motors would not work when the 'gripper' object was called from the parent. I had to call it from a child object and I don't know why that was necessary.
I had to comment it out in the OBJ block of the parent.
The problem was that the other motors would not work when the 'gripper' object was called from the parent. I had to call it from a child object and I don't know why that was necessary.
I had to comment it out in the OBJ block of the parent.
Comments
Mike
@msrobots, before I share the project code I want to get it to the point where I can demonstrate what it does...without tying up seven cogs. I can do better than that. I'm not concerned with efficiency yet.
I used that driver to differentially steer a wireless robotic arm. My initial thrill did not last long because, among other things, I was limited to 4-bit 'speed' control. I wanted at least 6-bit control...and I wanted to eliminate the three toggle switches on my transmitter.
What I 'really' want is a larger wireless machine that I can potentially control over the internet. At this point it looks like my vision will require two Propellers or a P2.
Thanks. I'll add this to my "JonnyMac" folder.
Thoughts that went into the driver:
-- for motors used in pan/tilt heads I need to have a PWM frequency about ~18kHz (otherwise the motors whine)
-- at 80MHz the Spin loop update can run at about 37+kHz (I rounded down to 35)
-- in an 80MHz system, there are 2285 tics in the 35kHz PWM period -- using 1000 units means 2.2+ ticks per unit
My latest project with this driver -- which I just finished coding on Friday night -- is a remote camera control system. The base unit (with joystick) has four buttons to select which pan/tilt head to control. Coms between the master and the remotes are at 30x/second which is the same as when we're connecting directly. The remotes have an auto shutdown feature so that the pan/tilt head slows down and stops smoothly if the camera operator changes cameras while one is in motion. I just got an email from the client yesterday who told me the system is completely tested and working really well.
I posted it to YouTube and expected a reasonable amount of interest in it but it hasn't gotten many views and there are no comments. I would share the code only if I saw any interest.
Meanwhile, I want to challenge myself once again.
I'll watch it!