Professional Documents
Culture Documents
Side
Back
Servo hardware
Side
Back
Solar Panel
Side
Back
Se ervo
Servo
V Vcc
+5v
Photo Resistor
R it Resistor
0V
G Ground d
FromTesting
Dark Ambient SimulatedSun 12000Ohm 1100Ohm 78Ohm (Fingeroverphotoresistor) (Classroom) (12inchesfrombrightworklight)
Results
Goinginseries(VccpRRGND)tiethepRRnodetotheADC pin V Vmax of fpR RRnode d is i about b t4 4.7V 7Vand dVmin V i is i about b t0 0.35 35 UseRof1kand+/10%willkeepdifferenceingreatestregion Allresistorsare0.98xkOhmswhichiswithinstandardsand willcreatesimilarreadablevoltages
Resistor
VCC
ADC
GND
Arduino
Servo
Side
Front
Step 5 Microcontroller
Get your program on
SolderleadstoyourArduino GettheFTDIcableinstalledandfunctional Arduino Pro Mini UploadatestprogramtotheArduino(verifyfunctionality) arduino.cc Attach Att hf foursensorsto t ADC ADCs14( (analog l t todi digital it lconversion) i ) AttachservotooneofthePWM(pulsewidthmodulation)ports UsetheUARTtocheckvaluesofADCreadingsthroughSerial.println(sdfsdf); UsetheServoclasstoinitializeandtesty yourservo Setupaninitializationroutinewheretheservomovesthesolarpanelsothe sensorarraycandeterminetheangleofmaximumsunlightandthenmovethere Setuptrackinglogic.Iusedaminimumofa10%differencebetweenanytwo sensorstomovethemandalongsettlingtimeindicativeofaslowmovingsun sun.This reducesoscillationsduetonoise. Withfoursensors,thepanelcanmoveinsmallamounts(differencebetweenthe centerlookingsensors)orlargeamounts(ifthesideviewsensorsindicatealarge differential) Becarefulwithcastingandscaling.
Step 5 Microcontroller
Program more
CloudMode Ifcloudsarepresentorthedayisovercast,youcanlookattherate thesunhasbeenmovingandassoonasitappearsagainmovedirectlytothe maximumangle
Step 6 Testing
Attach the Solar Panel and Increase Efficiency!
Setupavoltagedividersimilartothesensorsandattachthesolarpaneltooneof theunusedADCs Watchthevoltagechangeinproportiontotheangleofthesolarpanel
Sources
Give Credit
fromhttp://arduino.cc/en/Reference/Libraries Arduino Pro Mini servolibrary,andcorrespondingexamplecode arduino.cc seriallibrary,andcorrespondingexamplecode variablecasting http://www.mkssoftware.com/docs/man3/itoa.3.asp