for eagle user and programmer

hi, I am new to arduino. currently working with discrete components. see attached schematic. I will do my best to explain how it is used and what I need designed and programmed. some patience on your part will be required as I am relatively new to electronics in general.

as you can see it starts with a LDR and comparator circuit because I chose not to have power going to anything at all till dark. the only thing running during the day is the LDR circuit.

when dark arrives the lm339 opens the circuit and allows power to go to a PIR and to a clock. where (2) things happen. the clock starts to count down to 30 minutes. at 30m it sends a 12s high signal to the base of Q4 which in turn sends 5v reg to load (30mA) for 12s. the clock resets itself and continues as long as it is dark.

also at night the motion sensor when triggered also sends a high signal to the base of Q4 for approximately 12s, which again sends 5v reg to load hopefully for 12s. I say hopefully because the PIR can not be fine tuned to hit exactly 12s. it has a lot of drift.

i have been told you CAN turn on an arduino using and LDR? what i do not know is if it would need to be a separate circuit like the one designed or if there is a way to plug an LDR into an arduino.

the real estate available is 2" x 1.75" component size 0805, arduino tiny? see UPDATE that will simply plug in to a piggy back, the board will also include a 12 pin buss. for LDR, PIR +-o/p, PWR out GND, etc. HOWEVER>>>EDIT the buss size may change because of the inputs and outputs available on the arduino.

please note this not an experiment. simply transitioning from analog to a micro processor. nothing needs to be changed.

at dark the LDR opens circuit and allows power to the arduino

arduino turns on PIR, pir now set to 1s high arduino controls power to load, 12s, WITH a 5 to 10s pause BEFORE accepting another high from PIR. (otherwise it would just go , on/on/on/on/on)

arduino starts a/the clock, counts 30m, sends power to load 12s/repeat

at day light arduino stop, PIR stop, clock stops because the LDR is acting as a switch.

EDIT>>> i hope this is enough info to determine if you can perform this request, please feel free to ask any questions if not.
EDIT UPDATE: i would like to use the arduino nano or the micro as it will fit in the component box and they have mounting holes. i will update this over the next day or so to make sure you have all the needed info before deciding to take this job. please put in a buffer to your offer as i am sure that this will not be accomplished in the first go round. i am sure there will be something that will require a slight change or adjustment to work as requested.

note i believe the reg circuit of my analog design will not be required (just a note) i believe if reading correctly arduino has a built in volt regulator called the RAW pin which will regulate my 9v power supply as required to run the arduino. 5v out of the arduino will run my other components without issue. i will provide an engineers drawing of the board dimension for the gerber file for you to follow, hole placement for stand offs, position of the arduino, pin buss, where required and if required, knock outs for wire pass through and the likes once it has been established you have the ability to complete the project.

i look forward to working with one of you soon. payments will be made in US dollars.

Light&PIR&Manual-switched-5VregRevised2[1].gif

That's not a great way to go about the problem, as you have the LDR circuit always on.

You would normally put the 9V straight through an ultra-low queiscent current 5V regulator to
a bare bones microcontroller circuit. Use sleep and watch-dog timer to only wake up and
sample light levels every 1/4 hour or so for a millisecond.

Advantage: fewer components needed (you'd replace the LDR with a photodiode to
an analog pin, thus drawing no power while sleeping).

thank you for the input, as stated I am new to arduino. in fact only 9 months of any sort of electronics. my schematic (analog) went through numerous changes, it does however work very well. I will research your suggestions. simpler is better.

yes the ldr runs all the time, but nothing else. well, till dark

thanks again, fred

Light&PIR&Manual-switched-5VregRevised2[1].gif