Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Color Sensor Diode

Status
Not open for further replies.

GabeChan

New Member
Hi there,

first off, I am new to all of this. I am trying to build a little device that converts light of different colours into music. The idea is to have a light shine on a colour sensor that's placed in a dark tube and the light being interrupted rhythmically by rotors with translucent 'blades' in various colours. The light sensor should be connected to a circuit and depending on the colour that hits the sensor, should trigger one or more of an array of little 'oscillator circuits' (not quite, see below).

I can post a picture of the device in case my explanation didn't help.

Either way, the device isn't the problem. My problem ist that I have not found a way to make the colour sensor work. I have no history in electronics so my knowledge goes as far as the descriptions in the Nicholas Collins book 'Hardware Hacking' (http://www.nicolascollins.com/texts/originalhackingmanual.pdf, if you are not familiar with it).

I would like to trigger a circuit with the Hex Schmitt trigger chip 74C14 (as he describes in chapter 18) with this colour sensor diode:
**broken link removed**
not precisely a matter of choice, frankly because it is the only one I can buy here.

my question is thus, is it at all possible, and how?

I have tried to read the spec sheet good as I can, but honestly I have no clue what I am doing. :sorry:

The way I put it together for myself is like this (see image), but it doesn't work, I thought maybe the diode doesn't output enough voltage to power the chip? Do I need a transistor? Do I need to wire it differently? Can I run a 9V battery through the colour sensor at all? Does it not react to light from a flashlight shone through a colour filter?

Any nudge in the right direction is much appreciated.

Many thanks!
 

Attachments

  • 1.jpg
    1.jpg
    47.2 KB · Views: 357
Considering the small size of the chip, with ~0.03uA at 100 Lux The feedback R's in your oscillator will need to draw less current to oscillate.
So 100k won't work.

Even 10M needs almost 1uA at 9V which won't work either.

Usually inverting trans-impedance amp (TIA), mode of amplifying current to voltage is used to produce voltage which you can use to drive your Schmitt Inverter oscillators. Choose Op Amps that work with inputs at/below ground with very low input bias current and expect time constant to be slow with very large R values for gain.
 
Hy GabeChan,

Warm welcome: you must be the most senior member on ETO now. I thought that I had seen some changes in the world during my life, but nothing compared to you. Care to tell us where you are from and put it next to 'Location' on your user page so that it shows in the window at the left of your posts.

You ask if what you would like to do is feasible; well have no fear it definitely is.:)

As Tony says, the key will be to convert the minute current from each of the three color sensing diodes to a voltage high enough to flip the Schmidt triggers and turn the appropriate audio frequency oscillators on.

As the frequency of turning the three color sensors on and off is relatively low, this presents few problems. A current to voltage converter using an operational amplifier will do the job. I would recommend the Texas instruments OPA192 family of opamps, or the similar but slightly less accurate OPA197 family.

If I get the time, I will see if I can knock you out a schematic.

spec
 
Last edited:
Hi again GabeChan,

An outline schematic of a current to voltage amplifier made from an operational amplifier is attached below.

2016_10_12_Iss1_ETO_OPTO_SENSOR_AMPLIFIER_VER1.png

NOTES
(1) The pin numbers shown on the schematic are not correct for the OPA192
(2) The output voltage = opto sensor current * R45. R45 can be adjusted to suit the sensitivity that you require.
(3) The -5V line takes very little current, so a couple of 3V CR2032 button cells in series will last for years (-6V will be fine).
(4) the capacitors are for decoupling and should not be omitted. The values are not critical.
(5) Unless otherwise stated (UOS), all capacitors are disk ceramic X7R dialectic.
 
Last edited:
Hi Spec, hi everyone,

So many thanks for your thoughtful replies!

I am a bit confused about the placement of the diode. I thought reverse bias has to be applied to the diode which would then be fed into the schmitt trigger ... but here I cannot see how the diode can act as a gate for the whole setup...? Also, especially since the diode should have three anodes, thus three outs, one for each colour, which in my schematic would be fed into the three different triggers.
Could you elaborate on that?

I am also confused about one of the resistors. R27, what purpose does it serve and what value would I need to pick for it?

Also, I am based in Germany and I can neither seem to find the OPA192 nor the OPA197 at the biggest (and only) German circuit parts retailer (www.conrad.de) ... can you think of an alternative that might be available here?

This doesn't account for the resistors and condensators I use for the schmitt trigger, right? everything in the schematic goes before the schmitt trigger, correct?

As for my age, I have to apologise ... I am afraid I am not 98! It's a standard that I pick on all my accounts and now you caught me off guard with your sincerity. :sorry: Apparently I cannot change it anymore, but I updated my location...! Apologies for the confusion.

Again, many thanks for your help already, this is very lovely of yous.

Best,
G
 
Oh, one more thing...

Where does the 0V power line go? The internet is full with terms like ground, earth, neutral line, etc. I am somewhat confused. If I were to build this on a bread board, what would be the 0V power line be? is -5V ground, or is 0V ground?

:confused:
 
Hi Gabe,

Where does the 0V power line go?
Most possibly nowhere.

If I were to build this on a bread board, what would be the 0V power line be? is -5V ground, or is 0V ground?
If anything 0V would be connected to chassis and/or ground.

The internet is full with terms like ground, earth, neutral line, etc. I am somewhat confused.
Generally 0V, chassis, and earth (ground) are used interchangeably on schematics, but they are three quite different things.

A circuit is powered by its supply line: 15V, 12V, 5V, 3.3V etc and its 0V line. The electronics in a circuit know nothing about chassis and ground. For example a portable radio may have no connections to the chassis and certainly would not have a connection to earth.

Chassis is just what it says: it is the case of the equipment. 0V may or may not be connected to the chassis.

And earth is the ground either from your mains supply or by driving a copper rod into the ground. Ground may or may not be connected to the chassis or 0V.

All this may sound like nit picking but in practice the 0V, chassis and earth arrangements have a major impact on:

(1) The correct and reliable operation of the circuit

(2) Safety

(3) Electromagnetic Compatibility (EMC). EMC has two aspects:
(3.1) How susceptible to your equipment is to interference from outside sources
(3.2) How much hash your equipment emits that may interfere with other equipment.

End of lecture. :D

spec
 
Last edited:
So many thanks for your thoughtful replies!
No sweat Gabe

I thought reverse bias has to be applied to the diode
The diode is reverse biased: it has zero volts on it cathode and -5V on its anode.

which would then be fed into the schmitt trigger
The diode conducts current when the right color light shines on it. The schmitt tigger requires a voltage of around 3V to trigger. The operational amplifier does the job of converting the minute current from the diode into a voltage sufficient to trigger the schmitt trigger.


... but here I cannot see how the diode can act as a gate for the whole setup...?
The diode does not act as a gate. The diode only conducts current, as stated above.

the diode should have three anodes, thus three outs, one for each color, which in my schematic would be fed into the three different triggers.
This is a question of semantics. The 'diode unit' contains three different and independent photo detector diodes, one each for red, green, and blue. I have confused you by drawing an outline schematic which only shows one of the diodes in the diode unit. In practice, you would have three opamps and three Schmitt triggers, making a total of three outputs.

R27, what purpose does it serve and what value would I need to pick for it?
:) You should be confused by R27 because it plays no part in the functional operation of the circuit. It is an isolator to reduce the capacitive loading on the opamp output and help to ensure that the opamp responds well and does not oscillate. The value is just good practice. It is not calculated, at least in most instances.

Also, I am based in Germany and I can neither seem to find the OPA192 nor the OPA197 at the biggest (and only) German circuit parts retailer (www.conrad.de) ... can you think of an alternative that might be available here?
There are a wide range of opamps that will suit this function. It is just that the OPA192 is ideal. Don't worry about this for the time being. We can sort it. By the way, you can order from DigiKey, Mouser, RS, Farnell, etc

This doesn't account for the resistors and condensators I use for the schmitt trigger, right? everything in the schematic goes before the schmitt trigger, correct?
You will not need any resistors or capacitors for the schmitt triggers; six come in a chip pack (74C14). You simply connect the output of the circuit of post #4 to the input pin and take the output from the output pin. 74HC14 datasheet: https://media.digikey.com/pdf/Data Sheets/Fairchild PDFs/MM74C14.pdf

As for my age, I have to apologise ... I am afraid I am not 98! It's a standard that I pick on all my accounts and now you caught me off guard with your sincerity. :sorry: Apparently I cannot change it anymore, but I updated my location...! Apologies for the confusion.
:hilarious: One of the ETO officials can probably change it for you.

spec
 
Last edited:
Here is a first pass at a corrected version of your schematic, plus a small audio amplifier, in only 2 chips. Note that this circuit may not work.

The CD4093 has the same schmitt trigger action as the 74AC14, plus each oscillator section has an enable input. Note that the 74AC14 is not rated for operation at 9 V, but the CD4093 is. IF (big if) the photodiodes are brightly illuminated, then they might pass enough current to change the enable pin state. I show 1 M resistors, but these might have to be increased for better sensitivity, or decreased if the inputs are too sensitive. If the oscillators never trigger, then you probably will need a photodiode amplifier circuit for each input.

The LM386 is a great little speaker amplifier for this kind of project.

C7-C10 are decoupling capacitors. Place one .047 and 1 4.7 cap near the power and ground pins of each chip. Keep the wire lengths as short as possible.

ak
ColorTrigger-1-c.gif
 

Attachments

  • ColorTrigger-1-c.pdf
    14.1 KB · Views: 328
Last edited:
Hey guys,

thanks so much for the replies. Will get back as soon as I have the amps ... should be a week or so.

'til then
 
Status
Not open for further replies.

Latest threads

Back
Top