Go to Post Of course I'm not an admin, so this opinion is worth about as much as a disco record or AOL Free Trail CD. - PayneTrain [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 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
  #2   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
  #3   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
  #4   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
  #5   Spotlight this post!  
Unread 14-11-2013, 01:01
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

Glad to be of help. Considering how cheap photocells are (5 pack for $3.99 at Radio Shack) it won't add that much to the cost of the project, relatively speaking.

Please do share what you come up with.
__________________
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
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 16:07.

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