NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Sensors, Actuators, and Robotics » Photo Cell

January 21, 2012
by Pr0ject
Pr0ject's Avatar

Hello everyone, I am working on a project in order to find out where to put my tomato plant in my house and get the maximum amount of sunlight. In order to do this I have a Photo cell that I took from another kit. Now from the tests I have done it does seem to react to light levels. My question is can I equip it to nerdkits and if so what program code will I need to use?

I can provide an image of the Photo Cell if needed.

January 21, 2012
by treymd
treymd's Avatar

A while back I used a photocell with the ADC with some success, I simply modified the tempsensor code to do so, and used a voltage divider with the photocell as suggested by someone on here. There is most definitly a better way to connect the cell to the ADC, though I am no expert. The photocell I used was your typical resistive cds photocell from radio shack. The top surface has S-like squiggly lines on it.

January 21, 2012
by Ralphxyz
Ralphxyz's Avatar

PrOject lets see a picture of your Photo Cell.

From some quick googling it does not appear that a CDS photo cell would give you the type of accuracy you probable want.

It would be neat to have a Nerdkit light meter.

I am thinking of making a gate opener operate off car headlights flashing.

The gate would not be for security just to discourage people from randomly driving through.

So I was thinking of flashing headlights to activate the gate.

I am not sure what different ambient lighting levels might do and I would not want to open the gate just because someone pulled up at night with their headlights on. Possible I could detect three quick flashes.

I am not sure what type of photo detector to use.

I also thought of using horn beeps (well my Honda Civic Hybrid just beeps, it definitely does not HONK).

Ralph

January 22, 2012
by Pr0ject
Pr0ject's Avatar

Alt Text

That's a picture of the PhotoCell I'm going to use, I am not looking fro precision but rather to see IF there is a difference in the light levels. After further research I have found the answers I was looking for, if you would like I could post a link of a very helpful sight that refers to the nerdkit's microcontroler.

Ralph your idea is very neat and will work I am sure. I have an idea that you could program so that when it gets a certain amount of light (for this you will need to test how much light the car makes) and then waits for a different light and repeat three times, then the gate will open. Of course this is just an idea to start off and there needs to be a line that resets the light counter.

January 23, 2012
by Ralphxyz
Ralphxyz's Avatar

Hey Pr0ject, post that link to that helpful site.

Ralph

January 23, 2012
by Pr0ject
Pr0ject's Avatar

Here you go:

https://sites.google.com/site/qeewiki/books/avr-guide/analog-input

Hope you find something useful.

January 25, 2012
by BobaMosfet
BobaMosfet's Avatar

CDS are very sensitive. You need to understand hysterisis, and how far to offset them, so you get the range you want, but they are very sensitive.

BM

Post a Reply

Please log in to post a reply.

Did you know that Pulse Width Modulation (PWM) can be used to control the speed of a motor digitally? Learn more...