Cov txheej txheem:

Yuav Ua Li Cas Ua Kom Yooj Yim Wearable Pulse Notifier: 5 Kauj Ruam
Yuav Ua Li Cas Ua Kom Yooj Yim Wearable Pulse Notifier: 5 Kauj Ruam

Video: Yuav Ua Li Cas Ua Kom Yooj Yim Wearable Pulse Notifier: 5 Kauj Ruam

Video: Yuav Ua Li Cas Ua Kom Yooj Yim Wearable Pulse Notifier: 5 Kauj Ruam
Video: Иов Медан: Ультразвуковая хирургия - безоперационное лечение 2024, Kaum ib hlis
Anonim
Yuav Ua Li Cas Ua Kom Yooj Yim Wearable Pulse Notifier
Yuav Ua Li Cas Ua Kom Yooj Yim Wearable Pulse Notifier

Pulseme yog cov cuab yeej siv tau uas pab tib neeg paub thaum lawv lub plawv dhia siab dua qhov teeb tsa, los ntawm kev muab lawv lub cev tawm tswv yim hauv daim ntawv ntawm kev txo qis thiab hnav tsis tau.

Kauj ruam 1: Kev piav qhia

Image
Image

Lub hauv paus tseem ceeb ntawm qhov hnav no yog cov ntaub plaub, uas yog kov tas li nrog cov neeg siv caj npab, thiab thaum txo qis, ua rau muaj kev xav zoo. Sib nrug ntawm qhov no, muaj Arduino-tswj cov txheej txheem uas yog tus saib xyuas kev txav ntawm cov ntaub, ntxiv rau lub ntsuas pa.

Kauj ruam 2: Cov ntaub ntawv

Schematic
Schematic

Tshwj xeeb tshaj yog, cov ntu uas xav tau txhawm rau txhawm rau tsim qhov kev ceeb toom lub cev mem tes sensor yog cov hauv qab no:

  • Arduino Ib
  • Pulse Sensor
  • 2 x Kev sib hloov txuas ntxiv mus Servos (DS04-NFC)
  • 2 x Springs
  • Hlua tes
  • Npuag
  • Xov
  • Roj teeb

Kauj ruam 3: Schematic

Muaj ob txoj hauv kev yooj yim koom nrog los tsim cov khoom siv hluav taws xob ntawm qhov hnav no.

Sensor Circuit:

  • Sensor tus pin 1 rau Arduino A0
  • Sensor tus pin 2 rau +5V
  • Sensor tus pin 3 rau GND

Servo Circuit: Cov

  • Servo1 tus pin rau Arduino tus pin 8
  • Servo2 tus pin rau Arduino tus pin 9

Thaum kawg, txuas rau +5V thiab GND rau lawv cov davhlau ya nyob twg ntawm Arduino board.

Kauj Ruam 4: Tau Txais Cov Khoom Ua Ke

Tau Txais Cov Khoom Ua Ke
Tau Txais Cov Khoom Ua Ke

Cov kauj ruam uas yuav tsum tau ua txhawm rau txhawm rau sib dhos cov khaub ncaws no yog cov hauv qab no:

  1. Ntsuas txoj kab uas hla ntawm tus neeg nruab nrab caj npab, txhawm rau xaws cov ntaub nyob ntawm qhov zoo/qhov loj me.
  2. Yuav lossis 3D luam ib txoj hlua tes kom tsim nyog los ua haujlwm hauv paus rau txhua yam khoom siv hluav taws xob/tshuab.
  3. Xaws cov springs rau ntawm daim ntaub, ntawm ob sab.
  4. Kaw ob lub servos ntawm txoj hlua tes.
  5. Txuas cov springs thiab servos, siv xov.
  6. Kho qhov chaws kom haum rau koj nyiam thiab/lossis qhov loj ntawm koj daim ntaub.
  7. Txaus siab rau!

Kauj Ruam 5: Teeb Arduino & Code

Txuas Arduino rau lub khoos phis tawj thiab ua kom nws ua haujlwm tau zoo ua ntej. Qhov no yog qhov yooj yim ua. Tom qab ntawd, teeb tsa lub arduino kom nyeem cov mem tes thiab tsav cov servos thaum tus nqi mem tes dhau ntawm qhov ib txwm muaj. Yeej, peb kuj yuav tsum tau hloov kho qhov zaus uas nws nyeem tus nqi nkag mus kom tau txais cov cai hauv qab no: ncua (9000) yog suav tias yog qhov kev coj ua zoo tshaj plaws hauv kev kos yooj yim. Cov cai yog cov hauv qab no:

Servo myservo1; Servo myservo2; koj pos; // Variables const int PulseWire = 0; // PulseSensor PURPLE WIRE txuas nrog ANALOG PIN 0 const int LED13 = 13; // Lub on-board Arduino LED, ze rau tus PIN 13. // int Threshold = 550; // Txiav txim siab Qhov Teeb Meem twg rau "suav raws li kev ntaus" thiab uas yuav tsis quav ntsej. // Siv qhov "Gettting Started Project" txhawm rau kho kom raug tus nqi Threshold dhau qhov teeb tsa ua ntej. // Txwv tsis pub tawm lub neej ntawd "550" tus nqi. PulseSensorPlayground mem tesSensor; // Tsim ib qho piv txwv ntawm PulseSensorPlayground cov khoom hu ua "pulseSensor" tsis muaj teeb meem teeb tsa () {Serial.begin (9600); // Rau Serial Monitor

// Kho cov khoom PulseSensor, los ntawm kev muab peb cov kev hloov pauv rau nws. pulseSensor.analogInput (PulseWire); mem tesSensor.blinkOnPulse (LED13); // pib-magically ntsais Arduino's LED nrog lub plawv dhia. // pulseSensor.setThreshold (Threshold); // Ob-khij qhov khoom "pulseSensor" thiab "pib" pom lub teeb liab. yog (pulseSensor.begin ()) {Serial.println ("Peb tau tsim lub hom phiaj pulseSensor!"); // Qhov no luam tawm ib zaug ntawm Arduino fais fab tuag, lossis ntawm Arduino rov pib dua. }} void loop () {int myBPM = pulseSensor.getBeatsPerMinute (); // Hu ua haujlwm ntawm peb cov khoom pulseSensor uas xa rov qab BPM raws li "int". // "myBPM" tuav tus nqi BPM tam sim no. //myservo1.attach (9); // yog (pulseSensor.sawStartOfBeat ()) {// Kev sim tas li kom pom tias "kev ntaus yeej tshwm sim". Serial.println ("Heart Lub plawv dhia tau tshwm sim!"); // Yog tias qhov kev xeem yog "muaj tseeb", luam cov lus "lub plawv dhia tshwm sim". Serial.print ("BPM:"); // Luam kab lus "BPM:" Serial.println (myBPM); // Luam tus nqi sab hauv ntawm myBPM. yog (myBPM> = 65) {// Kuaj tas li kom pom tias "kev ntaus yeej tshwm sim".

myservo1.attach (9); myservo2.attach (8); myservo1.writeMicroseconds (2000); // CW myservo2.writeMicroseconds (2000); ncua (4000); myservo1.writeMicroseconds (1000); // CCW myservo2.writeMicroseconds (1000); ncua (4000); myservo1.writeMicroseconds (1500); // nres myservo2.writeMicroseconds (1500); ncua (500); } //} ncua (9000); // txiav txim siab ua qhov zoo tshaj plaws hauv daim duab yooj yim. } Khiav Txoj Cai Tam Sim No, koj tsuas yog txheeb xyuas qhov kos duab, ntsaws USB, thiab rub tawm. Koj yuav pom.

Pom zoo: