Use Automotive Sensors in your next Project

Use Automotive Sensors in your next Project


okay in this video we’re going to look at sensors now if you want to measure a certain parameter or condition in the outside world you need some sort of sensor now you could go out and you could buy a simple thermistor or an LDR a light dependent resistor and hook it up to your microcontroller but then you got to put it in some kind of enclosure to protect it from the elements if it’s going outdoors now there’s another source of sensors and that’s from the automotive industry because your car is full of sensors like this one here that is the crankshaft position sensor and basically what it does it measures the RPM of your engine and feeds it to the computer so if you look at the packaging of automotive sensors are very robust because they have to go into a harsh environment you got water resistant connectors and they have a very salt way of mounting them so next we’ll look at other sensors that we could use from the automotive industry okay the other sensor we’re going to look at is the airbag sensor now there’s a few types there’s a mechanical type and there’s electronic type now the mechanical types consists of a tube with a ball bearing in it now one side of the tube is a magnet and on the other side of the tube is a set electrical contacts enormous that ball bearing is attached to the magnet but during a collision the ball bearing is torn away and sent into the contacts closing them activating the airbag now the other mechanical airbag sensor is the offset weighted cam that during a collision this cam rotates and close to the contacts and activates the airbag so electronic airbag sensor is basically clean and solar ometer and when it senses a certain amount of g-force it triggers the airbag so the mechanical airbag sensors could use for impact detector and the output is a contact closure so it’s easy to interface to a microcontroller okay the next sensor we’re going to look at is a temperature sensor now this is a coolant temperature sensor so it measures the temperature of the coolant inside the engine now they’re usually mounted on top of intake manifold or the engine block now this is a resistive type of sensor so the resistance will change as the temperature changes there’s two types is the one terminal where the resistance change will be between the terminal and the ground of the engine and the other one is a two terminal which isolated and the resistance will change between the two wires of the sensor the other sensor is an air temperature sensor and this is a hot platinum wire sensor so it has a platinum wire running through the sensor and a current is put through the wire and a wire is heated up now when air passes over the wire it cools down the wire and the resistance changes and the current will change so there’s get a different voltage output of this sensor another type of sensor is a thermistor sensor which is basically just your thermistor so it’s a resistor that changes value with different air temperature okay the next sensor were can look at is the knock sensor now this sensor detects detonation or pre ignition which causes pinging or knocking in the engine and that information is sent back to the computer to change the timing of the engine now this sensor is a piezo sensor so it puts out a voltage which follows the intensity of the knocking or pinging so you can use this sensor as a vibration sensor and feed that voltage into the input of the analog to digital converter or microcontroller for a vibration detector okay next we’re going to look at the crankshaft position sensor which we saw in the very beginning of the clip so this is a Hall effect sensor so it has a digital output so you have a negative going pulse on the output of the sensor when the Hall effect is triggered but this sensor keeps track of the position of the of the crankshaft and also the RPM of the engine the last sensor we’re going to look at is a throttle position sensor but it senses how far down the gas pedal is being pressed and that information is sent back to the computer but this sensor is basically a potentiometer and it measures its angular rotation with varying voltage so you could feed this into the analog digital converter of a microcontroller and calibrate it for angular rotation for any of your projects so next we’re going to get some interfaces how we can interface some of these sensors to a microcontroller okay here’s a simple way to interface your sensor to your microcontroller and if you have a resistance sensor that changes resistance say with temperature you can use it in a voltage divider configuration like we see here so r1 value is selected to give this a good dynamic range and output if the sensor is fed into one channel of your ad to ADC converter on your microcontroller and as the resistance changes on your sensor your ADC value will change from 1 0 to 3 toward 0 ok if you have a three terminal sensor like our crankshaft sensor it needs power so you have to supply 5 volts and ground to the sensor and out where the sensor is open collector so the user has to supply a pull-up resistor to VCC to 5 volts in this case and then the output it fetches one of the GPIO inputs of the microcontroller so as the sensor is triggered they’ll get a negative going pulse into the GPIO which will be sensed by the micro so next we’ll hook up the crankshaft sensor to Arduino Nano and we’ll have a look at its operation okay I have my crankshaft sensor hooked up to my Arduino Nano and a sensor is powered up to the nano +5 volts that’s coming from the USB port and the output of the sensor is fed into one of the GPIO pins of the Nano and the Nano is looking for a negative going pulse and when it sees a negative going pulse it will toggle the LED on pin 13 which is also the LED on the on the board so I’ll take my screwdriver and if I tap the sensor you can see the LED is toggling so the screwdriver is inducing magnetic field into the Hall effect sensor causing a neck negative going pulse and I can also simulate a gear on a crankshaft each time the tooth goes by it will toggle LED so if you’re looking for some sensors for your project and you can be creative you might want to look into automotive sensors


Leave a Reply

Your email address will not be published. Required fields are marked *