一区二区三区三上|欧美在线视频五区|国产午夜无码在线观看视频|亚洲国产裸体网站|无码成年人影视|亚洲AV亚洲AV|成人开心激情五月|欧美性爱内射视频|超碰人人干人人上|一区二区无码三区亚洲人区久久精品

0
  • 聊天消息
  • 系統(tǒng)消息
  • 評(píng)論與回復(fù)
登錄后你可以
  • 下載海量資料
  • 學(xué)習(xí)在線課程
  • 觀看技術(shù)視頻
  • 寫文章/發(fā)帖/加入社區(qū)
會(huì)員中心
創(chuàng)作中心

完善資料讓更多小伙伴認(rèn)識(shí)你,還能領(lǐng)取20積分哦,立即完善>

3天內(nèi)不再提示

使用Arduino測(cè)量舵機(jī)扭矩的過程分享

科技觀察員 ? 來源:八色木 ? 作者:八色木 ? 2022-04-08 15:40 ? 次閱讀
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

在日常生活中,我們經(jīng)常會(huì)看到一些產(chǎn)品的技術(shù)參數(shù),這些參數(shù)與實(shí)際使用數(shù)據(jù)都會(huì)存在一些差距,但它也是用戶選擇產(chǎn)品的重要參考。比如智能手機(jī)制造商會(huì)宣稱他們的電池使用壽命如何長(zhǎng),科技公司會(huì)宣稱他們的科技產(chǎn)品是最具科技含量,而汽車公司則吹噓自己汽車的燃油經(jīng)濟(jì)性如何好,其實(shí)這些數(shù)據(jù)有相當(dāng)部分是存在虛標(biāo)的。

我們經(jīng)常使用的舵機(jī)也不例外,舵機(jī)制造商也會(huì)對(duì)他們生產(chǎn)的舵機(jī)給出各種各樣的技術(shù)參數(shù),其中諸如電機(jī)能夠產(chǎn)生的扭矩等。如下圖,HS-422舵機(jī)的技術(shù)參數(shù)

poYBAGJP5qqAb2PZAABmRUiDSgA195.png

在這個(gè)項(xiàng)目中,我們將建立一個(gè)測(cè)量舵機(jī)扭矩范圍的工具,目的是驗(yàn)證舵機(jī)實(shí)際產(chǎn)生的扭矩與技術(shù)參數(shù)中所標(biāo)稱的扭矩是否相符。整個(gè)實(shí)驗(yàn)會(huì)用到一個(gè)測(cè)力量的部件,一個(gè)Arduino Uno,一個(gè)3D打印的舵機(jī)框架,和其他一些部件,然后測(cè)量舵機(jī)實(shí)際產(chǎn)生的扭矩。

實(shí)驗(yàn)器件清單

Arduino Uno

20kg測(cè)壓桿

HX711稱重傳感器模塊

面包板電源

面包板

跳線

M4×6mm螺絲

M4嵌入式螺母

如何測(cè)量舵機(jī)的扭矩

pYYBAGJP5qaAUr-aAAIQ6M-Xdyc501.png

力矩是通過力與距離的乘積來計(jì)算得出的。在這個(gè)項(xiàng)目中,要獲得舵機(jī)的力會(huì)有些困難,因此,需要使用一個(gè)負(fù)載單元。在設(shè)計(jì)和使用測(cè)壓元件時(shí)會(huì)涉及到許多復(fù)雜的細(xì)節(jié),但在本項(xiàng)目中,測(cè)壓元件是一種傳感器,它允許計(jì)算機(jī)將微小的電壓變化轉(zhuǎn)化為力的形式呈現(xiàn)出來。使用測(cè)力元件,我們就能夠測(cè)量舵機(jī)的旋轉(zhuǎn)軸和舵機(jī)臂之間的精確距離。

poYBAGJP5qCAXo6uAAZ7sC-nBPs897.png

當(dāng)舵機(jī)開始旋轉(zhuǎn)時(shí),它就會(huì)對(duì)測(cè)壓元件產(chǎn)生推力,結(jié)合測(cè)壓元件受到的測(cè)力以及旋轉(zhuǎn)軸和伺服臂的距離,就可以計(jì)算出由測(cè)力元件傳遞的扭矩。

構(gòu)建測(cè)試工具

測(cè)試工具的機(jī)械結(jié)構(gòu)比較簡(jiǎn)單,它由兩個(gè)3D打印零件和幾個(gè)緊固件組成。你可以下載本文附帶的3D打印部件的設(shè)計(jì)文件(提取碼:9t4e)。

poYBAGJP5pyAcUwiAACkB1g0SZc550.png

3D打印件沒有特殊的要求,所以使用任何材料打印都可以。

裝配測(cè)試工具

裝配舵機(jī)扭矩測(cè)量工具的第一步是安裝嵌入式螺母,嵌入式螺母可以使安裝更安全,不會(huì)損壞3D打印框架。安裝螺母時(shí),可以輕輕將其按下插入塑料孔后,使用烙鐵對(duì)其加熱,當(dāng)你移開烙鐵后,熔化的塑料會(huì)在鑲件周圍凝固,形成非常牢固的連接,這樣就可以完成安裝了。

pYYBAGJP5piAOQwiAAQJ-25Ki2E959.png

接下來,安裝測(cè)壓元件,其一側(cè)有一個(gè)綠色箭頭。將測(cè)壓元件朝上,箭頭指向遠(yuǎn)離舵機(jī)的方向,然后將測(cè)壓元件插入旁邊的正方形中。測(cè)壓元件應(yīng)該保持穩(wěn)固,確保安裝過程中沒有搖晃的空隙。

pYYBAGJP5pSADlMEAATbd_56GYg344.png

然后,在面包板背面貼一塊雙面膠,把它粘在3D打印的框架上。

pYYBAGJP5pCAcqZ8AAa9KhA5JIE040.png

完成了框架搭建,余下的就是電路的搭建了,請(qǐng)看下面的電路圖。

poYBAGJP5ouAA7QYAAHEzccZcrc499.png

電源連接:

Arduino GND -》 面包板 GND

HX711 GND -》 面包板 GND

舵機(jī) 黑線 -》 Arduino GND

Arduino Vin -》 面包板 VCC

HX711 VCC -》 面包板 VCC

舵機(jī) 紅線 -》 Arduino 5V

信號(hào)連接:

舵機(jī) 黃線 -》 Arduino D9

HX711 DT針 -》 Arduino D3

HX711 SCK針 -》 Arduino D2

測(cè)壓元件連接:

測(cè)壓元件紅線 -》 HX711 E+針

測(cè)壓元件黑線 -》 HX711 E-針

測(cè)壓元件綠線 -》 HX711 A-針

測(cè)壓元件白線 -》 HX711 A+針

完成組裝的成品圖

poYBAGJP5oaAG0pAAActMmFeAMo903.png

/*

Project: Measuring Servo Torque

Author: Toglefritz

This project involves a simple device used to measure the torque output of a hobby-scale servo. The device consists of a 3D printed frame that will hold a servo and a load cell. The servo rotates a horn into the load cell, producing a reading from the load cell. From the known distance between the servo's center of rotation and the load cell, the servo's torque can be calculated from the force on the load cell.

Complete documentation for the project can be found on Maker Pro.

*/

// Include libraries for interfacing with the HX711 and the servo

#include "HX711.h"

#include

// Configuration

#define calibration_factor -7050.0 // This value is obtained using the HX711_Calibration sketch

int trialRuns = 5; // This defines the number of times to measure the servo's force on the

// load cell. These measurments will be averaged to come up with a single reading.

float armLength = 2.75; // This is the distance (in cm) between the servo's center of rotation and the load cell.

// This is based on the mechanical design of the test fixture.

// Define connections between the HX711 and the Arduino

#define DT 3 // The HX711 DT pin connects to D3 on the Arduino

#define SCK 2 // The HX711 SCK pin connects to D2 on the Arduino

// Initialize the HX711

HX711 loadCell(DT, SCK);

// Create a servo object

Servo testServo;

void setup() {

// Begin Serial communication

Serial.begin(9600);

Serial.println(" - Torque Measurement Tool - "); // Print a heading

Serial.println();

// Set the pin used to control the servo

testServo.attach(9);

loadCell.set_scale(calibration_factor); // This value is obtained by using the HX711_Calibration sketch

loadCell.tare(); // Reset the scale to zero to compensate for any existing load

// To begin the test, the servo horn should be attached so that it is making contact with

// the load cell at an angle of 140 degrees on the servo

testServo.write(140); // Move the servo into the load cell

Serial.println("Initialization complete.");

Serial.println("Send 's' to begin testing. Send 'h' for help.");

Serial.println();

}

void loop() {

// If the user sends 's' over Serial, begin testing the torque

if(Serial.read() == 's' || Serial.read() == 'S') {

measureTorque();

}

// If the user sends 'i' over Serial, show some instructions

if(Serial.read() == 'h' || Serial.read() == 'h') {

Serial.println("Right now, the Arduino has moved the servo into its starting position.");

Serial.println("In the servo's current position, install the horn so that it is just touching the load cell.");

Serial.println("When you are ready, send 's' over Serial and the Arduino will begin testing the servo's torque.");

Serial.println("You will see the Arduino move the servo into the load cell five different times.");

Serial.println("Each time the servo hits the load cell, the Arduino will take a reading.");

Serial.println("Those readings will be averaged to calculate the torque delivered by the servo.");

Serial.println("Keep an eye on the Serial monitor to see the results.");

Serial.println();

Serial.println("Send 's' to begin testing.");

Serial.println();

}

}

void measureTorque() {

/*

To test the servo's torque, the Arduino will move the servo arm so that it presses on the load

cell. The resulting force will produce a reading from the load cell. The Arduino will take

five readings to compute an average force value. Because the distance between the servo's

center of rotation and the load cell is known from the frame design, the Arduino

can calculate the torque produced by the servo.

*/

Serial.println("Individual Readings: ");

float individualReadings[trialRuns]; // This array will store the load cell readings for the five tests

for(int i = 0; i < 5; i++) {

testServo.write(180); // Move the servo away from the load cell

delay(1000); // Wait for the servo to move

loadCell.tare(); // Reset the scale to zero to compensate for any existing load

testServo.write(130); // Move the servo into the load cell. A 130 degree angle is actually inside the load

// cell, so the servo will be pushing towards that position, exerting force on

// the load cell.

delay(1000); // Wait for the servo to move

individualReadings[i] = loadCell.get_units(); // Take a measurment from the load cell

Serial.print(individualReadings[i]); // Print the measurment over Serial

Serial.print(" ");

}

// Now that we have five individual readings, average them to get one average load reading

float readingsSum = 0; // Create a variable to store the sum of all readings

// Loop through the array and add together all the readings

for(int y = 0; y < trialRuns; y++) {

readingsSum = readingsSum + individualReadings[y];

}

float averageReading = readingsSum / trialRuns; // Divide by the numer of readings to get the average

Serial.println();

Serial.println();

Serial.println("Average Reading:"); // Print the average reading over Serial

Serial.println(averageReading);

// From the average reading, calculate the torque delivered by the servo

// using the formula T = F * r where T is the torque, F is the load cell

// reading (a force), and r is the radius of rotation (the distance between

// the servo and the load cell).

// The units for the torque will be kg*cm

float servoTorque = averageReading * armLength; // Calculate the torque

Serial.println();

Serial.println("Torque:"); // Print the torque

Serial.print(servoTorque);

Serial.println(" kgcm");

testServo.write(180); // Move the servo away from the load cell after the testing is complete

}

系統(tǒng)啟動(dòng)后,將會(huì)打開一個(gè)串口監(jiān)視器,當(dāng)我們準(zhǔn)備開始測(cè)量時(shí),系統(tǒng)將提示你通過串口發(fā)送“s”開始。

pYYBAGJP5oKAfsmWAAFIfyiW8l0730.png

Arduino將測(cè)量這個(gè)舵機(jī)產(chǎn)生的力,并將它轉(zhuǎn)換成扭矩,最后將結(jié)果發(fā)送給串口監(jiān)視器上。

poYBAGJP5n6Ace99AAHBjZ_wiNc808.png

聲明:本文內(nèi)容及配圖由入駐作者撰寫或者入駐合作網(wǎng)站授權(quán)轉(zhuǎn)載。文章觀點(diǎn)僅代表作者本人,不代表電子發(fā)燒友網(wǎng)立場(chǎng)。文章及其配圖僅供工程師學(xué)習(xí)之用,如有內(nèi)容侵權(quán)或者其他違規(guī)問題,請(qǐng)聯(lián)系本站處理。 舉報(bào)投訴
  • Arduino
    +關(guān)注

    關(guān)注

    189

    文章

    6495

    瀏覽量

    190489
收藏 人收藏
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

    評(píng)論

    相關(guān)推薦
    熱點(diǎn)推薦

    數(shù)字舵機(jī)扭矩消失時(shí),該怎么操作

    數(shù)字舵機(jī)扭矩消失時(shí),該怎么操作
    發(fā)表于 01-28 20:55

    數(shù)字舵機(jī)扭矩消失時(shí),該怎么操作

    數(shù)字舵機(jī)扭矩消失時(shí),該怎么操作
    發(fā)表于 01-28 21:03

    數(shù)字舵機(jī)扭矩消失時(shí),該怎么操作

    數(shù)字舵機(jī)扭矩消失時(shí),該怎么操作
    發(fā)表于 01-28 21:06

    為何電機(jī)扭矩測(cè)量結(jié)果和傳感器精度對(duì)不上?

    扭矩環(huán)),負(fù)載電機(jī)工作在扭矩環(huán)(或速度環(huán)),扭矩傳感器測(cè)量扭矩大小并將扭矩值通過信號(hào)傳送給
    發(fā)表于 07-06 15:12

    扭矩舵機(jī)怎么才能讓它停下來

    我在店里買了一個(gè)360度的大扭矩舵機(jī),給它一個(gè)Write(0),它就一直轉(zhuǎn),怎么才能讓它停下來啊
    發(fā)表于 05-27 05:55

    Arduino如何利用紅外感應(yīng)控制舵機(jī)

    實(shí)現(xiàn)功能:當(dāng)紅外感應(yīng)到人時(shí),控制舵機(jī)轉(zhuǎn)動(dòng)180度參考:基于Arduino的多種方式控制舵機(jī)舵機(jī)、電位器、藍(lán)牙).硬件連接:舵機(jī)連接:Ard
    發(fā)表于 06-28 11:17

    機(jī)器人舵機(jī)調(diào)試系統(tǒng)

    控制或者輸出較高的扭矩;舵機(jī)也叫也叫 RC 伺服器,通常用于機(jī)器人項(xiàng)目,也可以在遙控汽車,飛機(jī)等航模中找到它們。類似舵機(jī)這樣的伺服系統(tǒng)通常由小型電動(dòng)機(jī),電位計(jì),嵌入式控制系統(tǒng)和變速箱組成。電機(jī)輸出軸
    發(fā)表于 07-12 08:43

    arduino如何驅(qū)動(dòng)ST90S微型舵機(jī)

    舵機(jī)來帶動(dòng)撥片撥取貨物了,本博客就介紹arduino如何驅(qū)動(dòng)ST90S微型舵機(jī)以及分享在驅(qū)動(dòng)過程中所遇到的問題以及解決方法效果展示舵機(jī)/撥片
    發(fā)表于 09-10 06:39

    Arduino調(diào)試舵機(jī)的方法步驟

    Arduino調(diào)試舵機(jī)的方法步驟
    發(fā)表于 01-18 07:54

    arduino如何控制舵機(jī)?

    arduino如何控制舵機(jī)?
    發(fā)表于 01-19 06:04

    扭矩測(cè)量

    扭矩測(cè)量 扭矩由力和力臂的乘積來定義,單位是Nm。
    發(fā)表于 01-07 12:52 ?3936次閱讀
    <b class='flag-5'>扭矩</b><b class='flag-5'>測(cè)量</b>

    盤點(diǎn)電機(jī)扭矩測(cè)量方法有哪些

    能量轉(zhuǎn)換法是指根據(jù)能量守恒定律通過測(cè)量熱能、電能等其它參數(shù)來間接測(cè)量扭矩,目前銀河電氣推出的TN4000電子式扭矩儀就是該原理測(cè)量電機(jī)
    發(fā)表于 11-08 16:41 ?1.4w次閱讀
    盤點(diǎn)電機(jī)<b class='flag-5'>扭矩</b>的<b class='flag-5'>測(cè)量</b>方法有哪些

    arduino如何控制舵機(jī)及詳細(xì)步驟

    本文首先介紹了舵機(jī)的控制方法,其次闡述了Arduino控制舵機(jī)的兩種方法,最后詳細(xì)闡述了arduino控制舵機(jī)的詳細(xì)步驟。
    的頭像 發(fā)表于 05-11 14:28 ?16.8w次閱讀
    <b class='flag-5'>arduino</b>如何控制<b class='flag-5'>舵機(jī)</b>及詳細(xì)步驟

    Arduino UNO驅(qū)動(dòng)數(shù)字舵機(jī)

    Arduino UNO驅(qū)動(dòng)數(shù)字舵機(jī)舵機(jī)數(shù)字舵機(jī)工作原理數(shù)字舵機(jī)與模擬舵機(jī)區(qū)別EMAX ES08M
    發(fā)表于 11-30 12:06 ?15次下載
    <b class='flag-5'>Arduino</b> UNO驅(qū)動(dòng)數(shù)字<b class='flag-5'>舵機(jī)</b>

    通過Arduino控制舵機(jī)

    本文主要介紹通過Arduino控制舵機(jī),步進(jìn)電機(jī)以及循環(huán)的使用。對(duì)于Arduino控制舵機(jī)的方法是通過其輸出PWM信號(hào)來實(shí)現(xiàn)控制的。這里所謂的PWM信號(hào)其本質(zhì)上就是脈沖信號(hào)。而對(duì)于步進(jìn)
    發(fā)表于 03-23 13:52 ?1次下載
    通過<b class='flag-5'>Arduino</b>控制<b class='flag-5'>舵機(jī)</b>