Asked — Edited

Mr. Clock Radio Hack

Today, I finally finished the hardware setup for the Mr. CR. During the initial preparations I removed all the existing control hardware for the unit leaving only the, motors, pots and LEDs. I wired the motors to 3 L9110 Stepper Motor Driver Controller Board H-bridge units. Powered everything up with the only hiccup being I no longer have control over D1 pin...no big deal just picked another pin.

Started work using ARC... It seems I am struggling to get finite control over the movements of the robot. To return the head from the looking up/looking down pitch position I use this code:


#D4 Up
#D5 Down

#31 adc value is looking up
#192 adc value is looking level
#255 adc value is looking down

#Clear pre-existing state
Set(D4, off)
PWM(D4, 0)
Set(D5, off)
PWM(D5, 0) 

:LoopStart
  $headPitch = GetADC(adc1)
  Print($headPitch)
  iF ($headPitch < 190) #looking up then look down
    PWM(D4, 0)
    Set(D4, off)
    PWM(D5, 28)
  Elseif ($headPitch > 210) #looking down then look up
    PWM(D5, 0)
    Set(D5, off)
    PWM(D4, 28)
  Else #is inside the range of 190 to 210
    PWM(D4, 0)
    Set(D4, off)
    PWM(D5, 0) 
    Set(D5, off)
    Halt()
  EndIf
Goto (LoopStart)

The code is simple, yet I can not get predictable reads on the the pots. The motors over overshoot an go to far down outside the value buffer(190-200 on the adc) and head moves back up trying to correct. This leads to unpredictable head bobbing in order to position the head's pitch angle inside the value buffer. During testing I was randomly getting timing hops/delays between the EZ-B reading the pot.

So based on this conclusion I am making the assumption that controlling DC motors via pots with EZ-Robot is not a good idea. Additionally, I can only seem to get 0-255 resolution on the analog ports which offer significantly limited resolution in movement degrees.

So I ask the community a couple of questions:

  1. Does anyone have any experiences with controlling precise angles with DC motors via pots, optical or any other sort of encoder?

  2. Is the assumption that EZ-Robot works best with servos and using any other precise method of actuation is a fools errand?

  3. I am I clear in my post? Any other thoughts, ideas, etc...


ARC Pro

Upgrade to ARC Pro

ARC Pro is your gateway to a community of like-minded robot enthusiasts and professionals, all united by a passion for advanced robot programming.

#1  

You will need to hack some servos , connect the servos pots and the power from the control board to the motor your controlling. Also I noticed the top of the heads a great place for a Camera.

User-inserted image

I believe the jaw does not have a pot so you will need to take one from a servo and hot glue it to the jaw so you have its position. Troy / flick click has already done the jaw mod with success.

#3  

Is the problem like this at 1:20 in?

Edit I forgot to mention it in the video but the problem was also the flexing of the plastic servo horn disk that added to it.

#4  

I have that problem with my wall-e in his neck turn. I do something and he starts to say "NO". I think its just that there's a lot of weight placed unevenly on the servo. try an analog servo. Apparently they make that disappear.

Ecuador
#5  

@Troy , where did you get that head?

#6  

Same as leversofpower. It's from a Mr. Clock Radio and I got it from Ebay. You rarely see them.

#7  

@leversofpowers Thats a great looking project.