Matattarar ƙarancin izinin wucewa: duk abin da kuke buƙatar sani game da wannan da'irar

low pass tace da'ira

Coils da op amps suna baka damar ƙirƙirar da'irori masu ban sha'awa, kamar sanannen mitoci masu yawa. Waɗannan matatun suna da aikace-aikace da yawa a masana'antar lantarki. Kamar yadda lamarin yake game da matattarar ƙaramar hanya, babban matatar wucewa, da dai sauransu. Suna da ban sha'awa musamman ga wasu aikace-aikacen sauti, da ikon tace sautuna, ko fiye ko soundsasa da sauti bisa ga yawan su. Saboda haka, suna da matukar amfani.

Idan kana son ƙarin sani game da low pass tace, da sauran matatun, da kuma yadda zasu taimake ku a ayyukanku tare da Arduino ko DIY, Ina ƙarfafa ku da ku ci gaba da karatu ...

Matatun lantarki

Kamar yadda sunan ta ya nuna, matattara ita ce da'irar da ta kunshi jerin kebul da masu amfani da wuta, har ma da wasu kayan kara aiki, da manufar barin wasu sassa kawai na mitar wucewa. Wato, daga dukkan nau'ikan mitar da ake dasu, zasu tace ɗaya ko fiye da sassa don hana su wucewa.

Idan don amfani Muna magana ne game da yanayin da ɗan adam ke ji, wanda ya fara daga 20 Hz zuwa 20 Khz, tare da masu tacewa zaku iya kawar da mafi ƙanƙanci, ko mafi girma, don kawai ba da damar ƙararraki / bass da yawa ko ƙasa su wuce. Wani abu ne wanda yawancin rikodin sauti ko tsarin haifuwa suke amfani dashi, kamar makirufo, lasifika, da dai sauransu.

Iri

A cewar nau'in tace, ko kuma, maimakon, dangane da mitar da suka toshe ko wacce suka bari ta ciki, akwai wasu da'irori daban-daban wadanda sune:

  • Tace marar izinin wucewa: ana kiransu saboda sune waɗannan matattara waɗanda ke barin ƙananan mitoci su wuce su danne ko rage wucewar manyan mitocin. Sun kunshi dunkule guda daya ko sama (a jere tare da samarda wuta da lodi), da kuma daya ko biyu masu karfin shunt tare da wutan lantarki da lodi. Ka tuna cewa nauyin da aka fahimta shine na'urar da aka haɗa da mai tacewa kuma tana tattara kayan aikin tacewar ... A cikin waɗannan matattara kuma akwai bambance-bambancen karatu, kamar L, T da π.
  • Tace mai wucewa: babban matatar da take wucewa kishiyar ƙaramar hanya ce, a wannan yanayin, abin da zai tace ko iyakance shi ne ƙarancin saurin wucewa, barin ƙananan mitocin su wuce. A cikin wannan an saka abubuwan lantarki waɗanda suka tsara shi. Wato, a nan masu iya ɗaukar ƙarfin su ne waɗanda suke a jere tare da samar da wuta da ɗora kaya, yayin da murhunan za su tsinkaye. Hakanan akwai ƙananan nau'ikan guda ɗaya kamar yadda yake a yanayin ƙananan matatun wuta.
  • Band wuce tace: Wannan nau'in matattarar yana amfani da makullin lamba biyu na saurin wucewa. Wato, suna yin duka azaman matattarar ƙananan wucewa da matsayin babban matattarar wucewa, suna adawa da nasar mafi ƙarancin mitocin kuma mafi girma a lokaci guda. A wasu kalmomin, kawai yana ba da damar mitar ta tsakiya ta wuce.
  • Tace band: daidai yake da wanda ya gabata, abin da yakeyi shine yana tace wucewar tsakiyar mitocin kuma yana iya barin ta ne mafi ƙarancin kuma mafi girman mitoci.

Ka tuna da hakan inductances suna bari ta ƙananan mitoci kuma suna adawa da wucewar manyan mitoci. Madadin haka, masu ƙarfi suna barin manyan mitoci kuma suna adawa da wucewar ƙananan mitoci.

Ina so in ƙara wannan matatun a matakin aiki basu cika ba, kuma koyaushe suna iya wuce wasu ƙananan ko ƙananan mitoci waɗanda ya kamata ku toshe. Koyaya, suna yin aikinsu sosai don yawancin aikace-aikace.

Kuma a ƙarshe, Ina so kuma in bayyana wani abu, kuma wannan shine tabbas kunji labarin EMA da DEMA masu tacewa. Matakan EMA (Matsakaicin Matsakaicin Motsawa) suna ba ku damar aiwatar da irin wannan matattara ta hanya mai sauƙi a cikin na'urorin da aka saka. Dangane da DEMA (Matsakaicin Matsakaicin Motsawa biyu), suna da amsa fiye da EMA cikin sauri, suna kiyaye kyakkyawan ƙarar karar da kuke son gujewa.

Alpha factor

El alpha factor, wanda zaku gani wanda ya bayyana a cikin lambobin ID na Arduino IDE a cikin sashe na gaba, shine ma'aunin da ke daidaita halayen ɗabi'ar matattarar bayanai. Yana da alaƙa da yanayin yankewa:

  • Alpha = 1: wannan yana ba da sigina ga aikin da ba a tace shi ba.
  • Alpha = 0: ƙimar tacewa koyaushe zata kasance 0.
  • Alpha = x: wasu ƙimar zasu iya samun wasu canje-canje a cikin tace EMA. Idan ka rage abubuwan Alpha, zaka tausasa siginar mitar da aka samu da yawa, kuma lokacin amsawa na tsarin shima ya karu (yana daukar tsawan lokaci kafin ya daidaita).

Tacewa da Arduino

Motar Arduino I2C

Don amfani da waɗannan matatun, ta amfani da laburare don Arduino IDE zai sa aikinku ya zama da sauƙi. Zaka iya amfani wannan daidai.

Ya kamata ku sani cewa ba lallai ba ne don ƙirƙirar kewaya matattarar izinin wucewa ko matattarar ƙyamar hanya don haɗa shi zuwa allon Arduino ɗin ku kuma kuyi aiki tare da shi. Kodayake zaku iya gwaji da ƙirƙirar waɗannan nau'ikan matattara masu sauƙi, zaku iya gwada yadda EMA zata yi aiki tare da hukumar Arduino kawai da lambar mai sauƙi don Arduino IDE. Abin sani kawai zaka buƙaci ganin yadda yake kula da tace wasu mitocin (a wannan yanayin ana kwaikwayon aikin ne kuma wasu lambobi / masu iyo ne kawai ake tace su. kwaikwayon abin da zan yi tace a zahiri).

Anan akwai wasu samfuran lamba waɗanda zaku iya amfani dasu don aiwatarwa.

Misali na sauƙin dijital dijital a cikin Arduino na nau'in low wucewa:

float   lowpass_prev_out[LOWPASS_ANALOG_PIN_AMT], 
         lowpass_cur_out[LOWPASS_ANALOG_PIN_AMT];
int        lowpass_input[LOWPASS_ANALOG_PIN_AMT];
 
 
int adcsample_and_lowpass(int pin, int sample_rate, int samples, float alpha, char use_previous) {
  // pin:            Pin analógico de Arduino usado
  // sample_rate:    El ratio adecuado
  // samples:        Samples
  // alpha:          El factor Alpha para el filtro paso bajo
  // use_previous:   Si es true se sigue ajustando hasta el valor más reciente. 
 
  float one_minus_alpha = 1.0-alpha;
  int micro_delay=max(100, (1000000/sample_rate) - 160);  
  if (!use_previous) { 
    lowpass_input[pin] = analogRead(pin);
    lowpass_prev_out[pin]=lowpass_input[pin]; 
  }
  int i;
  for (i=samples;i>0;i--) {
    delayMicroseconds(micro_delay);
    lowpass_input[pin] = analogRead(pin);
    lowpass_cur_out[pin] = alpha*lowpass_input[pin] + one_minus_alpha*lowpass_prev_out[pin];
    lowpass_prev_out[pin]=lowpass_cur_out[pin];
  }
  return lowpass_cur_out[pin];
}
 
int resulting_value;
 
void setup() {
   Serial.begin(9600);
   resulting_value = adcsample_and_lowpass(0, 1000, 300, 0.015, false); 
}
 
void loop() {
   resulting_value = adcsample_and_lowpass(0, 1000, 150, 0.015, true);  
   Serial.println(resulting_value);

Misalin lamba don nau'in Arduino Babban wucewa:

int sensorPin = 0;    //pin usado para el ADC
int sensorValue = 0;  //Inicia sensor variable equivalente a EMA Y
float EMA_a = 0.3;    //Inicialización del EMA Alpha
int EMA_S = 0;        //Iniciación del EMA s
int highpass = 0;
 
void setup(){
  Serial.begin(115200);              
  EMA_S = analogRead(sensorPin);     
}
 
void loop(){
  sensorValue = analogRead(sensorPin);              //Lee el valor del sensor ADC
  EMA_S = (EMA_a*sensorValue) + ((1-EMA_a)*EMA_S);  //Ejecuta el filtro EMA
  highpass = sensorValue - EMA_S;                   //Calcula la seña alta
 
  Serial.println(highpass);
   
  delay(20);                                //Espera 20ms
}

Misalin lambar Arduino band wuce:

int sensorPin = 0;        //Pin para el ADC
int sensorValue = 0;      //Inicia la variable del sensor, equivale a EMA Y
 
float EMA_a_low = 0.3;    //Inicia EMA Alpha
float EMA_a_high = 0.5;
 
int EMA_S_low = 0;        //Inicia EMA S
int EMA_S_high = 0;
 
int highpass = 0;
int bandpass = 0;
 
void setup(){
  Serial.begin(115200);                   
   
  EMA_S_low = analogRead(sensorPin);      
  EMA_S_high = analogRead(sensorPin);
}
 
void loop(){
  sensorValue = analogRead(sensorPin);    //Lee el valor del sensor ADC
   
  EMA_S_low = (EMA_a_low*sensorValue) + ((1-EMA_a_low)*EMA_S_low);  //Ejecuta EMA
  EMA_S_high = (EMA_a_high*sensorValue) + ((1-EMA_a_high)*EMA_S_high);
   
  highpass = sensorValue - EMA_S_low;     
  bandpass = EMA_S_high - EMA_S_low;     
 
  Serial.print(highpass);
  Serial.print(" ");
  Serial.println(bandpass);
   
  delay(20);                              
}

Misalin lambar Arduino ga band:

int sensorPin = 0;          //Pin usado para el ADC
int sensorValue = 0;        //Inicio para EMA Y
 
float EMA_a_low = 0.05;     //Inicio de EMA alpha 
float EMA_a_high = 0.4;
 
int EMA_S_low = 0;          //Inicia EMA S
int EMA_S_high = 0;
 
int highpass = 0;
int bandpass = 0;
int bandstop = 0;
 
void setup(){
  Serial.begin(115200);                     
   
  EMA_S_low = analogRead(sensorPin);        
  EMA_S_high = analogRead(sensorPin);
}
 
void loop(){
  sensorValue = analogRead(sensorPin);      //Lee el valor del sensor ADC
   
  EMA_S_low = (EMA_a_low*sensorValue) + ((1-EMA_a_low)*EMA_S_low);          //Ejecuta EMA
  EMA_S_high = (EMA_a_high*sensorValue) + ((1-EMA_a_high)*EMA_S_high);
   
  bandpass = EMA_S_high - EMA_S_low;       
 
  bandstop = sensorValue - bandpass;        
 
  Serial.print(sensorValue);
  Serial.print(" ");
  Serial.print(EMA_S_low);
  Serial.print(" ");
  Serial.println(bandstop);
   
  delay(20);                                
}

Ka tuna cewa ADC shine Arduino Analog Digital mai canzawa. Yi amfani da kewayon 0-5v, rarraba zuwa jeri na 0-1023. Idan darajar ta kasance 0v, za'a dauki darajar dijital ta 0, idan kuma 5v ne, za'a dauki 1023 azaman siginar sigina, 1v na iya zama 204m, 2v zai zama 408, da dai sauransu.

Ina baku shawara ku gyara da gwaji da wadannan lambobin. Sakamakon da zaka iya duba sosai godiya ga Serial Plotter na Arduino IDE ... Ka tuna cewa idan kuna da tambayoyi game da shirye-shiryen Arduino ko yadda ake amfani da IDE, zaku iya saukar da kyauta HwLibre a cikin PDF.


Abubuwan da ke cikin labarin suna bin ka'idodinmu na ka'idojin edita. Don yin rahoton kuskure danna a nan.

Kasance na farko don yin sharhi

Bar tsokaci

Your email address ba za a buga. Bukata filayen suna alama da *

*

*

  1. Mai alhakin bayanan: Miguel Ángel Gatón
  2. Dalilin bayanan: Gudanar da SPAM, gudanar da sharhi.
  3. Halacci: Yarda da yarda
  4. Sadarwar bayanan: Ba za a sanar da wasu bayanan ga wasu kamfanoni ba sai ta hanyar wajibcin doka.
  5. Ajiye bayanai: Bayanin yanar gizo wanda Occentus Networks (EU) suka dauki nauyi
  6. Hakkoki: A kowane lokaci zaka iyakance, dawo da share bayanan ka.