Continue to Site

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.

  • 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 Tracker Circuit Is Giving Me Issues - Appreciate Anyone's Help

Status
Not open for further replies.
What if you run the each of the Op amp outputs thru (two) two input Nand gates. Attach opposing Op amp outputs for the second input of each gate.

I don't quite understand how to implement that, like I know what you are talking about, but am a little confused by your second sentence.

You said attach opposing Op amp outputs for the second input of each gate. Do you mean the source or drain of the FETs? If possible when you get time, could you possibly sketch up a basic schematic as that would help a lot :)
 
I wanted to avoid logic gates, since Q3 and Q4 need to have a fairly good 10V driving voltage.

We can do this with the other sections of the LM324. I'll draw something this weekend.
 
Here is what I meant:
solar_tracker_lo&#103.jpg

At Mneary's behest, took a look at the Nand logic datasheets and why they were bad.

Code:
            max input V        max I output
CD4011BM      15V Good         @ 10V <1ma       Poor current drive for Nfets

74HC00D         6V Bad         @5V +/-25ma      Poor voltage drive to Nfets
 

Attachments

  • solar_tracker_lo&#103.jpg
    solar_tracker_lo&#103.jpg
    6.3 KB · Views: 331
At Mneary's behest, took a look at the Nand logic datasheets and why they were bad.

Code:
            max input V        max I output
CD4011BM      15V Good         @ 10V <1ma       Poor current drive for Nfets

74HC00D         6V Bad         @5V +/-25ma      Poor voltage drive to Nfets

So you are saying you agree with Mneary that using logic gates are bad as well? Reason I ask is, before I try to implement your idea in my current circuit, I want to make sure it's worth doing or not lol :)
 
So you are saying you agree with Mneary that using logic gates are bad as well? Reason I ask is, before I try to implement your idea in my current circuit, I want to make sure it's worth doing or not lol :)
Yes, at least not without some additional components. I defer to Mneary's solution on this.

Also, the Nand logic I reccomended is not the best choice, because an OPA = 0 and OPB = 0 gives high outputs to the Nfets. As far as the logic goes the Exclusive OR logic would be better.

Exclusive OR Logic:
Inputs Output
A B X
0 0 0
0 1 1
1 0 1
1 1 0
 
Yes, at least not without some additional components. I defer to Mneary's solution on this.

Also, the Nand logic I reccomended is not the best choice, because an OPA = 0 and OPB = 0 gives high outputs to the Nfets. As far as the logic goes the Exclusive OR logic would be better.

Exclusive OR Logic:
Inputs Output
A B X
0 0 0
0 1 1
1 0 1
1 1 0

Oh yeah forgot about the xor. Hmmm so if I used the xor, would I implement it the same way you did the Nand gates but instead just use xor gates?
 
The op amps are being used as comparators. In this circuit, LM339 would be my choice. Basically, the LM339 would be a direct replacement for the LM324 except (1) the pin assignment is different and (2) the output needs a pull up resistor (I suggest 4.7k).

Once the circuit uses LM339, then we can use the two 'spare' sections to disable the motor when it's dark.

Diagram later.....
 
The op amps are being used as comparators. In this circuit, LM339 would be my choice. Basically, the LM339 would be a direct replacement for the LM324 except (1) the pin assignment is different and (2) the output needs a pull up resistor (I suggest 4.7k).

Once the circuit uses LM339, then we can use the two 'spare' sections to disable the motor when it's dark.

Diagram later.....

Sounds good :)
 
Would this approach be bogus? With the xor logic you keep from having both inputs on.
View attachment 39993

Hmmm I can give that a shot, but I'm assuming I should only consider implementing the XOR logic into my current circuit, and not the right most part of the circuit where you have the N-FETs, as that part is completely different from what I currently have correct? I also see "in front" of the XOR gates, you are using what seems to be either a 4K Resistor or 4.7K resistor? If so, is that something else I should implement into my current circuit?
 
Hmmm I can give that a shot, but I'm assuming I should only consider implementing the XOR logic into my current circuit, and not the right most part of the circuit where you have the N-FETs, as that part is completely different from what I currently have correct? I also see "in front" of the XOR gates, you are using what seems to be either a 4K Resistor or 4.7K resistor? If so, is that something else I should implement into my current circuit?
To be clear, the xor logic and 2n7000 nfet gate drivers are being proposed. If you use Mneary's suggestion of LM339 comparators, rather than the op-amps, then pull ups (3.3k or 4.7k) are required on the comparator outputs.

I am suspicious of the op-amp (or comparator) output drive being able to drive the power Nfets (i.e. h-bridge), thus the 2n7000's.

.
 
OK, finally got caught up. Here's a circuit that I've been thinking about. I've been trying to simplify it, but this is the best I could do. Note I change dot LM339 comparators, and since they are open collector outputs I had to add pull up resistors (R11 and R12).

The two outputs, LEFT and RIGHT go to the MOSFET gates Q3 and Q4 depending on which direction they actually move the motor.

How it works:

R9 and R10 form a voltage reference of about 400mV. I chose this as my arbitrary darkness criteria. Reduce this by decreasing R10.
R11 and R12 provide the gate voltage to the MOSFETs. This is not fast enough for high speed circuits but is perfect here.
R5 and R7 (and similarly R6 and R8) prevent their respective comparators from triggering on tiny changes of light. The values shown of 10K/100K make that criteria about 9%. If B and A are within 9% of one another the motor rests. You can reduce this band by decreasing R5 and R6.

Logically:
U1B is LOW if B isn't substantially brighter than A.
U1D is LOW if B < 400mV, that is, if B is too dark.
If neither U1B nor U1D are LOW (That is, B is bright enough AND B > A) then RIGHT is pulled up via R12 turning on the MOSFET.

U1A is LOW if A isn't substantially brighter than B.
U1C is LOW if A < 400mV, that is, if A is too dark.
If neither U1A nor U1C are LOW (That is, A is bright enough AND A > B) then LEFT is pulled up via R11 turning on the MOSFET.
 

Attachments

  • Solar-H3..png
    Solar-H3..png
    11.5 KB · Views: 438
OK, finally got caught up. Here's a circuit that I've been thinking about. I've been trying to simplify it, but this is the best I could do. Note I change dot LM339 comparators, and since they are open collector outputs I had to add pull up resistors (R11 and R12).

The two outputs, LEFT and RIGHT go to the MOSFET gates Q3 and Q4 depending on which direction they actually move the motor.

How it works:

R9 and R10 form a voltage reference of about 400mV. I chose this as my arbitrary darkness criteria. Reduce this by decreasing R10.
R11 and R12 provide the gate voltage to the MOSFETs. This is not fast enough for high speed circuits but is perfect here.
R5 and R7 (and similarly R6 and R8) prevent their respective comparators from triggering on tiny changes of light. The values shown of 10K/100K make that criteria about 9%. If B and A are within 9% of one another the motor rests. You can reduce this band by decreasing R5 and R6.

Logically:
U1B is LOW if B isn't substantially brighter than A.
U1D is LOW if B < 400mV, that is, if B is too dark.
If neither U1B nor U1D are LOW (That is, B is bright enough AND B > A) then RIGHT is pulled up via R12 turning on the MOSFET.

U1A is LOW if A isn't substantially brighter than B.
U1C is LOW if A < 400mV, that is, if A is too dark.
If neither U1A nor U1C are LOW (That is, A is bright enough AND A > B) then LEFT is pulled up via R11 turning on the MOSFET.


Wow you are one smart guy! lol. I'll try to implement this into my current circuit to see how it goes and get back with you guys.
 
Alright, I gave it a go, but I ran into 1 issue when simulating it.

It appears that my multimeters will always consist of the same values no matter what state A and B are in. Refer to the pictures below:

screenshot.1..jpg

screenshot.2..jpg

screenshot.4..jpg

screenshot.3..jpg

Edit: It appears I'm using the wrong IC, don't know how that happened, but will make the change and see what happens.

Update: I made the change to the IC to the correct IC, LM339D, but I received the same results.
 
Last edited:
Q3, Q4 gates are on the wrong end of R11. R12.

Oh okay :)

So here is the new test and I think it's right on point to what we are trying to achieve:
screenshot.3..jpg

screenshot.1..jpg

screenshot.2..jpg

screenshot.5..jpg

1 Question though:

1. Just to confirm, even though my multimeters are getting a reading of 11v on both sides when A = B, my motor isn't working against itself, and also isn't wasting power as well? Or is it that "linear actuator" motors and motors similar to it are built so that they only pay attention to the difference of electrical current, and if that difference is not great enough, the linear actuator motor will not activate?
I believe you briefly answered this question before, however, I forgot to ask, if there is no light shining on the A & B, where is the 11v coming from that my multimeters are picking up in the attachment above?

Like if it's reading 11v, that means 11v is running through it right, and that I'm using 11v of power when I do not need to which would result to the battery draining quickly? However, if my theory about the linear actuator above is correct, there will be no power loss or battery drainage when it is night time or when A = B.
 
Sorry, with the XOR circuit, both mosfets turn on whenever the comparators are different from one another.
Aaaaaggghhhh! Back to the drawing board, or truth tables, it's been a while.

You guys are way too fast. Thats a lot of logic accomplished with just one quad comparator!!:)
 
When both MOSFETs Q3 and Q4 are OFF, then resistors R1 and R2 pull up their drain terminals to 11V (12V). That's how they turn Q1 and Q2 OFF (by setting the Gates of Q1 and Q2 equal to their Source terminals.)

A voltage is different from a current. For a current to flow (e.g. through the motor) the voltages must be different. One end of the motor would be about 12V while the other is about 0V. If both ends of the motor are at about the same voltage, there is no current; the motor receives no power.

The way your meters are hooked up is nice for troubleshooting, but if you really want to understand what the motor sees hook both ends of a meter to both ends of the motor. The motor doesn't know what "ground" is. It's a notation for our convenience as it gives us a reference point. And simulators are homeless without a "0V" to return to.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top