Skip to content

Signal Conditioning

Kan Zheng edited this page Sep 30, 2015 · 10 revisions

#What's Signal Conditioning Signal Conditioning is one process before and after signal processing. Before processed in MCU(Arduino), signals acquired from sensors must be conditioned to meet the demand of the MCU . Before used to control the devices, signals processed by MCU also must be conditioned to meet the demand of power system.

#Example 1 Generally, the output of sensors is resistance. To become an available input for Arduino, it's important to build a circuit to convert the change of resistance to the change of voltage(lower than 5V). It's better to add a resistor whose resistance is close to that of the sensor.

#Example 2 As the only function of MCU is processing the signal, buffer, as a signal conditioner, is necessary to drive objects/devices(like LEDs) with power system, especially high power loads.

#Combined Examples Through combining Ex1 and Ex2, we get a complete project about using photoresistance to control LEDs.
Codes in Arduino:

//Using photoresistance to control 2 LEDs.  
const int VccPin = A9;  
const int analogInPin = A5;  // Analog input pin that the potentiometer is attached to  
int sensorValue = 0;        // value read from the pot  
int outputValue = 0;        // value output to the PWM (analog out)  
int ledPin = 9;  
void setup() {  
}  
void loop() {  
  analogWrite(VccPin,255);  
  // read the analog in value:  
  sensorValue = analogRead(analogInPin);   
  // map it to the range of the analog out:  
  outputValue = map(sensorValue, 0, 1023, 0, 255);  
  if(outputValue>=100)  
     analogWrite(ledPin, 255);  
  else  
    analogWrite(ledPin, 0);  
  // wait 2 milliseconds before the next loop  
  delay(2);  
}