Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

infrared to measure vertical jump

Status
Not open for further replies.

Abderrahim Milano

Newbie level 5
Newbie level 5
Joined
Apr 7, 2014
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
85
I will provide a system for measuring vertical jump I chose infrared sensor (5). I utlise for time measurement with a microcontroller the athlete is cutting the infraouge 0v so that it jumps the singal passe to 5 volt and microcontrollers measuring time in flight
i use pic 16f877a howe i programmate the timer1 and the ccp to capture the singal
note ir how mesure the time
the microncontroller measure time with timer
when the signal output from ir reciver is 0v there is an obstacle
and when the athlete jump the singnal is 5 v no obstacle , microcontroller measure the time of singal when he is in 5v
and when i have time a will aplly in this fourmle mathematique h = g*t^2/8
 
Last edited:

I am confused..........

you want to measure 'vertical jump', which I assume means distance, but you don't say whether it is a distance
at a fixed point, or ................whatever

you will use an IR sensor - is there a IR source? the source is the athlete?

and you will measure time? does time equate to distance?
 

It may be easier if you use visible light (narrow-beam led). Since you can see the beam hitting your detector, you'll have an easier time positioning your components.

On the other hand, you may find IR provides a more powerful beam, and makes detection more reliable.
 

I am confused..........

you want to measure 'vertical jump', which I assume means distance, but you don't say whether it is a distance
at a fixed point, or ................whatever

you will use an IR sensor - is there a IR source? the source is the athlete?

and you will measure time? does time equate to distance?

note ir how mesure the time
the microncontroller measure time with timer
when the signal output from ir reciver is 0v there is an obstacle
and when the athlete jump the singnal is 5 v and microcontroller measure the time of singal when he is in 5v
and when i have time a will aplly in this fourmle mathematique h = g*t^2/8
 

It will be very difficult (perhaps impossible) to ensure:

* that some part of the athlete's body will block the light beam at every jump,

* that it will block the beam once as the athlete ascends, and once as he descends.

* that the same part of the body will block the beam, and not two different parts of the body.

Your calculations may need to handle the case where the athlete blocks the beam for a solid time interval. I'm not sure whether this is possible.
 

images.jpg is like this my systeme
It will be very difficult (perhaps impossible) to ensure:

* that some part of the athlete's body will block the light beam at every jump,

* that it will block the beam once as the athlete ascends, and once as he descends.

* that the same part of the body will block the beam, and not two different parts of the body.

Your calculations may need to handle the case where the athlete blocks the beam for a solid time interval. I'm not sure whether this is possible.
 


YES IT LIKE THIS
I FOUND A programme but he not use the pic hi used arduino
kan you help to transfere this programme to use in pic
Code:
5.4 Code source du prototype avec laser
#include <LCD4Bit_mod.h>
LCD4Bit_mod lcd = LCD4Bit_mod(2);
int Signal1 = 2, Signal2 = 3;
int STATE, PreSTATE;
const int NUM_KEYS = 5;
const int adc_key_val[NUM_KEYS] ={30, 150, 360, 535, 760 };
int key = -1, oldkey = -1;
boolean en_position = false, lasers_detectes = false, lasers_non_detectes = false, fin_affichage = false;
char buf1[50], buf2[50];
unsigned long depart, fin, hauteur;
void setup()
{
pinMode(Signal1, INPUT);
pinMode(Signal2, INPUT);
pinMode(11,INPUT);
lcd.init();
lcd.clear();
STATE = 0; // 0 : mise en position; 1: attend le saut; 2 :le saut; 3 : atterrissage; 4 : calcul et affichage;
PreSTATE = 5; // un état avant l'état
}
void loop()
{
//---Condition---
switch( STATE )
{
case 0:
case 5:
//touche pressé
if( key_detector() ) en_position = true;
else en_position = false;
break;
case 1:
//au moins un laser présent
if( digitalRead(Signal1)==LOW || digitalRead(Signal2)==LOW ) lasers_detectes = true;
else lasers_detectes = false;
break;
case 3:
//aucun laser présent
if( digitalRead(Signal1)==HIGH && digitalRead(Signal2)==HIGH ) lasers_non_detectes = true;
else lasers_non_detectes = false;
break;
// case 5:
// if( digitalRead(11) == HIGH ) fin_affichage = true;
// else fin_affichage = false;
default:
break;
}
//---Transition---
switch( STATE )
{
case 0:
if( en_position )
{
STATE=1;
en_position = false;
oldkey = -1;
}
break;
case 1:
Page 45
if( lasers_detectes )
{
STATE=2;
lasers_detectes = false;
}
break;
case 2:
STATE=3;
break;
case 3:
if( lasers_non_detectes )
{
STATE=4;
lasers_non_detectes = false;
}
break;
case 4:
STATE=5;
break;
case 5:
if( en_position )
{
STATE=0;
en_position = false;
oldkey = -1;
}
break;
default:
STATE=0;
break;
}
//---Action---
switch( STATE )
{
case 0:
hauteur=fin=depart=0;
//affichage
sprintf(buf1, "En position!");
sprintf(buf2, " ");
affiche_STATE();
break;
case 1:
sprintf(buf1, "Sautez!");
sprintf(buf2, " ");
affiche_STATE();
break;
case 2:
//prend la valeur de départ
depart = micros();
break;
case 4:
if(fin==0)
{
//prend la valeur finale
fin = micros();
//calcul
if( fin>depart ) hauteur = Calcul_de_Hauteur( fin-depart );
else hauteur = Calcul_de_Hauteur ( 0xFFFFFFFF-depart+fin );
//affichage
// sprintf(buf1, "Distance:");
// sprintf(buf2, "%lu mm", hauteur);
Page 46
// sprintf(buf1, "Temps de vol:");
// sprintf(buf2, "%lu us", fin-depart);
sprintf(buf1, "%lu mm", hauteur);
sprintf(buf2, "%lu us", fin-depart);
affiche_STATE();
}
break;
default:
break;
}
}
unsigned long Calcul_de_Hauteur(unsigned long temps)
{
unsigned long hauteur;
hauteur = temps/1000;
hauteur *= hauteur;
hauteur /= 8;
hauteur *= 981;
hauteur /= 100000;
return hauteur;
}
void affiche_STATE(void)
{
char test;
if(PreSTATE!=STATE)
{
lcd.clear();
lcd.cursorTo(1, 0);
lcd.printIn(buf1);
lcd.cursorTo(2, 0);
lcd.printIn(buf2);
PreSTATE=STATE;
}
}
int get_key(unsigned int input)
{
int k;
for (k = 0; k < NUM_KEYS; k++)
{
if (input < adc_key_val[k])
{
return k;
}
}
if (k >= NUM_KEYS)
k = -1; // No valid key pressed
return k;
}
boolean key_detector()
{
int adc_key_in = analogRead(0); // read the value from the sensor
key = get_key(adc_key_in); // convert into key press
if (key != oldkey) // if keypress is detected
{
delay(50); // wait for debounce time
adc_key_in = analogRead(0); // read the value from the sensor
key = get_key(adc_key_in); // convert into key press
if (key != oldkey)
Page 47
{
oldkey = key;
return true;
}
}
return false;
}
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top