Solar guider

Thread Starter

rsfoto

Joined May 14, 2013
134
Hi,

I read this post

http://forum.allaboutcircuits.com/showthread.php?t=67757&highlight=dark+activated+switch

and I would like to do something similar but instead of activating a relay or lightning up LEDs I just want to open or close an output for guiding a telescope mount using an otptocoupler. Yes again an optocoupler due to ground loop issues.

The outputs have +5volt and when closing against Ground the motors move in a certain direction.

I want to use 4 LEDs or phototransistors ¿ What would be better or is easier to integrate into the circuit from above thread ?



I can get here fotoresistors 9P5-A or 9P5-1L or fototransistors PT1302B/C2 or PT331C but both of these are Infrared. Would heat affect their efficiency ? The light source is the Sun.

Also I read somewhere that I can use normal Leds as they produce ~ a voltage of 1.7v but did not find out the current they produce and I do not want to integrate a current amplifier as this would make it to complicated I guess.

I will try to post in the afternoon a hardware and a schematic circuit drawing of how I imagine this.

Telescope mounts do behave erratic as they have a so called periodic error (Movement where the speed looks like a sine wave, faster / slower over one turn of the worm) which means they can be tracking ahead or behind the object in question due to minimal mechanical tolerances with the WORM/GEAR drives.

Anyone here an amateur astronomer :D who would like to help to build a standalone solar guider.

I also saw this circuit here

http://solartracker.greenwatts.info/solar_tracker_cds_new_theory.htm

As far as I understad that circuit, voltage or resistance or current is compared and according to the diffrence the motor moves in one direction or the other which is what I want by acticating the est or west or North or South switch of the guide input.

I think I am already answering my own question but all additional tips are welcome.

Thanks :)
 

wayneh

Joined Sep 9, 2010
17,498
... I do not want to integrate a current amplifier as this would make it to complicated I guess.
Not at all - op-amps are your friend. They may seem daunting to a first timer, but they are well worth the effort. Cheap and easy. A comparator is a specialized version of an op-amp, and I think may be what you want to focus on. It's designed to have two states, on or off, left or right. An op-amp is used as a comparator in that circuit you linked.

Oops, I looked again and that last statement is incorrect. I believe that circuit gives proportional response, not just full left or full right.
 

Thread Starter

rsfoto

Joined May 14, 2013
134
Oops, I looked again and that last statement is incorrect. I believe that circuit gives proportional response, not just full left or full right.
Thanks, and that means that I have to find a way to have full signal or no signal at all on one of the 2 light sensors ¿ right ?

On the other side if it is proportional it would not matter either as the smallest signal would switch the input. I do not need current at all at the input, as far as I know, I just need 5 volt or nothing to activate the motors.

For example at the input I can even use a simple handbox with 4 press button switches and the mount moves just by pulling down the +5V signal to ground.

Look here http://www.docgoerlich.de/GeminiL4UserManual.pdf on page 125. They talk there about the old and new versions and the difference is that the old version used -5V instead of the new which now uses +5V.

Look also at the page #1 of that instruction manual where you see an image of the Control Box. On the upper left corner you see a RJ45 connector labled Hand Control. For that port I did build a hancontroller with a JOystick to manually move the mount when necessary for adjustment purposes.

 
Last edited:

wayneh

Joined Sep 9, 2010
17,498
I'm not sure I understand the question. The circuit will detect any tiny difference between the sensors and amplify it into current in the motor, one direction or the other. It will keep doing that until it sees no difference, and will hover there witt little or no current to the motor. As the sun angle changes, the sensor response will change and the motor will move again.
 

Thread Starter

rsfoto

Joined May 14, 2013
134
I'm not sure I understand the question. The circuit will detect any tiny difference between the sensors and amplify it into current in the motor, one direction or the other. It will keep doing that until it sees no difference, and will hover there witt little or no current to the motor. As the sun angle changes, the sensor response will change and the motor will move again.
Thanks. What I really need is NO current, or maybe just a tiny current to activate an optocoupler to switch one of the 4 lines or not eg. just a signal that either both sides are even or not.

So what I can do, will have to find out how, to put at the output a current limiting resistor so the LED of the optocoupler does not fry.

Will keep reading about this op-amp. I assume I can somehow limit the output current to maximum somehow.

Lots of reading for me.
 

wayneh

Joined Sep 9, 2010
17,498
If you want the optocoupler's LED to be either on or off, skip the general op-amp for now and focus on a comparator. Like a baby with a hammer, I use the LM339 quad comparator for all sorts of things and it would work fine here too.

Each comparator will compare the voltage on its two input pins (the two voltages being compared need to be within the power supply rails of the comparator) and set its output either low or high. It can sink current to ground in the low state, but needs an external pull-up resistor to supply current in the high state.

If you only need to power a single LED with, say, 5mA of current, you can route supply voltage to the LED (through a current limiting resistor) and allow the comparator to complete the current path to ground, turning the LED on. An external transistor is needed for higher current loads like bigger lights, relays, motors and such. It can be a little confusing that the high state of the comparator turns off the LED and vice versa, so don't be surprised to get it wrong at first. But that just means swapping the inputs or adding the transistor, which restores the logic.

Once you get the functionality you want, use the extra comparators for other for things, like detecting connections and so on. They can easily detect a human touching a wire, for instance, or when a cable is connected to an adapter port.
 

Thread Starter

rsfoto

Joined May 14, 2013
134
Hi Wayneh,

Thanks a lot. Now comes the dificult part to assemble a schematic circuit taking into considerations your tips.

Let me allow to think loud :) I have a +input and a -input and for both I have one output. Now what confuses me is the term Non Inverting and Inverting input.

Does this something have to do with the polarity I apply on the corresponding input ?

OK let me say I apply +1V at the +input (Non inverting) and +1V at the -input Inverting) ¿ Is then resulting voltage difference for the comparator 0V ? and nothing happens at the output. Does that mean that the inverting input changes the polarity of the +V input and so the sum is 0V.

I want to use LEDs as the sensors as they produce a voltage when in sun light.

If this is nonsense what I wrote please tell me and I will keep investigating how that works what I am doing at the monent anyway.
 
Last edited:

Thread Starter

rsfoto

Joined May 14, 2013
134
Hi,

Does the attached circuit make sense ?

As read, a LED delivers 1.7 volt at full sunshine so far but do not know the characteristics of the voltage curve when the light intensity changes and therefore the reference voltage is just an assumption.

Do I need a resistor between Vout and V+ at the LM339 and if yes what does it do ?

I hope this is no nonsense.

Could it be possible to use the voltage of a LED for V+ ¿?

Thanks
 

Attachments

Last edited:

Thread Starter

rsfoto

Joined May 14, 2013
134
Do I need a resistor between Vout and V+ at the LM339 and if yes what does it do ?
Well having informed myself a bit more about the resistor between Vout and V+, answering my question myself, yes it looks like I need one as Pullup so the LED of the optocoupler is activated.

On the other side another question came up looking at my circuit. What is the voltage at the output ? If I feed +5v into V+ I assume I get ~+5V at Vout and that would damage the LED pd my optocoupler, so I guess I need another voltage splitter to get those +5V down to +1.3 volt for the LED eith the necessary mA to make it shine.

I also read that the Vout is either ON or OFF by just having a very small voltage difference between Vin + and Vin -, so could it not be possible to just connect the TTL Output directly to this Vout connection ?

I will ask the telscope mount maker if his TTL Outputs are optically isolated.

I am going to buy all the pieces for my circuit and start experimenting to see what makes this LM339 in regard to the Vin+ and Vin -

I think that is the only way to understand it a bit better ...

All tips are welcome. Thanks
 

wayneh

Joined Sep 9, 2010
17,498
You're making progress! Some comments:
• You'll want a variable resistor on the input so that you can adjust the reference voltage, and therefore the light level that will trigger the flip. Once you get everything working, you might replace the variable resistor with fixed values, but being able to tweak it will be useful, so I'd plan to leave it there. You can put the opposite poles of a, say, 10kΩ pot onto the power rails and use the wiper to give you your set point.

• You want the comparator to control the path to ground for your OC's LED, pin 2 I think? So pin 2 can connect directly to the comparator output. (The current-limiting resistor can be in between the LED and the comparator, or between the LED and V+).

• The pull-up resistor on the output won't be necessary, since the LED will turn off when the path to ground is removed, when the comparator goes high. It WILL be needed if you need to use an external transistor, but I believe you do not in this case.

• You don't need (or want) any resistor on the input from the sensor LED to the comparator. The comparator itself has a very high internal impedance and almost no current will flow into it.
 

wayneh

Joined Sep 9, 2010
17,498
What is the voltage at the output ? If I feed +5v into V+ I assume I get ~+5V at Vout...
It doesn't really "output" a voltage. It's more like a switch connected to ground. The switch can make the connection to ground (when in the low state) or break that connection in the high state. It does not source current.
I also read that the Vout is either ON or OFF by just having a very small voltage difference between Vin + and Vin -, so could it not be possible to just connect the TTL Output directly to this Vout connection ?
I don't fully understand this question but I think yes, you can generate a TTL output from the comparator. Certainly you can generate a "digital" on or off output with the "on" voltage being anything up to your supply rail voltage . I think the definition of TTL may require a current source capability greater than the ~3K pull-up resistor will allow, though, so an output transistor would probably be necessary to generate a true TTL signal.
 

Thread Starter

rsfoto

Joined May 14, 2013
134
Dear Wayneh,

I really appreciate your great help. Yesterday due to reading so much about comparators I gor a headache :D

Yes I bought some variable potentiometer, those little brown 3 legged bugs. That is also how I did other experiments. The values in my circuit was just a calculation in order to the ratio to bring down 5v to 1.5 :)

I will also connect one LED to + and - input and by changing the light conditions over each LED see what makes the output by connecting there a LED to turn ON or OFF.

It is going to be an interesting weekend.

Sorry if somtimes my question are not understandable but bringing my ideas to paper is sometimes a bit hard. English is not my mother tongue it is more German and Spanish :confused:

Will keep you informed what fries and what not :D
 

Thread Starter

rsfoto

Joined May 14, 2013
134
Sounds like fun! Mastering a new skill or adding a tool to the mental toolbox is always rewarding.
Yes it does. Especially the success we had with the USB cable switch for my friends Observatory. The Mosfet solution he told me wis working great.

Now you wrote
• You want the comparator to control the path to ground for your OC's LED, pin 2 I think? So pin 2 can connect directly to the comparator output. (The current-limiting resistor can be in between the LED and the comparator, or between the LED and V+).
I still have to digest this. A is Anode PIN1 and K is Kathode PIN2 on my OC and sitll need to understand how the Outout opens the K to the ground and from where do I get the voltage and current for the OC LED ¿?
 

Thread Starter

rsfoto

Joined May 14, 2013
134
Yes it does. Especially the success we had with the USB cable switch for my friends Observatory. The Mosfet solution he told me wis working great.

Now you wrote


I still have to digest this. A is Anode PIN1 and K is Kathode PIN2 on my OC and sitll need to understand how the Outout opens the K to the ground and from where do I get the voltage and current for the OC LED ¿?
Just after writing this and having read this page
http://home.cogeco.ca/~rpaisley4/Comparators.html
I see that the LM339 output is a switch against ground. Did I get that right ?
 

wayneh

Joined Sep 9, 2010
17,498
I see that the LM339 output is a switch against ground. Did I get that right ?
Yup. That means the other side of the load is connected to the power supply. That's where the juice for the LED comes from, NOT from the comparator itself.

You can often use an op-amp as a comparator to overcome that, if it's a problem, because an op-amp can both source and sink current. But that approach can have other problems and dedicated comparators are better in some ways than any op-amp alternative.
 

Thread Starter

rsfoto

Joined May 14, 2013
134
Well, just finished setting up on the breadboard a test circuit using 3 potentiometer, one for the LED power supply and 2 potentiometer for the comparator inputs.

Turning the potentiometer of either input make the led turn ON or OFF.

It is the first time I make such a circuit and it did work :eek:

Look at the schematic and the set up images

I now for the experts thyis is a piece of cake but for me it was a huge step for understanding this conmparators. Now I can keep working on it and develop my idea.

Thanks Wayneh for your great support :)

BTW, the LED i bought Bright green water clear plastic do develop in more or less cloudy environment about 450mV. Unfortunately the sky is covered with clouds but I guess even so I can integrate a LED and play with the circuit. Artificial light does not increase the voltage near to the values I got with a cloudy sky ¿? I guess some IR does have an influence here.

Apart from this experience I have made another one. The POT for the LED is 10K and allegedly the LED is a 3,2V and 100mA spec. It lights up like hell even working at 2.2V and according to my calculation with just 1.7mA ¿? But OK as long as it shines and does not fry everything is OK
 

Attachments

Last edited:

wayneh

Joined Sep 9, 2010
17,498
It is the first time I make such a circuit and it did work :eek:
Even a blind dog finds a bone now and then! ;) But good work being careful and methodical. We see so many here that make waste from haste.
Thanks Wayneh for your great support :)
You're welcome. That's why the AAC members are here.

BTW, the LED i bought Bright green water clear plastic do develop in more or less cloudy environment about 450mV.
Very interesting, I'd heard something like that before but never really quite believed it. Any idea how much current? I mean, it may be producing an even higher voltage that is brought down by your measurement of it with your meter. Maybe try to measure voltage with a 1MΩ or a 100kΩ resistor across the leads and see it if it drops still more. Of course a conventional solar cell like you see in solar landscape lights are nearly free these days, so I'm not sure what I would do with this information except marvel at it.
 

Thread Starter

rsfoto

Joined May 14, 2013
134
Hi Wayneh,

Well at the moment I am just getting a voltage of ~ 75mV per LED. If I connect 4 of them parallel the voltage sums up and I am getting so a max at the moment with clouds ~220mV. Now it is less, because it is even darker then when I started and BTW we have no electricity at home and I think my UPS is just before giving up :D

According to the spec of the LM339 it accepts an input voltage of -0.3V up to 36V if I did read correctly the datasheet so I think I can risk and make a test with 4 LEDs in parallel with the cathode connected to ground and Anode connected to Non-Inverting input.

I hope nothing blows up. :eek:

I have a very cheap multimeter here as the better one is in the Observatory was not able to measure any current. The lowest measument adjustment is 200μA and even there nothing appears.
 

Thread Starter

rsfoto

Joined May 14, 2013
134
OK, I replaced the pot of the Non-Inverting input through a LED and it works.

Having measured the pot values of the Inverting input the Voltage which is compared is around 1V. Everything ok. Adjusting the pot of the Inverting input makes my LED go ON or OFF so there is a comparation going on and the Output goes either High or Low.

After that I said OK, let me take out the pot of the inverting input and put a LED there hoping that it works (I measured a few LED under same light conditions and they all varied a bit in the produced volatge so I thought there would be a difference and something would happen) as expected but NO. Even capping one LED totally so it does not get any light did not change the status of the output LED.

I based my assumptions on this circuit

http://solartracker.greenwatts.info/solar_tracker_cds_new_theory.htm

Will have to investigate further.
 
Top