The purpose of this project is to create an interactive and educational product for k-12 students to learn about weather and the weather cycle. In order to accomplish this, my subsystem comprises of a solar tracking array, consisting of a microcontroller, motor, motor driver, and light sensor. These components will all interface with the other subsystems and actively track either the most intense light in the environment, or track the position of the sun itself via local weather data.
Criteria
In order for this project to be successful, there are many criteria that must be met. Most importantly, the device must be functional and functional for long enough to serve as a useful teaching tool. In order to accomplish this, parts must be selected with quality and robustness in mind. Furthermore, the budget must be taken into consideration as well. If parts get too expensive, it is easy to exceed the projected budget. But most importantly, the parts were selected with compatability in mind. If the parts struggle to interface with each other, we will create unnecessary roadblocks for our team further down the line. Overall, the criteria for each selected part included quality, cost, and compatability among other things.
Components
Microcontroller
Option 1
Option
Pros
Cons
Unit Cost & Link
PIC16F18875
Multiple timers, hardware PWM, and various communication peripherals
may need to write lower-level code to manage interrupts or to generate precise step timing
Can run on very little power
5V operation (compatible with most motor drivers)
Final Selection: PIC18F47Q10 (Option 2)
Rationale:
The microcontroller I decided to use for this project was the PIC18F47Q10, as there is an abundance of resources and information online, There also more examples online on how to use a stepper driver with this PIC controller than any other PIC controller. In addition to this, the microcontroller is proven to have reliable SPI connection as well as plenty of ram to control more than one motor driver.
Stepper Motor
Option 1
Option
Pros
Cons
Unit Cost & Link
1528-1367-ND
Very common and widely supported by a variety of stepper drivers like the ULN2003
The actuator I decided to go with for this project is option 1, the Nema 14 stepper motor. This option is the most realistic as it will be easiest to interface with a stepper driver and PIC microcontroller. Additionally, this actuator is the easiest to use in terms of precise movement.
The driver I decided to go with for the DC motor was option 1. This is because the surrounding circuitry is easier to set up, and there are more resources at my disposal for integration. Additionally, the motor driver is proven to be working with the PIC18F47Q10 through SPI serial communication.
Protects against voltage spikes from inductive loads
Designed only for unipolar motors
Cost effective
6-50V
Final Selection: ULN2003 (Option 2)
Rationale:
I concluded that this driver was the most suitable for my project because most of the online resources on how to control stepper motors used this particular driver. Additionally, although it lacks reverse voltage protection, it is not difficult to implement flyback diodes.
Power Regulation
This project will require two seperate voltage lines, and therefore two voltage regulators. The motors pull too much current to be connected to the same line as the drivers and microcontroller.
I came to the conclusion that the first option would be best, as I need a robust and easy to interface voltage regulator. The first option has a very detailed datasheet with several example application diagrams, which will streamline the power supply design process.
I ultimately decided that the switching regulator would be the best choice for this application. Not only is it reliable and cheap, it would supply more than enough amperage for the logic on the microcontroller and other drivers.
Final Major Components Selected:
Component Name
Selection
Microcontroller
PIC18F47Q10-I/QT
Volatage Regulator 3.3
AP63203WU-7
Voltage Regulator 5.0
LM2575
DC Motor Driver
IFX9201SG
Stepper Motor Driver
ULN2003
Stepper Motor
1528-1367-ND
Power Budget
The following is the power budget for each component selected
I used the power budget in order to estimate how much power the system would be pulling if it was using all of its capability at once. This way, I could plan accordingly as I designed by PCB and ordered fuses. The final current draw, 1400 mA, seems high but it would only reach this number if both motors were running at full speed. Since I knew that the system should never exceed 1400 mA, I ordered a 1.5 A fuse to protect the circuit in case of a short.
MCC Setup
Final Decision-Making Process
There were many factors that went into choosing each component that would be on the final PCB. For one, all of the motor drivers had to be compatible with the PIC MCU. I wanted to find drivers that would work without needed overly complex code. The SPI driver is a good example of this, as it requires only three lines of code to turn the motor one way or another. Additionally, there are two separate voltage regulators on this board. I did this because I found it would be more reliable to run all the logic of each chip off of one 3.3 volt line, and run the motors off their own 5 volt line, reducing the risk of current overdraw and noise. In order to meet all the project requirements, I ensured all the components were surface mount, and included a motor driver that uses a serial communication protocol to send and receive messages.