Example colour sensor circuit

This circuit, which we will discuss in tomorrow’s lecture, is just a simple example of how a reflective infrared colour sensor can be connected to the analog input of an MSP430G2553 microcontroller.

With the Race to the Wall in mind (it’s fast approaching!) I decided to leave the switch input from last week’s example connected also.

Some important notes:

  1. Please please please don’t just stick this together without trying to understand it. Building a circuit like this without having a basic understanding of how it works almost never works. To find out more about infrared colour sensor and how they work, I suggest you read this post I published previously.
  2. The colour sensor circuit should be built and tested with a multimeter before connecting it to the microcontroller. Remember: The secret to fault finding in a complex system is to break it down into smaller parts that can be tested separately.
  3. Once the working colour sensor is connected to the microcontroller, remember that the input pin must either be enabled as an analog input, or the high and low voltages for white and black must be close to 3V and 0V respectively. A large voltage swing between black and white is necessary for the sensor to drive a digital input reliably.

race_to_wall_switch_colour_sensor

[Download editable Inkscape SVG version]

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s