Grabber- Tech notes

Microbit is used for Bluetooth radio remote control.

Combined Transmitter code:

Toggle switch on transmitter, connected to Pin 14, switches function from car control to robo arm control.







Receiver Code:

   Uses strings to control car function.


Tilt of remote is used to drive car motors by sending number codes for forward, reverse, left, right

 Logo(touch sensor) is used to shut off motors

  A and B buttons are used to open and close servo motors

  Download hex files:

  https://drive.google.com/drive/folders/1a5V_Xw4zG903T39a7QqLuSIE9TIl7fqA?usp=sharing


   Extension: Motorbit




Car Code: Number received controls car motors and servos.




  Additional buttons could be added.













Connect the HM-10's TX (Transmit) pin to Arduino Nano digital pin 10 (RX), and the HM-10's RX (Receive) pin to Arduino Nano digital pin 11 (TX). This is achieved using the SoftwareSerial library so you can keep the hardware serial pins free for programming and debugging. [1, 2, 3, 4]
Follow these steps for the complete wiring and setup:
  1. VCC connects to the Arduino's 5V pin.
  2. GND connects to the Arduino's GND pin.
  3. HM-10 TX goes to Arduino Digital Pin 10.
  4. HM-10 RX goes to Arduino Digital Pin 11. [1, 2, 3]
Note on Logic Levels: While the HM-10 operates at 3.3V, many breakout boards include an onboard regulator, meaning you can safely connect the TX (HM-10) to the Arduino (5V) directly. However, the RX line to the HM-10 is not 5V tolerant. To prevent damage to the module over time, it is recommended to step down the 5V output from Nano pin 11 to 3.3V using a simple voltage divider (a 1kΩ and 2.2kΩ resistor). [1, 2, 3, 4]




Dabble ESP32 Gamepad example code:

/ put your setup code here, to run once:
Serial.begin(115200); // make sure your Serial Monitor is also set at this baud rate.
Dabble.begin("MyEsp32"); //set bluetooth name of your device
}

void loop() {
Dabble.processInput(); //this function is used to refresh data obtained from smartphone.Hence calling this function is mandatory in order to get data properly from your mobile.
Serial.print("KeyPressed: ");
if (GamePad.isUpPressed())
{
Serial.print("Up");
}

if (GamePad.isDownPressed())
{/*
Gamepad module provides three different mode namely Digital, JoyStick and Accerleometer.

You can reduce the size of library compiled by enabling only those modules that you want to
use. For this first define CUSTOM_SETTINGS followed by defining INCLUDE_modulename.

Explore more on: https://thestempedia.com/docs/dabble/game-pad-module/
*/
#define CUSTOM_SETTINGS
#define INCLUDE_GAMEPAD_MODULE
#include <DabbleESP32.h>
void setup() {
/
Serial.print("Down");
}

if (GamePad.isLeftPressed())
{
Serial.print("Left");
}

if (GamePad.isRightPressed())
{
Serial.print("Right");
}

if (GamePad.isSquarePressed())
{
Serial.print("Square");
}

if (GamePad.isCirclePressed())
{
Serial.print("Circle");
}

if (GamePad.isCrossPressed())
{
Serial.print("Cross");
}

if (GamePad.isTrianglePressed())
{
Serial.print("Triangle");
}

if (GamePad.isStartPressed())
{
Serial.print("Start");
}

if (GamePad.isSelectPressed())
{
Serial.print("Select");
}
Serial.print('\t');

int a = GamePad.getAngle();
Serial.print("Angle: ");
Serial.print(a);
Serial.print('\t');
int b = GamePad.getRadius();
Serial.print("Radius: ");
Serial.print(b);
Serial.print('\t');
float c = GamePad.getXaxisData();
Serial.print("x_axis: ");
Serial.print(c);
Serial.print('\t');
float d = GamePad.getYaxisData();
Serial.print("y_axis: ");
Serial.println(d);
Serial.println();
}


--------------------------------------------------------------------------

 The iRobot 310 SUGV (Small Unmanned Ground Vehicle) is a man-portable robot manufactured by iRobot Corporation. The SUGV is intended for use by soldiers, combat engineers and mobile explosive ordnance disposal (EOD) technicians to gather data for situational awareness in critical conditions.

https://www.army-technology.com/projects/irobot-310-sugv-us/

Seen at Sail Boston July 11th:




Wyze Cam OG Indoor/Outdoor 1080p Wi-Fi Smart Home 


$29.00



DC 12V 3RPM 12Kg.cm 8mm Double Shafts Self-Locking Reversible Worm Gear Motor 





HobbyPark Waterproof Servo 20KG Servo Motor High Torque RC Servo Metal Gear Digital Servo with 25T Servo Horn for 1/10 1/12 RC Car Robot DIY Control Angle 180°








Robot Arm Degrees of Freedom

Robot Arm Torque Calculator

To calculate torque on a robot arm joint, you multiply the object's weight by the distance to the joint and by the cosine of the arm's angle. Use the formula: \(\tau = m \times g \times d \times \cos(\theta)\). Always calculate the worst-case scenario where the arm is fully horizontal. [1, 2, 3]
Key Terms Defined
  • τ (Torque): The twisting force that makes the robot arm rotate.
  • m (Mass): The weight of the payload or arm segment in kilograms.
  • g (Gravity): Constant acceleration of 9.81 m/s².
  • d (Distance): The length from the pivot point to the object's center of mass.
  • θ (Angle): The angle of the arm measured from the flat, horizontal plane. [1, 2, 3, 4, 5]
Step-by-Step Calculation
  1. Find Mass: Find the weight of your item in kilograms.
  2. Find Distance: Measure how far the item is from the motor in meters.
  3. Check the Angle: Multiply the mass × gravity × distance. Multiply that total by the cosine of your angle.
  4. Add Safety: Multiply your final answer by 2 or 3 to ensure your motor has enough power to move fast without stalling. [1, 2]
Simple Example
Imagine you are lifting a 2 kg weight at the end of a 0.5 m arm. The arm is completely flat at 0°.

\(\text{Torque} = 2 \text{ kg} \times 9.81 \text{ m/s}^2 \times 0.5 \text{ m} \times \cos(0^\circ)\)

Torque = 9.81 N ⋅ m × 1 = 9.81 N ⋅ m [1]

----------------------------------------------------------------




Kitronik Robotics Board:

I suggested using Microbit V2 and Kitronik Robotics Board, enabling Bluetooth wireless control of up to 8 servomotors.

Remote Control:


    Car:






To control a robotic arm, you will need a BBC micro:bit attached to a Kitronik Robotics Board to move motors and servos. [1, 2]
Here is how to set up and program a 3-joint robotic arm using block code in the Microsoft MakeCode Editor:
1. Add the Robotics Extension
Open your project in MakeCode and load the required extension for your hardware: [1]
  • Click on the gear icon (Settings) or scroll to Advanced in the block menu.
  • Click on Extensions.
  • Search for "Kitronik Robotics" and select the Kitronik Robotics Board extension.
  • This adds a new Robotics menu with custom servo blocks. [1, 2]
2. Physical Setup
Plug servos into the servo headers on the board. For a standard 3-joint robotic arm, use these channels: [1, 2]
  • Servo 1 (Base): Controls the rotation left or right.
  • Servo 2 (Shoulder): Controls the arm moving up or down.
  • Servo 3 (Claw/Gripper): Controls opening and closing. [1, 2, 3, 4, 5]
3. Example MakeCode Program
This code opens and closes the claw when you press buttons A and B on your micro:bit, and moves the base and shoulder.
blocks
input.onButtonPressed(Button.A, function () {
    kitronik_robotics_board.servoWrite(kitronik_robotics_board.Servos.Servo1, 0)
    kitronik_robotics_board.servoWrite(kitronik_robotics_board.Servos.Servo2, 90)
})
input.onButtonPressed(Button.B, function () {
    kitronik_robotics_board.servoWrite(kitronik_robotics_board.Servos.Servo1, 180)
    kitronik_robotics_board.servoWrite(kitronik_robotics_board.Servos.Servo2, 45)
})
Use code with caution.
(You can also control the gripper by attaching the claw to Servo3 and setting the angle to \(180\) for closed or \(0\) for open.) [1, 2]
4. Code Explanation
  • input.onButtonPressed: These blocks wait for you to physically press the buttons on the front of the micro:bit.
  • kitronik_robotics_board.servoWrite: This block sends a signal to a specific servo port to rotate to an exact angle, from \(0\) to \(180\) degrees. Think of it like turning a dial to a specific number. [1, 2, 3, 4, 5]
If you want to move the arm more smoothly, I can show you how to:
  • Use a second micro:bit as a remote control.
  • Create looping variables so the arm moves gradually instead of snapping immediately to an angle.
Tell me what type of controller you want to use (joysticks, buttons, or a smartphone


To control a robotic arm, you will need a BBC micro:bit attached to a Kitronik Robotics Board to move motors and servos. [1, 2]
Here is how to set up and program a 3-joint robotic arm using block code in the Microsoft MakeCode Editor:
1. Add the Robotics Extension
Open your project in MakeCode and load the required extension for your hardware: [1]
  • Click on the gear icon (Settings) or scroll to Advanced in the block menu.
  • Click on Extensions.
  • Search for "Kitronik Robotics" and select the Kitronik Robotics Board extension.
  • This adds a new Robotics menu with custom servo blocks. [1, 2]
2. Physical Setup
Plug servos into the servo headers on the board. For a standard 3-joint robotic arm, use these channels: [1, 2]
  • Servo 1 (Base): Controls the rotation left or right.
  • Servo 2 (Shoulder): Controls the arm moving up or down.
  • Servo 3 (Claw/Gripper): Controls opening and closing. [1, 2, 3, 4, 5]
3. Example MakeCode Program
This code opens and closes the claw when you press buttons A and B on your micro:bit, and moves the base and shoulder.
blocks
input.onButtonPressed(Button.A, function () {
    kitronik_robotics_board.servoWrite(kitronik_robotics_board.Servos.Servo1, 0)
    kitronik_robotics_board.servoWrite(kitronik_robotics_board.Servos.Servo2, 90)
})
input.onButtonPressed(Button.B, function () {
    kitronik_robotics_board.servoWrite(kitronik_robotics_board.Servos.Servo1, 180)
    kitronik_robotics_board.servoWrite(kitronik_robotics_board.Servos.Servo2, 45)
})
Use code with caution.
(You can also control the gripper by attaching the claw to Servo3 and setting the angle to \(180\) for closed or \(0\) for open.) [1, 2]
4. Code Explanation
  • input.onButtonPressed: These blocks wait for you to physically press the buttons on the front of the micro:bit.
  • kitronik_robotics_board.servoWrite: This block sends a signal to a specific servo port to rotate to an exact angle, from \(0\) to \(180\) degrees. Think of it like turning a dial to a specific number. [1, 2, 3, 4, 5]
If you want to move the arm more smoothly, I can show you how to:
  • Use a second micro:bit as a remote control.
  • Create looping variables so the arm moves gradually instead of snapping immediately to an angle.
Tell me what type of controller you want to use (joysticks, buttons, or a smartphone)

With the Kitronik Compact Robotics Board, the BBC micro:bit can be used to drive 4 motors (or 2 stepper motors) and 8 servos. Coupled with 17 other I/O expansion points, this means the BBC micro:bit can very easily become the core of a whole variety of robotics projects. The board is small on footprint but big on features and connectivity.

The Robotics Board features 2 Dual H Bridge Motor Driver ICs (capable of driving 2 standard motors or 1 stepper motor each) and 8 servo outputs (capable of driving standard and continuous rotation servos), all controlled from the BBC micro:bit using the I2C protocol via a 16 channel driver IC. Our custom MakeCode blocks make using I2C easy, even for novice users.

The Link header breaks out all the usable pins from the BBC micro:bit, and is designed to allow 2.54mm pitch pin header to be easily soldered into place. The 17 available I/O pins allow other input devices, for example, sensors, or output devices, such as ZIP LEDs, to be added to the board. The I2C communication lines are also broken out (Pins 19 & 20), which means other I2C compatible devices can also be added to the board and controlled by the BBC micro:bit.

Power is provided via either a terminal block or servo style connector. The supply is then controlled by an on/off power switch to the board. There is also a green LED to indicate when the board is turned on. The board then produces a regulated 3.3V supply which is fed into the 3V and GND connections to power the connected BBC micro:bit. This removes the need to power the BBC micro:bit separately. The 3V and GND pins are also broken out on the Link header, which means external devices can also be powered.

To use the compact robotics board, the BBC micro:bit should be inserted firmly into the edge connector, with the LEDs and buttons visible from the front.

Kitronik has produced a set of custom blocks for the MakeCode editor to simplify using the Compact Robotics Board for BBC micro:bit. To add them to the editor, select the cog icon in the top right of the editor. Then, select Extensions from the drop-down menu and in the search bar type and enter Kitronik. Pick the Kitronik robotics Board from the list and the new blocks will be added to the menu in the editor.

Suggested Using Linear Actuator:
Robo-trash in Newton(Hydraulic):




No comments:

Post a Comment