Asked
— Edited
Dear EZ-Robot Team and friends,
I want to control a 4 Wire HBridge PWM connected Motor with the Sound-Servo App or a similar program / script.
Its a mouth-motor from a toy, I cannot change the motor. so I want to use HBridge.
I dont wanna make a long script with mouth animations.. for 1-3 sentences its okay but for a conversation not.
Can someone help me ?
is there a trick ?
regards Marty
A servo knows it's position. This is why servos are used in robotics for joints. An hbridge can only tell a motor to move forward or reverse and does not know the position of the output shaft. Hbridge is good for controlling the wheels of a robot, not joints.
Find out why servos are different than a regular motor by reading this tutorial: http://www.ez-robot.com/Tutorials/Lesson/48
thanks again :-)
DJ
The script could then send forward and pwm commands to the H-bridge based on the variable or virtual servo position.
Little bit of scripting, but definitely possible based on what you are trying to do.
Alan
Use a glue gun and retrofit a servo is the best option.
Ooooor
Use the electronics of the servo to connect to the existing motor. And retrofit the pot for positioning
Alan
I hope I get it. I leave the thread still "open".
This also means when the sound is completed, the mouth will be left open.
If this is what you want, then you simply need to start the digital ports that move the hbridge before talking, and stop the digital ports after.
There is absolutely zero way a sound servo or talk servo can be used.
Even if you control the pwm with sound servo, it's going to be really terrible. It'll move fast and slow with sound but certainly won't look like speaking.
Either retrofit a servo to replace the motor -OR- connect the servo electronics to the motor and fit the positioning sensor somewhere.
Can you help me a little bit ?
Now I have opened the sound-board, HBrigde Movement, Sound servo EZB and EZ Script.
First I go to Sound servo and make a virtual servo like V1
then I copy/ Paste $Soundv4Value in the EZ Script and make a COde.
All what I need is " Forward(255,200)" if the V1 recognizes sound/ the soundboard play a sound.
@DJ
Okay, I understand.. but my robot-mouth has an jump-spring... is the power off, the mouth goes very fast to the close-position by jump-spring - without any electronics.. all what I need is a power on/ off reaction If the Sound-Board play sounds. " Forward(255,200) "
Before each SayEzbWait() command, add the code to start the hbridge. Then after, add the code to stop it
I.e.
Code:
Or, if you're using pwm on the hbridge, simply connect the pwm to a servo port and use Talk servo control. Initialize the hbridge to always be on by either hard wiring the direction or connect it to the ezb and init script such as
Code:
@Thetechguru
I want to use my own "german" MP3-Sounds with the soundboard 4 + sound servo ezb 4. I want to play selfmade voice sounds and the 4 Wire HBridge PWM must powering on " Forward(255,200) " if the sound servo recognized sounds.
Is it easy, too ?