Good micro processor

trebla

Joined Jun 29, 2019
542
t’s just a steep learning curve for me. Like learning a whole new language.
It is normal and i believe that anybody remember very well his begginning in this complicated but very interesting area. But my suggestion is start with a drawing, first mechanical, then electical and eventually draw a program flowchart. This gives for you (and also for others who want to help you) a good overview of your project and helps in troubleshooting.
 

Thread Starter

navyguy

Joined Sep 27, 2019
108
It is normal and i believe that anybody remember very well his begginning in this complicated but very interesting area. But my suggestion is start with a drawing, first mechanical, then electical and eventually draw a program flowchart. This gives for you (and also for others who want to help you) a good overview of your project and helps in troubleshooting.
Sounds like a lot plan. Thanks
 

soyez

Joined Aug 17, 2020
51
Hi.

Working on my Halloween pirates and need the head, neck, arms etc to move at same time.
I’ve tried Arduino and that is not what I want to use.
Would the parallax propellor board and software be good for this? Anything else I can go with?
It would be best...go for it
 

soyez

Joined Aug 17, 2020
51
Hi.

Working on my Halloween pirates and need the head, neck, arms etc to move at same time.
I’ve tried Arduino and that is not what I want to use.
Would the parallax propellor board and software be good for this? Anything else I can go with?
It would be best...go for it
 

trebla

Joined Jun 29, 2019
542
For moving servos independently in same time you must change algorithm for something like this:

1.Calculate next servo positions for 10 servos
2.If decent time to write postitions to servos is passed then go to 3 else do something useful
3.Write calculated positions to servo 1 to 10
4.Go to 1

There is only one task 3 which takes time no matter how fast your MCU is. If task 1 is not forced to do some floating point 3D calculations then it is passed under millisecond for Arduino UNO.

You can shorten time for task 3 if you use special servo shield with own controller, instead attaching servos directly to Arduino pins.
 

Thread Starter

navyguy

Joined Sep 27, 2019
108
For moving servos independently in same time you must change algorithm for something like this:

1.Calculate next servo positions for 10 servos
2.If decent time to write postitions to servos is passed then go to 3 else do something useful
3.Write calculated positions to servo 1 to 10
4.Go to 1

There is only one task 3 which takes time no matter how fast your MCU is. If task 1 is not forced to do some floating point 3D calculations then it is passed under millisecond for Arduino UNO.

You can shorten time for task 3 if you use special servo shield with own controller, instead attaching servos directly to Arduino pins.
Thank you. A bit beyond me at this juncture but I’ll definitely take note of your suggestion
 

djsfantasi

Joined Apr 11, 2010
9,155
Thank you. A bit beyond me at this juncture but I’ll definitely take note of your suggestion
Remember, in a forum you get many different opinions. While a Propeller will work, so will just an Arduino Uno. Especially with the Adafruit shield. Or a Pic or ATTiny...

Your skeleton does not need a lot of speed; the RC servos are slower than the Arduino, so even with a Delay of a few commands, they will appear to be moving simultaneously.

The shield offloads all of the servo timing. So you don’t need multiple cores of a Propeller.

IMHO, what you need is a detailed description of how you want your skeleton to move. When to turn the neck. When to move (and how) to move the arms. What the head will do.

Once you share that, I think you will get better feedback as to how to proceed.

I haven’t said much because I didn’t know what you wanted. Your initial question, “good micro”, can’t be answered if you don’t answer these questions above.

Some members are replying because they know how to use a micro to do multiple things simultaneously. Other members respond because they have controlled servos with a micro, but never with a co-processor and dedicated firmware (the Adafruit shield). These other viewpoints are valid, but may be confusing to you

But few of us have created Halloween props. And that’s what you’re trying to do.
 

Reloadron

Joined Jan 15, 2015
7,480
Sorry, I lost this thread. Every now and then I manage to do that. I did load the code sample I gave you earlier and it sat here running for a few days problem free. Last I read your servos were getting erratic. I need to look back and see how that ended. Damn, I can't believe I missed an update notification, then too, not my first time.

Ron
 

djsfantasi

Joined Apr 11, 2010
9,155
Sorry, I lost this thread. Every now and then I manage to do that. I did load the code sample I gave you earlier and it sat here running for a few days problem free. Last I read your servos were getting erratic. I need to look back and see how that ended. Damn, I can't believe I missed an update notification, then too, not my first time.

Ron
He’s running multiple RC servos on the same power supply as the MCU and without any capacitive filtering. I don’t remember your code, but I think you were controlling the servos directly. He is using a co-processor/shield controlled with I2C commands.
 

Thread Starter

navyguy

Joined Sep 27, 2019
108
Sorry, I lost this thread. Every now and then I manage to do that. I did load the code sample I gave you earlier and it sat here running for a few days problem free. Last I read your servos were getting erratic. I need to look back and see how that ended. Damn, I can't believe I missed an update notification, then too, not my first time.

Ron
No problem Ron. Thanks for helping.
the real mystery is why the program ran fine for several minutes and then went crazy on me. Still can’t get it to work without the servos having major seizures.
 

Reloadron

Joined Jan 15, 2015
7,480
He’s running multiple RC servos on the same power supply as the MCU and without any capacitive filtering. I don’t remember your code, but I think you were controlling the servos directly. He is using a co-processor/shield controlled with I2C commands.
Thanks. Yeah, I think we touched on using the single supply awhile back. When using a uC, really any uC I lean towards using a separate supply especially where motors, any motors, are concerned. I am also big on using caps for filtering. Also, multiple servos I like the idea behind a co-processor. Heck, your project speaks for itself. Still think that is pretty cool. :)

Ron
 

John P

Joined Oct 14, 2008
2,025
I've attempted to run multiple servos from a single processor and seen them go into insane mode, even if they're running off a separate voltage regulator from the processor. I believe the problem is that the power supply for the servos isn't always adequate. If you have several servos moving at once under load, or even one motor that stalls, it pulls the power supply voltage down. Or (this is really sneaky) after some time in operation, the voltage regulator overheats and that lowers its output voltage, when it was OK to begin with. This might cause the linear loop in the servo to change its characteristics--remembering that the actual position sensing is done with a potentiometer, so an unstable voltage might change the performance. And then, once the servos start thrashing around, of course the voltage problem is going to get worse. I haven't got absolute proof that this is what happens, but it seems to fit the facts.
 

djsfantasi

Joined Apr 11, 2010
9,155
I've attempted to run multiple servos from a single processor and seen them go into insane mode, even if they're running off a separate voltage regulator from the processor. I believe the problem is that the power supply for the servos isn't always adequate. If you have several servos moving at once under load, or even one motor that stalls, it pulls the power supply voltage down. Or (this is really sneaky) after some time in operation, the voltage regulator overheats and that lowers its output voltage, when it was OK to begin with. This might cause the linear loop in the servo to change its characteristics--remembering that the actual position sensing is done with a potentiometer, so an unstable voltage might change the performance. And then, once the servos start thrashing around, of course the voltage problem is going to get worse. I haven't got absolute proof that this is what happens, but it seems to fit the facts.
I have seen the same behavior. I run 11 servos with a 10A power supply. Specifically, without a separate power supply and an Arduino, two RC servos are the max depending on the servo and their load.

RC Servos are primarily motors and under load can draw several amps. You wouldn’t try to start your car with an AA cell (exaggeration for effect). In most cases, they require a hefty power supply (as compared to the electronics) which must be sized for the load and servo. A couple of them can run on an Arduino because their current draw isn’t continuous.
 

Thread Starter

navyguy

Joined Sep 27, 2019
108
The situation as you described makes a lot of sense. That is what had me so confused. My existing power supply is only good for 1 amp. Thought if it worked fine with other programs using 3 servos I thought it couldn’t be the problem.
I’ll find something bigger.
Thanks so much
 
Top