Controller and additional devices for assembly

Hello,

I'm looking for advice to get controller for animatronics assembly control with single usb connection from desktop application

I have to control 8 servo motors 1 loudspeaker, which should amplify computer sound, and use 1 video camera to get computer vision output with further processing and subsequent commands to controller

I need to handle event commands for several motors like this stepper with 2.5 oz-in of torque https://www.pololu.com/product/1204, which movement should be pretty fast and powerful, but I'm not sure about speed of data exchange, as well as receiving data from CV same way as from usual PC USB camera

and I think, I need some bipolar stepper driver and probably, a compatible high voltage motor power supply (e.g. 24-36 volts), not sure, to get the desired step rate.

I'm newbie with controllers, servomotors, steppers, power supply etc., need advice to find correct controller and additional devices

Any advice would be helpful

hi axio,

This seems like a lot to do with just an arduino. Controlling the servos is something that should be doable. However it seems like your project is very big and complicated (lots of torque, fast movement, image processing). What exactly are you trying to do?

Also if you are a newbie start small and work you way up. Start with an arduino and two servos and a power supply for the servos and play with them until you are comfortable to move on.

Hello,

Sure it is good advice to start with simple)

it is robotic project with animations.

Anyway, it would be useful to know a basic approach for particular assemble.

First of all about controller if Arduino Duo is all I need

I have program with basic logic for control.

I need to get data from video camera same way as from usual usb pc or notebook camera to use this event for command to servos, it is fast combinations in range of 360 degree. I need single connection with assemble, that's where I need powerful and fast motor as well as data receiving I guess, 5 motors should be driven by events and 3 servos for less fast movement.

Processing of sound just from pc microphone, nothing is required. And amplifying computer sound in loudspeaker

it would be very helpful to get basic advice about controller, additional devices by specified requirements and what should I envisage

and thank you for your feedback

sorry but i am not sure what your question exactly is.

it is robotic project with animations.

What sort of robot? what sort of animations? is the robot doing animations? is a person doing animations to control the robot?

I need to get data from video camera same way as from usual usb pc or notebook camera to use this event for command to servos

What data from video camera? what does "event" mean in this case? Please keep in mind that the arduino is usually not powerfull enough to do any video analysis.

it is fast combinations in range of 360 degree. I need single connection with assemble, that's where I need powerful and fast motor as well as data receiving I guess, 5 motors should be driven by events and 3 servos for less fast movement.

I have no idea what you are trying to explain here, sorry.

Processing of sound just from pc microphone, nothing is required

What sort of processing? Arduinos do not have the power to do voice regonition if that is what you mean.

And amplifying computer sound in loudspeaker

Sound from an external pc? You could use an arduino with an sd card reader to play music, but keep in mind that an arduino is not a sound amplifier by itself (you can buy those relatively cheap though).

It seems to me you want to build a very complicated project in one go. Try to break down the project in smaller bits. For example if you want to make a coffee maker you would divide the project in three functions:

-boil water -grind coffee beans -filter the coffee

Then you can find solutions for every function and get a design. Also then you can ask more specific questions which will be easier to answer.

Hope that helps.

I agree with @teunman that you must take this in small steps.

In your Original Post it seems to me you have a jumble of tasks some of which can be done by an Arduino and some by your PC. You need to separate these out. For example an Arduino would be very poor at Audio and quite incapable of video.

If you post a list of the tasks that you think your Arduino should be capable of then it will be easier to provide guidance.

...R

Hello,

Yes sure, as I said above the input and processing of sound occurs in PC, controller does not participates, and amplification of sound can be postponed for later, it is less important.

My main tasks:

Video:

I need send commands to motors by calculation of coordinates from computer vision. It must be usual video camera ability, but connected through the controller. The question is not whether Arduino can independently process data using computer vision, I don't need any video analysis from controller. My question, what is difference between usual connection with usb, and connection through controller usb.

Fast movement

Robot doing facial movements, it is eyes movement based on cv processing result in real time, and it is mouth movement which has 21 combinations for each viseme.

Most part of movement is a event driven commands, this assumes that the response and motion of motors must be quite fast and synchronous with event, without delay. It is a short movements from one end to another mostly in range of 90 degree with step positions, each event sends command for 3 motors at the same time, to get specific combination.

Calculation of initial position seems to me programmatically solvable, but if there is no way to get feedback on the actual position, maybe I have to use something like smart servo, advice would be very helpful

axio9: Fast movement

Robot doing facial movements, it is eyes movement based on cv processing result in real time, and it is mouth movement which has 21 combinations for each viseme.

Most part of movement is a event driven commands, this assumes that the response and motion of motors must be quite fast and synchronous with event, without delay. It is a short movements from one end to another mostly in range of 90 degree with step positions, each event sends command for 3 motors at the same time, to get specific combination.

Calculation of initial position seems to me programmatically solvable, but if there is no way to get feedback on the actual position, maybe I have to use something like smart servo, advice would be very helpful

You are describing something that is familiar to you but not to us.

Can you describe more directly what you expect the Arduino to do?

...R

Yes,

yes first off all use camera connected to controller with single usb connection to pc

control servos in real time by event driven commands from desktop application, synchronously, without delay for several motors at the same time

axio9: yes first off all use camera connected to controller with single usb connection to pc

I presume this has nothing to do with the Arduino so we can ignore it.

control servos in real time by event driven commands from desktop application, synchronously, without delay for several motors at the same time

This is certainly Arduino territory.

  • How many servos do you need to control?
  • How many messages per second does the PC need to send to the Arduino?
  • Can you give us an example of a message?

...R

Robin2: - How many servos do you need to control?

8 servo motors

  • How many messages per second does the PC need to send to the Arduino?

Well I think it is no less then 5 for Viseme event and real time control from coordinate greed degree must be 3-5 per second

  • Can you give us an example of a message?

Event example should be something like

if (e.Viseme == 1) 
{ 
      port1.WriteLine(degree1); 
      port2.WriteLine(degree2);
      port3.WriteLine(degree3); 
} 
else if (e.Viseme == 2)
{ 
      port1.WriteLine(degree1);
      port2.WriteLine(degree2); 
      port3.WriteLine(degree3);
} 
...

yes first off all use camera connected to controller with single usb connection to pc

I presume this has nothing to do with the Arduino so we can ignore it.

I found this video "How to connect OV7670 camera with arduino" - youtube.com/watch?v=8V-XBA2qAKY

I'm not sure, but it is looks like exactly what I'm looking for

axio9: 8 servo motors

Well I think it is no less then 5 for Viseme event and real time control from coordinate greed degree must be 3-5 per second

Event example should be something like

That should be well within the capabilities of a 16MHz Arduino. Have a look at the examples in Serial Input Basics - simple reliable ways to receive data. There is also a parse example to illustrate how to extract numbers from the received text.

I found this video "How to connect OV7670 camera with arduino" - youtube.com/watch?v=8V-XBA2qAKY

I'm not sure, but it is looks like exactly what I'm looking for

I have no experience of those little cameras. Even though the resolution is low I suspect they will impose a heavy computation load on an Arduino so I wonder if it could cope with the camera as well as the servos and the messages from the PC.

...R

Thank for answer

Can you show me example of controller

16MHz Arduino

I’m trying to figure out what is difference with Uno and Duo for my case

The Uno and Mega work at 16MHz. The Due is a lot more powerful. All the details are on the product pages

…R

Ok if I get you right, I have to use

Arduino Mega 2560 Rev3

and combine it with

Arduino Due

or

Arduino Uno Rev3

and also in motor movement commands sequence must be fast change of angle degree, for example:

command 1

motor1 - 0 angle degree motor2 - 90 angle degree motor3 - 180 angle degree

command 2

motor1 - 30 angle degree motor2 - 180 angle degree motor3 - 90 angle degree

torque required to accelerate mass 53 gm, from 0 to 300 rpm in, for example 0.1 seconds.

I think to use this stepper https://www.pololu.com/product/1204 which requires bipolar stepper driver and compatible high voltage motor power supply (e.g. 24-36 volts)

Maybe it is enough to use some usual servo motor or smart servo

any advice on this direction would be useful

axio9: So I have to use only Arduino Mega 2560 Rev3 or I've to combine with Arduino Due or Arduino Uno Rev3

I don't understand why you are drawing that inference from what I said? Can you explain your thinking? Maybe I was not as clear as I thought I was.

...R

A Due might work but there are also other Cortex M# microcontroller boards that would also be suitable. The Due is good because it has a bunch of pins - and you want to control 8 motors - either servo or stepper, in real time, so you'll need a bunch of pins.

Stepper motors are controlled by specifying how many steps they turn - each step is discrete and countable, but the start position needs to be set externally. Servo motors work in a 'servo control' loop, either the absolute position is set, or the speed and direction are set. For the absolute position kind, they typically turn less than 180 degrees. Both are used for robotic applications, depending on the exact needs. Facial expressions (visemes and eye movements) would appear to be servo applications.

So, my suggestion is to get the servos you need and a Due (or other Cortex based board) and learn to program the servo movement. It's mostly straight forward, but there are subtleties. If you run into problems with the servos, come back with your troublesome code, and ask about them.

Hold off on the visual and auditory sensing. You may come up with ideas once you are more familiar with the ways of Arduino.

Robin2: I don't understand why you are drawing that inference from what I said? Can you explain your thinking? Maybe I was not as clear as I thought I was.

sorry, maybe I misunderstood something, I thought that you recommended to use Arduino uno and Mega microcontroler

ChrisTenone: So, my suggestion is to get the servos you need and a Due (or other Cortex based board)

Thank you

Very useful answer

So I have to use Due or Cortex based board

and what the function of Mega microcontroller in this kind assembly

A mega (or even a smaller Arduino) will do fine for servos, but if you plan on doing more, start with a Cortex Arduino, so you won't have to start over then.

ChrisTenone: A mega (or even a smaller Arduino) will do fine for servos, but if you plan on doing more, start with a Cortex Arduino, so you won't have to start over then.

So I should use Arduino Due https://store.arduino.cc/usa/arduino-due but there also a different type like Arduino Due (Atmel Sam3X8E Arm Cortex-M3 Mcu)