Animatronic Gorilla

So I've been tasked with crafting an animatronic gorilla that talks an moves it's arms. The "shell" is a plush gorilla thats about 14 inches high (its in a sitting position). I'm using arduino for the mouth movements and arm movements. I was wondering what would be a simply way to make the arms and mouth look relatively fluid? (as far as I know all the servos do is go back and forth which is basic but I guess it works). The arm movements have to line up with the talking for the most part and the "speech" it gives is supposed to be educational so I guess my question is, how can arm movements with a simple servo be done in a non-hilarious manner, as that is what the project calls for?

Please define "non-hilarious manner" vs. "hilarious manner".

I guess you are referring to smoothness of movement. That is largely up to your programming skills: make those servos move at an appropriate speed by not setting them to the end point directly, but by letting them make timed steps. One thing that may help here is to set the pulse length of the servo signal, giving you more steps (1,000 steps) than when setting the angle (180 steps), thus allowing for smoother movements.

To make it synchronise with the speech is tricky, you will have to program the timing counting from the start of the sound track. So the moment your sketch starts the specific track, it starts the movement program as well, after which it is all a matter of timing to keep it in sync.

Of course, for serious animatronics, you encode the movement commands into the sound track. I suspect the MP3 format allows for this natively, but would require more than a basic Arduino.

how do I code without a void loop

how do I code without a void loop

You don't

Start by learning how a micro controller program works!

Mark

holmes4:
You don't

Start by learning how a micro controller program works!

Mark

Hi, "Mark", I know its possible as I have 6 years of experience in the field of Arduino. That was pretty rude and it hurt my feelings as I sensed a bit of hostility, anger, sarcasm, and hatred. I simply need a refresher on coding without void loops. Any help would be greatly appreciated.

An arduino sketch is a C++ program like any other so it has a main function. The IDE takes care of this and prototype generation behind the scenes, but you can supply your own main if you wish. Just make sure that you call the init function to initialize the hardware.

There’s really no need though. Your sketch is inevitably going to have to iterate through a list of actions using a loop construct of some kind, so you might as well keep the loop function for that purpose.

Alternatively, you can treat loop as if it were main and simply stop it from being called more than once by putting a while(1) as the last statement.

Finally, if you come back to the forums for help, people will find it (a little bit) harder to understand what you’re doing if you’ve rolled your own.

I would guess that if you're determined to dive into the guts of the system and avoid the useful features that make it an Arduino then you're pretty much on your own. Certainly I can't help, I've never felt any need to try.

Just for interest why do you want to avoid using the standard loop() function?

Steve

ArduinoTHOTTY:
Hi, "Mark", I know its possible as I have 6 years of experience in the field of Arduino. That was pretty rude and it hurt my feelings as I sensed a bit of hostility, anger, sarcasm, and hatred. I simply need a refresher on coding without void loops. Any help would be greatly appreciated.

Really?

ArduinoTHOTTY:
Hey so im new to arduino and i was wondering how to simply reverse a servo motor code, so that the motor spins the other way, do i simply put a negative sign in there or something?

^ exactly..

what is your POINT for not wanting a loop() function? (as of now.. this make ZERO sense)

  • in 6+ years.. (or are you new? it cant be both as you've stated) I would have thought you would have learned how to search better then in this is the route you insist on taking.... (and the feedback is something you feel like ignoring)

I would also suggest you do some searching on animatronics.... and how they utilize mechanical engineering to make movements and multi-limb movements..etc..

ArduinoTHOTTY:
Hi, "Mark", I know its possible as I have 6 years of experience in the field of Arduino.

I'm with the chorus here in suggesting that your "experience" is spurious. :roll_eyes: You registered to this forum no more than two months ago and this forum is undeniably the centre of Arduino activity.

ArduinoTHOTTY:
That was pretty rude and it hurt my feelings as I sensed a bit of hostility, anger, sarcasm, and hatred.

Then you clearly have "issues". Sarcasm to be sure but the others are totally your invention. Hey! I'm being sarcastic too, but we are actually only here to help you.

ArduinoTHOTTY:
I simply need a refresher on coding without void loops. Any help would be greatly appreciated.

We seem to agree you are on a "creative head-banging" exercise. The structure used in the IDE is entirely adequate for all tasks for which you would use a microcontroller; this is not a multi-tasking PC, so your request is not sensible.

ArduinoTHOTTY:
how can arm movements with a simple servo be done in a non-hilarious manner, as that is what the project calls for?

If you have just one servo at the “shoulder”, for example, all the arm does is move up and down as a unit, probably meeting your definition of hilarious.

If you have a servo at the shoulder and a servo at the “elbow”, you can achieve a more realistic compound movement.

I think you will want to look at these types of compound movements to get your desired non-hilarious action.

Your problem is going to be sizing motors and servos small enough for the elbow or wrist of a 14 inch plush doll.

bigred1212:
Your problem is going to be sizing motors and servos small enough for the elbow or wrist of a 14 inch plush doll.

Generally done with a servo in the larger section and push wires.

Kind of like the animal body itself! :grinning:

Paul__B:
Generally done with a servo in the larger section and push wires.

Kind of like the animal body itself! :grinning:

Aha! Tendons etc. Didn't think about that. Good stuff!

bigred1212:
If you have just one servo at the "shoulder", for example, all the arm does is move up and down as a unit, probably meeting your definition of hilarious.

If you have a servo at the shoulder and a servo at the "elbow", you can achieve a more realistic compound movement.

I think you will want to look at these types of compound movements to get your desired non-hilarious action.

Your problem is going to be sizing motors and servos small enough for the elbow or wrist of a 14 inch plush doll.

Hi Big Red, thanks for the help. The issue I face, and I should have mentioned it before, is that I am only allotted 3 motors to use for the project. One of these is reserved for the Gorilla's mouth, though. I was thinking a fishing line pulley attached to the end of each of the Gorilla's arms would be good for moving the arms with only one motor, but I don't know how I could get the servo motor to pull the fishing line enough.

P.S.- BJHenry exposed me and i'm discouraged.

ArduinoTHOTTY:
I don't know how I could get the servo motor to pull the fishing line enough.

Attach a longer lever arm to that servo and you can pull as much as you like. Or a shorter lever on the other end and you don't have to pull much for the mouth to open really wide or the arms to swing all the way back and forth.

Does start to sound quite hilarious to me.

ArduinoTHOTTY:
I am only allotted 3 motors to use for the project

Who says that? Are THEY involved in this project? Why can't we do anything without THEM!

By three motors I'm going to hope that at least means three servos.

You work with what you got. One on the mouth, one on one arm to move it up and down, and one in the upper body to turn it side to side. Spare movements making your gorilla statesmen as eloquent as possible. Think Shakespearian actor on the stage in stand and deliver mode. Talk, occasionally raise one arm, occasionally turn your body, occasionally do both. If you only have two motions outside the mouth you can do, don't do both of them all the time and exhaust your repertoire in 3 seconds.

Seems to be another classroom assignment.

Paul

Make it easy on yourself for the mouth and remember KISS (Keep it Simple Stupid). Use a simple actuator, like what a relay has, something that goes in a certain direction when powered (and spring loaded return). Then just use a simple amplifier and tie in your audio signal. Then adjust volume so as the voice starts and stops between words, the mouth moves up and down. Simple right?

As for the arms, I guess you will have to "pick your poison", meaning a real mechanical arms has several motors to give movement in different axis. You have a limited under of motors, aka one each arm. You could do the arm movement control in a similar way as the mouth, but I'd want to put some Arduino control over it. Do something like an arm movement during a long pause or randomly during the speech.

You also might rethink controlling both arms and only do the right one (right handed basis here). Then use a simple motor to turn the head occasionally/randomly. Personally, moving the head back and forth (slowly or at pauses) makes it more life like than having two arms that only work in one dimension. You might be able to get clever and have the arms move as the head is turned that direction and from the same motor. Think about like how you turn your head to one side, your arm goes up and the other goes down and vice versa. Rotated at the shoulder. Do it in real life and see what I mean.

Then again, if you want to get complicated and end up with a long custom action script for a single presentation, have it. I'm proposing a method that doesn't depend on custom program actions, movement based on the sound level only with some randomize movements more or less "in tune" with it.

bigred1212:
You work with what you got. One on the mouth, one on one arm to move it up and down, and one in the upper body to turn it side to side. Spare movements making your gorilla statesmen as eloquent as possible. Think Shakespearian actor on the stage in stand and deliver mode. Talk, occasionally raise one arm, occasionally turn your body, occasionally do both. If you only have two motions outside the mouth you can do, don't do both of them all the time and exhaust your repertoire in 3 seconds.

Reminds me of "Big Mouth Billy Bass". One motor does it all.