Previous in Forum: Diversity Factor   Next in Forum: MH EF18 Protection Relay Manual
Close
Close
Close
16 comments
Rate Comments: Nested
Anonymous Poster #1

Help Designing a Light Activated Electronic Circuit

01/06/2015 12:45 PM

I have looked on Google for this yet I cannot find exactly what I need. I'm really looking for guidance so I can learn more about electronics.

Here are the specifications:

  1. Single circuit board powered by a 9 VDC battery. (or other voltage battery?)
  2. Light and dark activation. (more on that in a bit)
  3. Rain / moisture sensor.
  4. Activate an R/C servo to move a mechanism 180 degrees.
  5. This is a home hobby project. I have done some experimenting with Arduino several years ago. Would an Arduino or Raspberry Pi work better?
  6. Possibility of wireless control from an smart phone WIFI or Bluetooth would be an add on feature. (I will concentrate on the wired control first)

I will have no problems with the mechanical aspect so that's why I posted in the EE section. My electronics skills are very rusty.
Here is what I want the circuit to do:

  • Manual operation:
  • Upon application of power the servo either moves to its "HOME" position or stays there depending on the power on position.
  • Press a switch (Engage) and the servo moves to its "OPEN" position of 180 Degrees.
  • Press the switch again (Release) and the servo moves to "HOME".
  • Automatic operation:
  • As the outside light diminishes (Sun goes down) the "CIRCUIT" activates and moves the servo to the "OPEN" position and stops. Power to the servo is removed, or switched off.
  • As the sun comes up, the "CIRCUIT activates and moves the servo to "HOME" and power to the servo is removed, or switched off.
  • Application and removal of power to the servo can be done either by a timer or by limit switches. Timer should run for about 5-7 seconds if that is your choice of control.
  • If it starts to rain, the servo will move to "HOME".
  • The light sensor cannot be too sensitive, as there are exterior lights that may affect the sensor

I know for some of you this is a simple circuit because you may do this kind of work day in and day out. I don't, that's why any suggestion is welcome.
Thank you for your assistance.

Robert

Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.

Good Answers:

These comments received enough positive votes to make them "good answers".
2
Guru
Popular Science - Evolution - New Member Popular Science - Weaponology - New Member

Join Date: May 2006
Location: The 'Space Coast', USA
Posts: 11119
Good Answers: 918
#1

Re: Help designing a light activated electronic circuit.

01/06/2015 12:50 PM

Try this website: "Phidgets

They have a wide assortment of these types of things, particularly for robotics. Maybe something there will work, but you may need to compromise on some of your requirements.

If this type of stuff interests you, nothing beats getting an education in basic electronics. You can teach yourself if you hunt around on the internet or you can even grab a course or two at your local community college.

Also, join some forums in the topics of your interests.

Reply Good Answer (Score 2)
Anonymous Poster #1
#2

Re: Help designing a light activated electronic circuit.

01/06/2015 1:25 PM

I forgot to specify the overall cost of the materials to not exceed $30.00 US.

I have the servos and the speed control. $2.00 each so far.

I know that buying parts in small quantities is not very cost effective but I'm willing to double the money to $60.00 for the prototype.

If I'm able to get this working I will be building a total of 6 immediately and then probably 10 or 20 more in the next year to give as gifts to friends and relatives.

Reply
2
Guru

Join Date: Jul 2008
Posts: 1688
Good Answers: 145
#3

Re: Help designing a light activated electronic circuit.

01/06/2015 4:37 PM

Seeming to have a hard $30 limit and declaring it to be a home project seems a little odd.

I would suggest looking thru Arduino and Raspberry Pi projects on the internet. I suspect that you may need to copy part of one project and part of another project to get what you need.

Having a $30 hard limit, having already consumed part of it on servo motors and considering using a $35 Raspberry Pi board seems like a bit of a mathematical/financial problem.

You can learn a lot from posted Raspberry Pi projects but the Pi is probably not a good choice for you. In order to avoid corrupting the file system (and OS) the Pi needs a clean shut down (typically with a halt command). There are projects on the internet to build circuits and pull a Pi pin down to safely shut down the Pi but that is adding even more complexity and cost to your project. As far as I know you can drop power on an Arduino all day long and never be at risk of corrupting the system. Thus, of the two boards you listed the Arduino is probably your better choice.

There are many other small boards available. In the past I have purchased several different items from http://www.microcontrollershop.com. Many other sources exist with Digikey and Mouser being common parts sources with some boards. Most if not all will require a little more effort on your part but a board with a microcontroller and a field of holes & pads for prototyping might hit your price point and allow you the mechanical advantage of having everything on one board.

__________________
Few things limit our potential as much as knowing answers and setting aside questions.
Reply Good Answer (Score 2)
Anonymous Poster #1
#9
In reply to #3

Re: Help designing a light activated electronic circuit.

01/07/2015 9:33 AM

Bruce,

The reason I put a self imposed $30.00 limit is because if it goes past that cost then it becomes more difficult for me to afford the parts to build these as gifts for my family and friends. I know that when I'm able to finalize the prototype and have it work as specified then I will know the hard material costs. I don't care about the time involved because I have plenty of spare time in the evenings. Especially since its so friggin cold outside, I have a small workshop set up in the spare bedroom.

Thank you for the information regarding the differences in the Arduino and the Pi. I will start with the Arduino because I do have one of their starter boards.

On eBay I have found lots of the electronic parts, CHEAP!

Arduino board - $6.00

R/C servo - $2.00

Servo speed controller - $2.00 (if needed)

All the sensors will probably be another $5 - $10

Granted all these parts are coming from Hong Kong or China but where else do they make these?

Reply
Guru

Join Date: Nov 2012
Posts: 633
Good Answers: 13
#10
In reply to #9

Re: Help designing a light activated electronic circuit.

01/07/2015 9:48 AM

You might check availability at 'sparkfun.com', they also have a cheaper posting method that involves UPS and USPS...

Reply
Guru

Join Date: Jul 2008
Posts: 1688
Good Answers: 145
#13
In reply to #10

Re: Help designing a light activated electronic circuit.

01/07/2015 1:26 PM

I'll second that. Sparkfun is another great resource.

__________________
Few things limit our potential as much as knowing answers and setting aside questions.
Reply
2
Guru
Hobbies - DIY Welding - Wannabeabettawelda

Join Date: May 2007
Location: Annapolis, Maryland
Posts: 7940
Good Answers: 458
#4

Re: Help Designing a Light Activated Electronic Circuit.

01/06/2015 10:52 PM

Personally, I think a microcontroller is overkill and unnecessarily complex. I'm running out of time as my wife wants me home (now) but the logic you describe could easily be implemented in good old 4000 series CMOS. You would just need to figure out the circuits for the light sensor and the moisture sensor. We do a leak detector circuit using just one comparator, a few resistors, and two strips of foil.

Horowitz's Art of Electronics might be an excellent place to start if you can't find a washing machine leak alarm circuit on some BB somewhere. Same with a photocell sensor circuit.

I'll check in again tomorrow.

Good luck with your quest.

Reply Good Answer (Score 2)
2
Guru
Hobbies - DIY Welding - Wannabeabettawelda

Join Date: May 2007
Location: Annapolis, Maryland
Posts: 7940
Good Answers: 458
#12
In reply to #4

Re: Help Designing a Light Activated Electronic Circuit.

01/07/2015 12:10 PM

Here is a circuit that detects the change in resistance across two electrodes due to wetness. When the resistance across the two inputs decreases to about 5Kohm or lower, the comparator will switch. The one meg in the feedback loop gives you the hysteresis. This is designed for leak detection in pressure vessels in sea water but when we test this circuit, a drop of ordinary tap water will trigger the circuit. Changing the 22.1K resistor will 'tune' the circuit for different trigger thresholds. You can save power by increasing the two 10K resistors but you can't go too high or the input bias currents will mess with your circuit. This is where bench experimentation will show you how much you can tweak this circuit. The 4.99K and 1K resistors on the output were just for current limiting and loading to prevent EMI from causing false positives. Given that you are power constrained, I would recommend a 100K output resistor or even 1M as input to a CMOS gate. That won't drain much power but will keep the gate from floating away.

Any old op amp will do but since you are battery operated, I would look for one with low power characteristics. The supply voltage doesn't matter so long as your op amp will work with 9V.

Good luck with your quest (and have fun).

Reply Good Answer (Score 2)
2
Power-User

Join Date: Nov 2012
Posts: 183
Good Answers: 6
#5

Re: Help Designing a Light Activated Electronic Circuit.

01/07/2015 3:47 AM

http://www.electronics-tutorials.ws/io/io_4.html

If you modify the light level sensing circuit in the above link, all sensing you want can be achieved.

Gajanan Phadte

Reply Good Answer (Score 2)
2
Guru

Join Date: Dec 2010
Location: North West England
Posts: 1170
Good Answers: 153
#6

Re: Help Designing a Light Activated Electronic Circuit

01/07/2015 5:39 AM

Light sensors; try searching "ambient light sensor" Osram make several with prices typically UK £ .08 to 1.2 each. Feed the output of the sensor into one input of a comparator chip. Feed a variable resistor into the other input. By varying the value of the resistor you can adjust the trigger point of the comparator.

Rain sensors; I made a few of these for automatically closing conservatory roof windows when it rained. Make a one sided PCB with a single narrow track that is as long as possible given the size of the PCB. I made mine in the form of a double spiral loop like an electric cooker hob element about 3" diameter. (They were visible to the public so they needed to look aesthetic to passers by). Plate the Track in gold. Fix a heater to the rear of the PCB with epoxy glue (I used four 3W wire wound porcelain enclosed resistors as the heater) Mount the PCB so that rain can fall on the surface, with individual droplets shorting parts of the track so the the resistance changes. Use a second comparator chip to compare the PCB resistance against a variable preset and trigger when it rains. Use the output of the comparator to switch on the heater so the the droplets of water are evaporated from the tracks. While it continues to rain new droplets will replace those that are evaporated. Then the rain stops the comparator will reset once all the residual droplets have evaporated.

Reply Good Answer (Score 2)
Guru

Join Date: Aug 2005
Location: Hemel Hempstead, UK
Posts: 5826
Good Answers: 322
#7
In reply to #6

Re: Help Designing a Light Activated Electronic Circuit

01/07/2015 5:58 AM

Just out of curiosity: why use a single track instead of two parallel tracks?

__________________
If you spend all your time looking for people and things to complain about: trust me, you will find plenty to complain about.
Reply
Guru

Join Date: Dec 2010
Location: North West England
Posts: 1170
Good Answers: 153
#16
In reply to #7

Re: Help Designing a Light Activated Electronic Circuit

01/07/2015 6:58 PM

With two tracks you would effectively be pulling the sensor track to ground or VCC so you get a large step change. This makes it more difficult to fine tune the balancing resistor to ignore false positives like over spray from a neighbors garden hose or high humidity.

Reply
Guru

Join Date: Nov 2012
Posts: 633
Good Answers: 13
#8

Re: Help Designing a Light Activated Electronic Circuit

01/07/2015 7:41 AM

Check out 'instructables.com', an Arduino Uno clone is as cheap as $10 US, an 8pin Atmel micro (AT tiny 45) that can output pwm for the servo's with analog and digital input for the sensors is about $1.45, it can be programed with the Arduino IDE (integrated development environment-free from Arduino.cc). Atmel chips have developed a world wide following similar to the way 8088 and MSDos did back in the '80's.

Reply
Guru

Join Date: Jul 2008
Posts: 1688
Good Answers: 145
#14
In reply to #8

Re: Help Designing a Light Activated Electronic Circuit

01/07/2015 1:27 PM

Agree, Instructables is another great resource.

__________________
Few things limit our potential as much as knowing answers and setting aside questions.
Reply
Participant
Engineering Fields - Electrical Engineering - New Member  Brief Background Message

Join Date: Jan 2015
Posts: 1
#11

Re: Help Designing a Light Activated Electronic Circuit

01/07/2015 11:58 AM

Suggest you consider the MicroChip PIC uP series of controllers, small, low power, low cost, programmable (for debug). Suitable for a single board and 9 VDC operation

Assembly language programming may be the difficult part (show stopper) if you have not done this type of work.

Reply
Anonymous Poster #1
#15
In reply to #11

Re: Help Designing a Light Activated Electronic Circuit

01/07/2015 4:58 PM

I will look at the PIC. I did some assembly language programming a LOOOONNNG time ago so I will have to look at it to see if its worth it.

Reply
Reply to Forum Thread 16 comments

Good Answers:

These comments received enough positive votes to make them "good answers".
Copy to Clipboard

Users who posted comments:

Anonymous Hero (1); Anonymous Poster (3); Brave Sir Robin (2); BruceFlorida (3); geraldpaxton (2); gmphadte (1); jhhassociates (2); Randall (1); rich2997 (1)

Previous in Forum: Diversity Factor   Next in Forum: MH EF18 Protection Relay Manual

Advertisement