Close

Project Log #3: IR Rotation Sensor Circuit

A project log for The Scooterbine

Renewable energy from unwanted, unloved motors, and a mean scooter.

Sam GriffenSam Griffen 04/20/2020 at 21:580 Comments

I have spent the past couple of days setting up the circuitry to go inside the anemometer design I posted previously. I have setup the following circuit:

U1A and U1B form the infrared receiver/emitter pair of the TCRT5000 sensor. U1A is a phototransistor, so will pull the inverting input of the comparator towards GND when IR light is present on the sensor. R_POT should be adjusted such that the inverting input (pin 2) is lower than the non-inverting input (pin 3) when the sensor is underneath the white section of the headset. Conversely, pin 2 should be a higher voltage than pin 3 when the sensor is beneath the black component of the headset.

As the comparator output is connected through a pull-up resistor, the system will output 3.3v for most of the cycle, and will output a low pulse as the black component passes over the sensor.

In order to verify the integrity of the pulse, I plugged the system into my incredibly dodgy $30 oscilloscope. The results are shown below:

Falling edge of signal (above). It is clear that the signal falls over a period of about 50uS.

Rising edge of signal (above). This also occurs over the period of about 50uS, though this image is not as clear.

Both edges of the low pulse seem to be relatively clean, and should be suitable to use as an input to the microcontroller interrupt pin. The sensor does not appear to bounce, transitioning cleanly and consistently between states.

From here, I will solder up a test control board, and create a mounting system for the circuitry and headpiece. I will update here once I have this, and hopefully have the headpiece measuring windspeed.

Discussions