Single-Axis PIC Controlled Solar Tracker DIY Kit using PIC18F1220
Single-Axis PIC Controlled Solar Tracker DIY Kit
I’m not going into as much depth with this instructable due to my current time constraints. That said, I fully plan on updating this instructable as time progresses with new algorithms and programs for optimization.
I was messing around with some new stepper motors one day, and I decided to make a light tracker unit. It is very simple and works on only one axis. It is a neat science project. Below is a video that offers a small demonstration. The following pages will have videos on how to put it together. There is a lot of discussion about how this kit works in the videos, so if you are really interested, then pay careful attention to what I say in the videos. Below is video#1.
NOTE: While I do sell this as a kit, you can use the ideas and algorithms talked about in this instructable/video to improve upon this basic design. It was designed as a fun little science project. I will be adding software and improvements as time progresses so please be patient with me =)
Electrical Discussion & Assembly
This kit is comprised of a main board that houses a microcontroller (PIC18F1220), a select button,a 5v regulating power supply, a stepper motor driver output connection, and a feedback input connection. The stepper motor output connection has four signal lines that are driven by the PIC, a regulated 5v line, and a DC ground line. The feedback input connection acts to both power the sensor board, and to provide three analog signal lines, and a single digital signal line back to the PIC.
The sensor board has three LDR (Light dependent resistors). Each LDR is in series with a 10k resistor. Each series set acts as a voltage divider. Depending on how much light is hitting the LDR, the PIC will receive a more or less voltage. The feedback from the three sensor is fed into three ADC (Analog to Digital) lines of the PIC. The PIC samples each of these sensor feedback lines several times a second, and runs a subroutine to determine which sensor has the most light, and which has the lease. If the left sensor is seeing the most light, the motor will take one step left. If the right most sensor is seeing the most light, the motor will take one step right. If the middle sensor is seeing the most voltage, the motor stays in the last position and does not move.
There is also a whisker and a stopper. The whisker is a wire on both sides of the sensor board. the stepper is a wire that is connected to ground, and fastened to the motor. When the motor runs too far left, and the whisker hits the stopper, it sends a digital signal back to the PIC saying that it has gone too far, and it will instruct the motor to step backwards and try again.
If this is too ambiguous, see the video. The whisker connects back to the main board via the input feedback connector. This line is connected to a 10k pull-up resistor. When this whisker hits the stopper (ground), if pulls the whisker voltage from 5v to 0v, and the PIC is always looking for that.
The sensor board schematic may look broken to you. This is because I’ve designed a PCB that allows for the user to manipulate it physically. Typically, all of the 10k resistors would be connected to the 5v line. The secondary sides of the LDRs should all be connected to ground. The area between each resistor and LDR (Voltage Divider Analog Voltage Signal) is sent back to the main board.
For more detail: Single-Axis PIC Controlled Solar Tracker DIY Kit using PIC18F1220
EasyEDA: Ideas for Circuit Design, Innovation for Electronics Access
Free Circuit Design: Schematic – Simulation – PCB Layout – Gerber Viewer
JLCPCB Prototype: Only $2 for 10pcs 10×10cm, 24 hours Quick Turn, DHL Delivery in 3 days
Current Project / Post can also be found using:
- dual axis solar tracker simulation using pic microcontroller with code pic16F877A
- solar tracker project using microcontroller