muzakyo, I found this .txt file I saved from a couple of years ago. I thought you might be interested because it looks like the same code you are trying to use but has been modified since your version.... Enjoy...
muzakyo, I found this .txt file I saved from a couple of years ago. I thought you might be interested because it looks like the same code you are trying to use but has been modified since your version.... Enjoy...
Hmm, I took a look at the code, but see no check to stop the motors when in a balance of the sensors (if they were moving).
Maybe this will help:
This is an idea, not tested.Code:greater: 'greater routine b2 = b0 - b1 'find the difference if b2 > 10 then cw 'is it within the range? if not go to clockwise/ solar panel facing west low PORTB.0 'pin portb.0 low /stopping the solar panel for moving low PORTB.1 'pin portb.1 low / stopping the solar panel for moving goto start 'if it is in the range,do it again lesser: 'lesser routine b2 = b1 - b0 'find the difference if b2 > 10 then ccw 'is it within the range? if not got counter clockwise/solar panel facing east low PORTB.0 'pin portb.0 low /stopping the solar panel for moving low PORTB.1 'pin portb.1 low / stopping the solar panel for moving goto start 'if it is in the range, do it again
Ioannis
Ioannis , The line begining with "Start", the first thing the program goes is disable the motor outputs.....
Dave Purola,
N8NTA
Ooops yes. You are right.
On the other hand, 100ms isn't too litlte for a motor to start and move the panel?
Ioannis
Ioannis, Yes I do beleive 100 milliseconds is to short of a period to operate the motor BUT, I didn't write the code... I only regergitated it from some old records I had for Muzakyo...
Dave Purola,
N8NTA
"The line begining with "Start", the first thing the program goes is disable the motor outputs....."
i think that can be apply to my proramming.... the function is just like the proramming ioannis write....
greater: 'greater routine
b2 = b0 - b1 'find the difference
if b2 > 10 then cw 'is it within the range? if not go to clockwise/ solar panel facing west
low PORTB.0 'pin portb.0 low /stopping the solar panel for moving
low PORTB.1 'pin portb.1 low / stopping the solar panel for moving
goto start 'if it is in the range,do it again
lesser: 'lesser routine
b2 = b1 - b0 'find the difference
if b2 > 10 then ccw 'is it within the range? if not got counter clockwise/solar panel facing east
low PORTB.0 'pin portb.0 low /stopping the solar panel for moving
low PORTB.1 'pin portb.1 low / stopping the solar panel for moving
goto start 'if it is in the range, do it again
so what the suitable timing for the pause...?
i not try it yet to the motor....
i am currently doing the circuit.... and now try to assemble the circuit with the lcd....
i need to add command for lcd in the proramming ....
I hope you realize that your motors will only be powered by 4.3V or so, even though your source is 12V. The PIC will put out a maximum of 5V from its output pins, and those drive the bases of the two 'top' transistors in the bridge. The emitters will go no higher than a diode drop below the bases. If you really are using the circuit you show, your 'top' transistors are going to dissipate a lot of power, and your motor won't have much power.
Charles Linquist
PiRaTuS, From the looks of it, it was written for a Basic Stamp.... Just my observation....
Dave Purola,
N8NTA
EN82fn
thanks a lot , can i convert from basic stamp to mikro pascal ?!
My comment was referring to the schematic posted by CIRE.
Charles Linquist
This dual axis solar dish tracker is way more than you need, but you find something useful, like a motor controller. http://www.harbornet.com/sunflower/sunrun.pbp Best, Doug
Bookmarks