Go to Post The only fee our team charges is for your heart and soul. No refunds. - Koko Ed [more]
Home
Go Back   Chief Delphi > Technical > Control System
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 12-10-2011, 20:28
bhandel76 bhandel76 is offline
Registered User
no team
 
Join Date: Oct 2009
Location: Visalia CA. USA
Posts: 7
bhandel76 is on a distinguished road
Need help with circuits and photocell

Hello,
I need help building a project but know nothing about circuitry and photocell. I thought I'd ask you professionals.

I want to take a photocell light sensor and attach it to a small motor (1" diameter motor) and battery.

Here is the link
http://www.robotshop.com/mini-photoc... campaign=jos

What I want to happen is, when the light is on the photocell sensor, the motor will come on and spin left (counter clockwise) "x" amount of times, the quit. Then, when it is dark on the photocell sensor, the motor will spin clockwise "x" amount of times and stop.

I realize there has to be some kind of silicon circuit board in there to tell the motor what to do. On the same link mentioned above, there is a picture of a silicon board the size of a quarter, is it possible to have a board that size to do what want mentioned above?
Do you recommend someone or a company to help with this project? I would Gladly compensate for the job.

Any help, advice is greatly appreciated.
Any additional questions, please ask.

Thank you.
Reply With Quote
  #2   Spotlight this post!  
Unread 12-10-2011, 21:57
Unsung FIRST Hero
Al Skierkiewicz Al Skierkiewicz is offline
Broadcast Eng/Chief Robot Inspector
AKA: Big Al WFFA 2005
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1996
Location: Wheeling, IL
Posts: 10,798
Al Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond repute
Re: Need help with circuits and photocell

b,
What you are asking for is not a simple circuit. You need something that is programmable, capable of taking sensor input, using it for a program that controls a motor driver of some type. Lego Mindstorms is just such a product. This controller is capable of several sensor inputs and several motor outputs. It is easily programmed via supplied language with the kit. Unfortunately, it is designed for special motors that are also supplied in the kit. Actually, some of the motors also contain tachometer sensors that allow you to actually count rotations and use that to feedback into the program.
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
Storming the Tower since 1996.
Reply With Quote
  #3   Spotlight this post!  
Unread 12-10-2011, 23:27
sanddrag sanddrag is offline
On to my 16th year in FRC
FRC #0696 (Circuit Breakers)
Team Role: Teacher
 
Join Date: Jul 2002
Rookie Year: 2002
Location: Glendale, CA
Posts: 8,519
sanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond repute
Re: Need help with circuits and photocell

There are ways to do this without a microcontroller, but it honestly is probably easier to use one. Quick question: does the "x" number of times have to be a very accurate and consistent number?

You may look into using something like a PICAXE 08M2 or 14M2 microcontroller to read a CdS (LDR), and some transistors to drive the motor.

This isn't too difficult really.

Also, does it have to be THAT motor, or can it be a continuous rotation servo? If the latter, this is a piece o cake.
__________________
Teacher/Engineer/Machinist - Team 696 Circuit Breakers, 2011 - Present
Mentor/Engineer/Machinist, Team 968 RAWC, 2007-2010
Technical Mentor, Team 696 Circuit Breakers, 2005-2007
Student Mechanical Leader and Driver, Team 696 Circuit Breakers, 2002-2004
Reply With Quote
  #4   Spotlight this post!  
Unread 26-10-2011, 20:11
bhandel76 bhandel76 is offline
Registered User
no team
 
Join Date: Oct 2009
Location: Visalia CA. USA
Posts: 7
bhandel76 is on a distinguished road
Re: Need help with circuits and photocell

Al,
I spent sometime reviewing the Lego Mindstorms but I found myself to be more lost than before I started.

Sanddrag,
I really don't know what a micro controller is. What I'm building has to be contained by itself and operate via photocell. Rechargeable batteries to run the system. Similar to the outdoor lights you hang. They come on when it's dark and turn off when the sun comes up.
I dont know much about a servo but if it's small, it'll work. The "x" should be somewhat consistent in operating.

Gentlmen, is there someone or a company that you recommend who could build this prototype?
Thank you,
B
Reply With Quote
  #5   Spotlight this post!  
Unread 26-10-2011, 20:55
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,125
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Need help with circuits and photocell

Quote:
Originally Posted by bhandel76 View Post
What I want to happen is, when the light is on the photocell sensor, the motor will come on and spin left (counter clockwise) "x" amount of times, the quit. Then, when it is dark on the photocell sensor, the motor will spin clockwise "x" amount of times and stop.
Your description of the desired behavior is incomplete.

What do you want it to do if the light is removed from the sensor while the motor is spinning CCW? Stop immediately and spin CW? Or finish the CCW spinning and then spin CW? Or ignore any changes that occur while the motor is spinning?

Do you want the circuitry to require a persistence of the sensor state before action is taken? In other words, if the light on the sensor is removed for 1 millisecond do you want the motor to start spinning CW? Or do you want the circuit to ignore momentary changes like that?

What is the operating voltage you will be providing to the motor, and what is the current draw?

Are you going to make one of these, or 10 million?

How big can the controlling device be? Is there a size or weight limit? Can it be supplied with 120vAC power?



Reply With Quote
  #6   Spotlight this post!  
Unread 26-10-2011, 21:12
Unsung FIRST Hero
Al Skierkiewicz Al Skierkiewicz is offline
Broadcast Eng/Chief Robot Inspector
AKA: Big Al WFFA 2005
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1996
Location: Wheeling, IL
Posts: 10,798
Al Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond repute
Re: Need help with circuits and photocell

b,
We approach these problems with a little more precision. So we need to know the amount of precision you need. A simple circuit can be developed that will spin the motor in one direction when lit and then spin in the other direction when dark. However, the length of time it will spin (or the number of rotations that it will make) will not be controlled and therefore will not be repeatable from one trigger to the next. The size (output power) of the motor also will determine the complexity of the circuit to some extent. If you are merely turning a small hobby motor like a slot car might have, then a simple circuit may be made using a dual 555 timer, some resistors and capacitors, and two miniature relays in addition to the photocells you have shown. Again, this circuit would very likely vary widely in the action of the motor.
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
Storming the Tower since 1996.
Reply With Quote
  #7   Spotlight this post!  
Unread 18-11-2011, 17:47
DavisC DavisC is offline
Registered User
FRC #0539 (Titans)
Team Role: College Student
 
Join Date: Jul 2011
Rookie Year: 2010
Location: Virginia
Posts: 200
DavisC is just really niceDavisC is just really niceDavisC is just really niceDavisC is just really nice
Re: Need help with circuits and photocell

Hey,
Yea I second (or should i say third) what the others have said. While only a10th grader (although the team captain/programmer/electronics) I am familiar with this, in terms of FRC and programming while no expierence with circut boards.

-From a programmable board (microcontroller- "is a small computer on a single integrated circuit containing a processor core, memory, and programmable input/output peripherals." http://en.wikipedia.org/wiki/Microcontroller) perserpective, this would be relatively simple asumming you know some basic programming. This method could be accomplished using a cRIO or as I've been looking into recently a Arduino board.

-Now the part that I am not familiar with: Using only a circut board (breadboard). But what I do no is that in my school's physics class they commonly have to make something that will run off a timer using just circuts.

Hope this defines your 2 most basic options which each branch off on their own.
Reply With Quote
  #8   Spotlight this post!  
Unread 04-02-2012, 13:43
bhandel76 bhandel76 is offline
Registered User
no team
 
Join Date: Oct 2009
Location: Visalia CA. USA
Posts: 7
bhandel76 is on a distinguished road
Re: Need help with circuits and photocell

hello,
I do apologize for the delay. I had to make sure I was Patented before letting out too much information.

What I am creating is a stand alone solar power yard light that is recessed into the ground when the sun is out. Once it is dark out, the light will raise up and aluminate. Similar to a pop up sprinkler.

Now I'm looking for a prototype builder or someone to guide me. Who's up for the challenge?

Last edited by bhandel76 : 04-02-2012 at 13:50. Reason: Patented Now....
Reply With Quote
  #9   Spotlight this post!  
Unread 04-02-2012, 19:01
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 7,019
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: Need help with circuits and photocell

Or you can just buy one of these.
__________________

I am N2IRZ - What's your callsign?
Reply With Quote
  #10   Spotlight this post!  
Unread 04-02-2012, 19:09
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Need help with circuits and photocell

For that application, you don't really need to turn the motor a definite number of rotations. You can either choose a motor that can withstand being stalled for a few seconds and drive it for a long enough time that your mechanism will reach a hard limit, or you can use a sensor that detects when the mechanism is fully retracted or fully extended to let the motor run only as long as it needs to.

There are also a couple of nifty mechanical tricks you can use to let the motor keep driving for a while without stalling, like using a lead screw with unthreaded ends and a spring-loaded stage that will be certain to reacquire the threads when the screw turns the other direction.
Reply With Quote
  #11   Spotlight this post!  
Unread 09-11-2013, 13:10
New User Matt New User Matt is offline
Registered User
no team
 
Join Date: Nov 2013
Location: nc
Posts: 5
New User Matt is an unknown quantity at this point
Re: Need help with circuits and photocell

Hello,
First post here. I wonder what happened with the OP?

I want to do something similar.

Could you use dpdt relay (or an H bridge) for this?

Using a dpdt relay wired so that it is NC for one direction and the motor would move a screw and then stop when it hits a limit switch - at night time. Then using a photo resistor and a transistor to get the motor to move in opposite direction when the photo resistor has low resistance during the day and then stop when it hits a limit switch.

I think that would work, but (and what I don't understand) after the motor moves during the day and stops would it stay there during the day because the coil would stay energized because of the photo resistor until night when the relay goes back to the NC position? I don't think it would be good if the coils stayed energized during the day and constantly draw current especially if using batteries?

Or would it automatically move back into the night position because the relay is wired NC, and then this would keep repeating back and forth constantly during the daytime?

Of course the objective would be to move one direction at night and stop at a limit switch then move a different direction during the day and stop at a limit switch and then repeat daily.

I can't quite figure this out and if it would be the best way to proceed for something like this?

Any help you could give me would be Greatly Appreciated...I'm stumped!

Thanks,
Matt
Reply With Quote
  #12   Spotlight this post!  
Unread 09-11-2013, 20:50
Mr V's Avatar
Mr V Mr V is offline
FIRST Senior Mentor Washington
FRC #5588 (Reign)
Team Role: Coach
 
Join Date: Feb 2011
Rookie Year: 2009
Location: Maple Valley Wa
Posts: 997
Mr V has a reputation beyond reputeMr V has a reputation beyond reputeMr V has a reputation beyond reputeMr V has a reputation beyond reputeMr V has a reputation beyond reputeMr V has a reputation beyond reputeMr V has a reputation beyond reputeMr V has a reputation beyond reputeMr V has a reputation beyond reputeMr V has a reputation beyond reputeMr V has a reputation beyond repute
Re: Need help with circuits and photocell

Quote:
Originally Posted by New User Matt View Post
Hello,
First post here. I wonder what happened with the OP?

I want to do something similar.

Could you use dpdt relay (or an H bridge) for this?

Using a dpdt relay wired so that it is NC for one direction and the motor would move a screw and then stop when it hits a limit switch - at night time. Then using a photo resistor and a transistor to get the motor to move in opposite direction when the photo resistor has low resistance during the day and then stop when it hits a limit switch.

I think that would work, but (and what I don't understand) after the motor moves during the day and stops would it stay there during the day because the coil would stay energized because of the photo resistor until night when the relay goes back to the NC position? I don't think it would be good if the coils stayed energized during the day and constantly draw current especially if using batteries?

Or would it automatically move back into the night position because the relay is wired NC, and then this would keep repeating back and forth constantly during the daytime?

Of course the objective would be to move one direction at night and stop at a limit switch then move a different direction during the day and stop at a limit switch and then repeat daily.

I can't quite figure this out and if it would be the best way to proceed for something like this?

Any help you could give me would be Greatly Appreciated...I'm stumped!

Thanks,
Matt
You could do it with a pair of relays.

Motor leads go to the common terminal, the NC terminal goes to ground and the NO terminal goes to B+. You would put the limit switches in the circuit powering the coil using the Common and NC terminals.

If power is applied to the forward relay's coil then that coil will supply power until the limit switch opens the coil circuit. That coil will be de-energized and that motor lead will return to ground ready for the motor to be reversed.

Then when power is applied to the reverse relay's coil that motor lead will get connected to B+ until the limit switch opens the coil circuit. That lead will return to ground and the system will be reset to go in the forward direction.

You will probably need a pair of transistors to supply adequate current and voltage to power the relay's coils. How you would do that is pushing the limits of my electronics knowledge. Hopefully someone else can chime in with the appropriate transistors, photo cell and photo resistor to make that work.


You could use a Arduino or Raspberry PI to use a single photo resistor or photo cell to control the relays and then you could also wire the limit switches to it.
__________________
All statements made on Chief Delphi by me are my own opinions and are not official FIRST rulings or opinions and should not be construed as such.




https://www.facebook.com/pages/Team-...77508782410839
Reply With Quote
  #13   Spotlight this post!  
Unread 12-11-2013, 16:38
New User Matt New User Matt is offline
Registered User
no team
 
Join Date: Nov 2013
Location: nc
Posts: 5
New User Matt is an unknown quantity at this point
Re: Need help with circuits and photocell

Thanks Mr. V for your post.

Is there a reason to use two relays instead of just one dpdt relay?

I think the part I'm struggling with is how to keep the motor still during the day after stopping at a limit switch. I don't want the motor to reverse until night time.

Somehow using the low resistance of the photocell during the day to keep this from happening?
Reply With Quote
  #14   Spotlight this post!  
Unread 13-11-2013, 04:18
Mr V's Avatar
Mr V Mr V is offline
FIRST Senior Mentor Washington
FRC #5588 (Reign)
Team Role: Coach
 
Join Date: Feb 2011
Rookie Year: 2009
Location: Maple Valley Wa
Posts: 997
Mr V has a reputation beyond reputeMr V has a reputation beyond reputeMr V has a reputation beyond reputeMr V has a reputation beyond reputeMr V has a reputation beyond reputeMr V has a reputation beyond reputeMr V has a reputation beyond reputeMr V has a reputation beyond reputeMr V has a reputation beyond reputeMr V has a reputation beyond reputeMr V has a reputation beyond repute
Re: Need help with circuits and photocell

A DPDT relay would allow you to reverse the motor but it wouldn't allow you to shut if off without including more components to control that.

By using two separate relays you can use limit switches to shut off the motor when the end of travel is reached and simultaneously reset it so it is ready to be turned on in the other direction. Using a pair of relays with the common terminal connected to the motor leads, the NC terminal connected to ground and the NO terminal connected to B+ is the way that a number of automobile manufactures wire their door lock motors.

Unfortunately that would also mean that you would need two photo resistors, one to activate the "forward" or "up" relay and one to activate the "reverse" or "down" relay.

Here is a little information on how to use a photo resistor in a voltage divider circuit to cause the output voltage to either increase as the light increases or increase as the light decreases.

http://www.acroname.com/howto/photor...oresistor.html

You would need to select the proper resistors to create a "dead band" to prevent the system from trying to activate the "forward" and "reverse" relays at the same time or to fluctuate between the two states.

Page 3 of this document shows a circuit using a photo resistor in a voltage divider circuit to drive a transistor which switches a LED on and off based on the amount of light. http://www.engr.sjsu.edu/bjfurman/co...stor-atmel.pdf Replace the LED with the relay coil and the resistor with the limit switch wired to the NC and common terminals and you have the circuit that would activate the motor in a desired direction when the light is bright enough and then shut off the motor when the limit switch is activated.

By swapping the position of the photoresistor and standard resistor in the voltage divider circuit it would activate the relay when the light dims enough.

You need to select a transistor that can handle the current and voltage needed to activate the coil of the chosen relay.
__________________
All statements made on Chief Delphi by me are my own opinions and are not official FIRST rulings or opinions and should not be construed as such.




https://www.facebook.com/pages/Team-...77508782410839

Last edited by Mr V : 13-11-2013 at 04:20.
Reply With Quote
  #15   Spotlight this post!  
Unread 13-11-2013, 22:18
New User Matt New User Matt is offline
Registered User
no team
 
Join Date: Nov 2013
Location: nc
Posts: 5
New User Matt is an unknown quantity at this point
Re: Need help with circuits and photocell

Thanks Mr. V

I had thought about the 2 photocells but was trying to stay away from going that route.

And thanks for the links they were helpful.

I'll try to wire something up and post what happens.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 11:45.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi