• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

solar circuit critique please!

Status
Not open for further replies.

Dr_Doggy

Well-Known Member
Here is my circuit, but I hope it will hold up off the bench and charging itself!
Any advise to make it better?

some facts to understand my schematic better:
SV1:
pin 1 is 5v solar input, 1/2 watt i think( it pushed out 10mA on a test today, but it was cloudy)...
pin2 = 2 or 3xAA batteries in series
LZR182:
substitute to make holes for common anode RGB LED (i realize polarity is wrong, will fix in hardwire)
T1:
TSOP IR receiver equivalent
LED1:
IR LED, driven at 40khz

solar.png
 

JLNY

Active Member
Driving a BJT with an astable multivibrator like that may result in frequency innacuracy and/or uneven duty cycle due to loading on one side. a small signal MOSFET or JFET might work better. Also, will the PIC be able to source enough current to drive the astable? it may be necessary to have the PIC drive a transistor as a switch to turn the astable circuit on, or you might be able to output the 40kHz directly from the pin depending on the clock frequency you are running the PIC at.
 

Dr_Doggy

Well-Known Member
TY, and good eye, I will replace with a mosfet, the multi-vibrator only runs on 11mA, so I am confident that it will be ok, although I did notice on a quick test it takes a few pulses to "ring up". Also I also wonder if low battery voltage could cause problem with frequency here, and whats a good fix.?
And! I just noticed that the IR LED is powered by RC5 too, so i will fix that and move that node to the 5v rail, even though i believe the port can handle up to 500mA.

I did think about direct oscillation to IR from pic, but decided to go with hardware driver and use the pic for other processes... although maybe it would be a good idea to replace multi-vibrator with another second micro-controller?

A huge question that is dawning on me though is about the solar and battery circuit. my calculation is that on a 1/2 [email protected] panel i will get about 100mA out of it.
the driver is 55 mA, the RG&B LEDs are about 60ma, the IR LED another 20ma or so... plus another mA or so for the PIC and R7 + R8.... which totals 136mA. So i will need 12 hrs (of full light) charge time for 8hrs of run time(at full brightness), does that sound right? maybe it would help to increase the values of R1&R4 to 10k too?

Also with a 5v panel plus a diode, charging 3 series batteries to 4.5v may not be ideal.... but only 2 batteries is [email protected] charge and may not be enough to illuminate the LEDs ... any thoughts on how to handle this?

also what is a good IR LED to use for this, I am splitting the IR beam in to 4 and i would like to have a range of 1 or 2 meters per beam?

forgot to add parts list, I will add it to original post to-nite....
 

JLNY

Active Member
TY, and good eye, I will replace with a mosfet, the multi-vibrator only runs on 11mA, so I am confident that it will be ok, although I did notice on a quick test it takes a few pulses to "ring up". Also I also wonder if low battery voltage could cause problem with frequency here, and whats a good fix.?
And! I just noticed that the IR LED is powered by RC5 too, so i will fix that and move that node to the 5v rail, even though i believe the port can handle up to 500mA.

I did think about direct oscillation to IR from pic, but decided to go with hardware driver and use the pic for other processes... although maybe it would be a good idea to replace multi-vibrator with another second micro-controller?

A huge question that is dawning on me though is about the solar and battery circuit. my calculation is that on a 1/2 [email protected] panel i will get about 100mA out of it.
the driver is 55 mA, the RG&B LEDs are about 60ma, the IR LED another 20ma or so... plus another mA or so for the PIC and R7 + R8.... which totals 136mA. So i will need 12 hrs (of full light) charge time for 8hrs of run time(at full brightness), does that sound right? maybe it would help to increase the values of R1&R4 to 10k too?

Also with a 5v panel plus a diode, charging 3 series batteries to 4.5v may not be ideal.... but only 2 batteries is [email protected] charge and may not be enough to illuminate the LEDs ... any thoughts on how to handle this?

also what is a good IR LED to use for this, I am splitting the IR beam in to 4 and i would like to have a range of 1 or 2 meters per beam?

forgot to add parts list, I will add it to original post to-nite....
All very valid concerns. You will definitely want to shave off as much current as possible to give it the longest run time even if light conditions are not ideal.

A multivibrator definitely will take a few cycles to reach full amplitude. I don't know if that is an issue for your application or not. The frequency of the oscillation is mostly based on the phase shift of the two RC delay circuits, so it should be relatively frequncy stable vs. supply voltage, but it may eventually be affected if the voltage starts to get very low. It probably wouldn't be too hard to test the multivibrator on a variable power supply to see if the frequency starts to change or just cuts out entirely below a certain voltage, keeping in mind that the IO pin of the PIC may not output at the full supply rail voltage for the full circuit

At 40kHz with a relatively low input capacitance FET like a 2n7000, it should be no issue to raise R1 and R4 to 10k, although you'll probably also want to adjust R2, R3, and C1-4 accordingly. For a 2n7000 with a 60pF input capacitance, I estimate that you could probably go as high as about 22K or so on your collector resistors before you started to see third harmonic rolloff on your square wave due to the input capacitance. Those multivibrators don't really give a very sharp square wave to begin with, though.

Certainly with the increased resistance for R1 and R4, the current draw will be pretty minimal, so if you need the multivibrator to be "instant-on", you could try just running the multivibrator all the time directly from the supply rail and instead connecting RC5 to R5 so that the IR LED will only light when RC5 is high, even though the square wave vibrator is still running.

By the way, what are the functions of D3 and D2? Actually, um... what is the function of the circuit as a whole? Maybe I missed something, but I haven't actually worked out what the circuit does... :oops:

Also, for 3 batteries in series, 4.5V shouldn't be a major issue. I'm assuming that you are using NiMH-type rechargeable cells? You could always try a 4.2V lithium cell, but then you have to deal with the issue of charge regulation and protection on the cell.
 
Last edited:

Dr_Doggy

Well-Known Member
I will definitely cut the IR diode over to the 5v rail then, not worried about the multi-vibrator so much, as it will hardly ever be used better to just shut it off, relativity speaking, and i will watch for frequency drift... as long as it is able to trigger the TSOP im happy. I can easily compensate in code to add a few extra pulses.
but i am confused about adjusting R2, R3, and C1-4 accordingly.... I thought the frequency(38khz) was independent of R1 and R4 .

as for battery i double checked, definitely NIMH, would love lithium, but not the extra expense! Although i thought AA batteries were 1.5v ea , these ones are 1.2v on the label, so that is good for led and charger!

OK, so , D2 & D3, I found the circuit on the web for an arduino, this is so the PIC's ADC can read the voltages at PINS 1 & 2, .... maybe i read the function for that circuit wrong on the website i cant find anymore, but funny cause as i look at it now the diode should clamp output to 0.7v, but actually I am able to get my VCC and solar values within a range of 0-128(ish) in code and detecting shadows without a problem.

As for the application in whole, as much as i want to brag to everyone, i gotta keep it on the DL for a little while longer but I will post more as soon as i can!

For now all i can say it will be "the next revolution in technology!"(its not for toaster) ... and why doesn't my toaster have a computer in it yet!

Also I will upgrade to 2n7000 thnx!
 

JLNY

Active Member
R1,R4, and C1-4 are effectively what sets the RC time constants of the oscillator, so the frequency will be very dependent on R1 and R4. Your capacitance values will need to be chosen in order to get the desired output frequency. R2 and R3 will set the bias currents and are not as critical to the frequency. You will probably want to build up a prototype on a breadboard to test out what works and see how much it varies with changes in supply voltage. If you have an oscilloscope, you will probably want to look at the output to measure the frequency more easily. There might also be specs in the datasheet for your IR detector that will say how much frequency variation it can tolerate.

Looking at it again and looking at the datasheet for the PIC16F676, think I understand how D2 and D3 are being used to read VCC. If you are running the ADC to use VDD as its reference voltage, then the fixed 0.7V being read at the diode would change in magnitude relative to the reference as VDD got lower. A bit unintuitive at first, but it is actually a clever way to do it. Some PICs have an option to use a fixed internal reference voltage for the ADC reference, but it seems that the PIC16F676 does not have an internal reference, so your current method works fine.

NiMH rechargeable batteries are 1.2V nominal, but can be charged to a maximum of 1.5V, hence why they can be used as substitutes for alkaline AA batteries. So a 4.5V max charging voltage works out just fine. NiMH batteries are also convenient for a solar application as they can be trickle-charged at a low current even when full, unlike lithium batteries which need to have the charge current completely cut off once fully charged.

The next revolution in technology? Hehe, a bold claim. I like it, and I wish you luck!
 

Pommie

Well-Known Member
Most Helpful Member
I don't really understand what the circuit is doing but it appears to do a couple of things,
Produce a 40kHz IR output,
Read a 40kHz IR detector,
Light a couple of LEDs,
Read some voltages.
I'm confused why you don't generate the 40kHz signal with the pic, drive a 2n7000 to light the IR LED. Note the LEDs need to be pulsed at a high current >50mA to get a decent range. However, if you are sending IR signals then it should only be lit about 30% of the time so an average of 16mA.
If you tell us what it's doing we could probably suggest a circuit that consists of Pic, 2n7000, IR LED, normal LEDs, resistors and IR detector.

Mike.
 

Dr_Doggy

Well-Known Member
yup that's all it does! but not much out there that is available!

I am not generating direct from pic for 2 reasons:
1) so the IR LED cannot stay on if/when the pic stalls during debugging and the output is left on.. less chance of burning it out!
2) I struggle with accurate timing already, as talked about indirectly in another thread, this will also alleviate programming space that I am starting to run out of as well on this little pic

OHya, also I am actually using a PIC16f688, the PIC16F676 was just used in eagle since it was the best equivalent I could find.
 

Dr_Doggy

Well-Known Member
"A bit unintuitive at first, but it is actually a clever way to do it." --- thats what i said!

"The next revolution in technology? Hehe, a bold claim. I like it, and I wish you luck!" --- ok, maybe I'm just a bit excited here, but it will definitely add a new variety to the market for ppl who like "flashey" things!
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top