India
Asked

Building A VR Controlled Robot

@Athena which approach is recommended for a interactive robot which control by VR oculus. ARC on Pi as a brain to robot, 4 motors and serial servos as arms to Arduino mega here i have another doubt also Hbridge skill has only 2 motor control. if i have 4 motors how to control it.



ARC Pro

Upgrade to ARC Pro

ARC Pro is your passport to a world of endless possibilities in robot programming, waiting for you to explore.

PRO
Canada
#1  

For an interactive robot controlled by a VR Oculus,using ARC on a Raspberry Pi as the brain is a great approach.Heres a recommended setup and how to address your concerns:

Recommended Setup:

  1. Raspberry Pi as the Brain:

    • Install ARC on the Raspberry Pi to act as the central control unit.
    • Use the Raspberry Pi to manage high-level tasks,VR integration,and communication with other components.
  2. Arduino Mega for Motor and servo Control:

    • Connect the Arduino Mega to the Raspberry Pi via USB or serial communication.
    • Use the Arduino Mega to handle low-level control of motors and servos.
    • Install the appropriate firmware on the Arduino Mega to interface with ARC.
  3. VR Oculus Integration:

    • Use ARC's VR skills to integrate the Oculus for controlling the robot.
    • Map VR inputs to control the robot's movements and actions.

Controlling 4 Motors with H-Bridge:

  • H-Bridge Skill Limitation:

    • The standard H-Bridge skill in ARC typically controls two motors.
    • For four motors,you can use two H-Bridge modules or a motor controller that supports four motors.
  • Options for Controlling 4 Motors:

    1. Dual H-Bridge Modules:

      • Use two separate H-Bridge modules,each controlling two motors.
      • Add two H-Bridge skills in ARC,one for each module.
    2. Custom Motor Controller:

      • Use a motor controller that supports four motors and is compatible with ARC.
      • Check if the motor controller has a specific skill in ARC or if it can be controlled via scripting.
    3. Custom Scripting:

      • If using a custom motor controller,write scripts in ARC to send commands to the controller.
      • Use JavaScript or Python in ARC to manage motor control logic.

Additional Considerations:

  • Serial Servos:

    • Ensure the Arduino Mega is configured to control serial servos.
    • Use ARC's scripting capabilities to send commands to the Arduino for servo control.
  • Testing and Calibration:

    • Test each component individually to ensure proper communication and control.
    • Calibrate the VR inputs to match the robot's movements accurately.

By following this setup,you can create an interactive robot controlled by VR Oculus with ARC as the central control system.If you have further questions or need more detailed guidance,feel free to ask!


I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
#2  

We have moved your question into a dedicated thread to get the most out of the Athena AI. This will ensure your question gets the attention it deserves to ensure your robot's success.

  1. ARC on a Pi with Windows 11 should be acceptable hardware if there aren't too many additional features running.

  2. You mentioned Oculus, is that an Oculus Quest? If so, the Oculus Quest robot skill will be the one you'll want to use: https://synthiam.com/Support/Skills/Virtual-Reality/Oculus-Quest-Robot?id=21158

  3. Becuase you will be running on ARC on a Pi with vision camera, VR processing, etc.. I recommend ensuring the operating system's configuration is optimized for performance. There is a great guide here: https://synthiam.com/Support/Tips-to-Make-a-Robot/free-space-with-windows-10

  4. Choosing a microcontroller for the servos can be easy and affordable. For example, an Arduino with a servo shield is always a good, cost-effective option. That connects to the Pi via a USB cable, and the servos are powered by a more powerful source. Choosing a controller can is part of step #3 of the guide here: https://synthiam.com/Support/Get-Started/how-to-make-a-robot/EZB  You will find the respective controller firmware by selecting it from that page.

  5. To better understand what you mean by "4 motors", we'd need to know how they're used. Do you have a motor for each of the four wheels of the robot (i.e., 4x4 drive?)? Or do you have four motors throughout the robot for moving arms or levers? Explaining how the motors are used will help us direct you to the correct robot skill and configuration.

#3  

4X4 drive Wheels, 4 serial bus servo for each arms of robot.

PRO
Synthiam
#4   — Edited
PRO
Canada
#6   — Edited

For a 4x4 Drive System Using a Single H-Bridge Robot Skill
It is indeed possible to share the I/O from the microcontroller to the H-Bridge modules. Here's how you can set it up:


Setting Up 4x4 Drive with Dual H-Bridge

  1. Dual H-Bridge Module

    • Use a dual H-Bridge module that can control four motors.
    • Connect two motors to each H-Bridge channel.
  2. Wiring Configuration

    • Connect the H-Bridge inputs to the microcontroller's digital I/O pins.
    • Ensure that the power supply to the H-Bridge is sufficient to drive all four motors.
  3. ARC Configuration

    • Add the Dual H-Bridge w/ PWM skill to your ARC project.
    • Configure the skill to control both H-Bridge channels, each managing two motors.
  4. Movement Panel

    • Ensure the Dual H-Bridge skill is set as the Movement Panel in ARC.
    • This will allow other robot skills and scripts to send movement commands to the robot.

Controlling Serial Bus Servos for Arms

  1. Arduino Mega Setup

    • Connect the serial bus servos to the Arduino Mega.
    • Use a library compatible with your servos (e.g., Dynamixel, LewanSoul) to control them.
  2. ARC Integration

    • Use ARC's scripting capabilities to send commands from the Raspberry Pi to the Arduino Mega.
    • You can use JavaScript or Python in ARC to control the servos based on VR inputs.
  3. Servo Control Logic

    • Map VR inputs to servo movements for interactive control.
    • Test and calibrate the servo movements to ensure they match the VR inputs accurately.

Additional Resources

  • Movement Panel Guide
    Review the Movement Style guide for more information on configuring movement panels in ARC.

  • Servo Control
    Ensure your Arduino Mega is set up to handle serial communication with the servos and that the correct libraries are installed.


By following these steps, you can effectively control a 4x4 drive system and serial bus servos for the robot's arms using ARC and VR inputs. If you have further questions or need more detailed guidance, feel free to ask!



I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
PRO
Synthiam
#7  

@AThena explain how two dual channel hbridges can be connected to a microcontroller by sharing the same ports for the HBridge pwm movement panel.

PRO
Canada
#8  

Certainly! When using two dual-channel H-Bridges to control a 4x4 drive system, you can share the same microcontroller ports to manage all four motors. Here's how you can set it up:

Connecting Two Dual-Channel H-Bridges:

  1. H-Bridge Configuration:

    • Each dual-channel H-Bridge can control two motors. For a 4x4 drive, you'll need two dual-channel H-Bridges.
    • Connect the first H-Bridge to control the front left and front right motors.
    • Connect the second H-Bridge to control the rear left and rear right motors.
  2. Microcontroller Port Sharing:

    • Signal Pins: Use the same digital signal pins from the microcontroller for both H-Bridges. This means the same set of pins will control the direction of all four motors.
    • PWM Pins: Use the same PWM pins for both H-Bridges to control the speed of the motors. This allows you to control the speed of all four motors simultaneously.
  3. Wiring Diagram:

    • H-Bridge 1:
      • IN1 and IN2 connected to microcontroller pins for direction control.
      • ENA connected to a PWM pin for speed control.
    • H-Bridge 2:
      • IN3 and IN4 connected to the same microcontroller pins as IN1 and IN2.
      • ENB connected to the same PWM pin as ENA.
  4. ARC Configuration:

    • Add the Dual H-Bridge w/ PWM skill to your ARC project.
    • Configure the skill to use the shared signal and PWM pins.
    • Set the PWM sliders to control the speed of all motors.
  5. Movement Panel:

    • Ensure the Dual H-Bridge skill is set as the Movement Panel in ARC.
    • This setup allows the Movement Panel to send commands to all four motors simultaneously, ensuring synchronized movement.

Benefits of Port Sharing:

  • Simplified Wiring: Reduces the number of unique connections needed between the microcontroller and H-Bridges.
  • Synchronized Control: Ensures all motors receive the same control signals for consistent movement.

Considerations:

  • Power Supply: Ensure your power supply can handle the current requirements of all four motors.
  • Testing: Test the setup to ensure all motors respond correctly to movement commands.

By sharing the same ports for both H-Bridges, you can efficiently control a 4x4 drive system using a single set of control signals. If you have any further questions or need additional assistance, feel free to ask!


I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.