Sun tracking electronics controlled by AVR

- The settings:

You can see after switch on:

The calculated X and Y coordinates in degrees

In the bottom line, the first four digits are the year, followed by the current day of the year.
In the lower right corner you can see the exact time. (H, m, s).
To make it easier to enter the current date, here is a table: (in case of a leap year, after February 28, add 1)
It is worth printing and keeping it close to the circuit.
J

jan. 1.

1

febr. 1.

32

mar. 1.

60

apr. 1.

91

may. 1.

121

june. 1.

152

july. 1.

182

aug. 1.

213

sep. 1.

244

oct. 1.

274

nov. 1.

305

dec. 1.

335

jan. 2.

2

febr. 2.

33

mar. 2.

61

apr. 2.

92

may. 2.

122

june. 2.

153

july. 2.

183

aug. 2.

214

sep. 2.

245

oct. 2.

275

nov. 2.

306

dec. 2.

336

jan. 3.

3

febr. 3.

34

mar. 3.

62

apr. 3.

93

may. 3.

123

june. 3.

154

july. 3.

184

aug. 3.

215

sep. 3.

246

oct. 3.

276

nov. 3.

307

dec. 3.

337

jan. 4.

4

febr. 4.

35

mar. 4.

63

apr. 4.

94

may. 4.

124

june. 4.

155

july. 4.

185

aug. 4.

216

sep. 4.

247

oct. 4.

277

nov. 4.

308

dec. 4.

338

jan. 5.

5

febr. 5.

36

mar. 5.

64

apr. 5.

95

may. 5.

125

june. 5.

156

july. 5.

186

aug. 5.

217

sep. 5.

248

oct. 5.

278

nov. 5.

309

dec. 5.

339

jan. 6.

6

febr. 6.

37

mar. 6.

65

apr. 6.

96

may. 6.

126

june. 6.

157

july. 6.

187

aug. 6.

218

sep. 6.

249

oct. 6.

279

nov. 6.

310

dec. 6.

340

jan. 7.

7

febr. 7.

38

mar. 7.

66

apr. 7.

97

may. 7.

127

june. 7.

158

july. 7.

188

aug. 7.

219

sep. 7.

250

oct. 7.

280

nov. 7.

311

dec. 7.

341

jan. 8.

8

febr. 8.

39

mar. 8.

67

apr. 8.

98

may. 8.

128

june. 8.

159

july. 8.

189

aug. 8.

220

sep. 8.

251

oct. 8.

281

nov. 8.

312

dec. 8.

342

jan. 9.

9

febr. 9.

40

mar. 9.

68

apr. 9.

99

may. 9.

129

june. 9.

160

july. 9.

190

aug. 9.

221

sep. 9.

252

oct. 9.

282

nov. 9.

313

dec. 9.

343

jan. 10.

10

febr. 10.

41

mar. 10.

69

apr. 10.

100

may. 10.

130

june. 10.

161

july. 10.

191

aug. 10.

222

sep. 10.

253

oct. 10.

283

nov. 10.

314

dec. 10.

344

jan. 11.

11

febr. 11.

42

mar. 11.

70

apr. 11.

101

may. 11.

131

june. 11.

162

july. 11.

192

aug. 11.

223

sep. 11.

254

oct. 11.

284

nov. 11.

315

dec. 11.

345

jan. 12.

12

febr. 12.

43

mar. 12.

71

apr. 12.

102

may. 12.

132

june. 12.

163

july. 12.

193

aug. 12.

224

sep. 12.

255

oct. 12.

285

nov. 12.

316

dec. 12.

346

jan. 13.

13

febr. 13.

44

mar. 13.

72

apr. 13.

103

may. 13.

133

june. 13.

164

july. 13.

194

aug. 13.

225

sep. 13.

256

oct. 13.

286

nov. 13.

317

dec. 13.

347

jan. 14.

14

febr. 14.

45

mar. 14.

73

apr. 14.

104

may. 14.

134

june. 14.

165

july. 14.

195

aug. 14.

226

sep. 14.

257

oct. 14.

287

nov. 14.

318

dec. 14.

348

jan. 15.

15

febr. 15.

46

mar. 15.

74

apr. 15.

105

may. 15.

135

june. 15.

166

july. 15.

196

aug. 15.

227

sep. 15.

258

oct. 15.

288

nov. 15.

319

dec. 15.

349

jan. 16.

16

febr. 16.

47

mar. 16.

75

apr. 16.

106

may. 16.

136

june. 16.

167

july. 16.

197

aug. 16.

228

sep. 16.

259

oct. 16.

289

nov. 16.

320

dec. 16.

350

jan. 17.

17

febr. 17.

48

mar. 17.

76

apr. 17.

107

may. 17.

137

june. 17.

168

july. 17.

198

aug. 17.

229

sep. 17.

260

oct. 17.

290

nov. 17.

321

dec. 17.

351

jan. 18.

18

febr. 18.

49

mar. 18.

77

apr. 18.

108

may. 18.

138

june. 18.

169

july. 18.

199

aug. 18.

230

sep. 18.

261

oct. 18.

291

nov. 18.

322

dec. 18.

352

jan. 19.

19

febr. 19.

50

mar. 19.

78

apr. 19.

109

may. 19.

139

june. 19.

170

july. 19.

200

aug. 19.

231

sep. 19.

262

oct. 19.

292

nov. 19.

323

dec. 19.

353

jan. 20.

20

febr. 20.

51

mar. 20.

79

apr. 20.

110

may. 20.

140

june. 20.

171

july. 20.

201

aug. 20.

232

sep. 20.

263

oct. 20.

293

nov. 20.

324

dec. 20.

354

jan. 21.

21

febr. 21.

52

mar. 21.

80

apr. 21.

111

may. 21.

141

june. 21.

172

july. 21.

202

aug. 21.

233

sep. 21.

264

oct. 21.

294

nov. 21.

325

dec. 21.

355

jan. 22.

22

febr. 22.

53

mar. 22.

81

apr. 22.

112

may. 22.

142

june. 22.

173

july. 22.

203

aug. 22.

234

sep. 22.

265

oct. 22.

295

nov. 22.

326

dec. 22.

356

jan. 23.

23

febr. 23.

54

mar. 23.

82

apr. 23.

113

may. 23.

143

june. 23.

174

july. 23.

204

aug. 23.

235

sep. 23.

266

oct. 23.

296

nov. 23.

327

dec. 23.

357

jan. 24.

24

febr. 24.

55

mar. 24.

83

apr. 24.

114

may. 24.

144

june. 24.

175

july. 24.

205

aug. 24.

236

sep. 24.

267

oct. 24.

297

nov. 24.

328

dec. 24.

358

jan. 25.

25

febr. 25.

56

mar. 25.

84

apr. 25.

115

may. 25.

145

june. 25.

176

july. 25.

206

aug. 25.

237

sep. 25.

268

oct. 25.

298

nov. 25.

329

dec. 25.

359

jan. 26.

26

febr. 26.

57

mar. 26.

85

apr. 26.

116

may. 26.

146

june. 26.

177

july. 26.

207

aug. 26.

238

sep. 26.

269

oct. 26.

299

nov. 26.

330

dec. 26.

360

jan. 27.

27

febr. 27.

58

mar. 27.

86

apr. 27.

117

may. 27.

147

june. 27.

178

july. 27.

208

aug. 27.

239

sep. 27.

270

oct. 27.

300

nov. 27.

331

dec. 27.

361

jan. 28.

28

febr. 28.

59

mar. 28.

87

apr. 28.

118

may. 28.

148

june. 28.

179

july. 28.

209

aug. 28.

240

sep. 28.

271

oct. 28.

301

nov. 28.

332

dec. 28.

362

jan. 29.

29

mar. 29.

88

apr. 29.

119

may. 29.

149

june. 29.

180

july. 29.

210

aug. 29.

241

sep. 29.

272

oct. 29.

302

nov. 29.

333

dec. 29.

363

jan. 30.

30

mar. 30.

89

apr. 30.

120

may. 30.

150

june. 30.

181

july. 30.

211

aug. 30.

242

sep. 30.

273

oct. 30.

303

nov. 30.

334

dec. 30.

364

jan. 31.

31

mar. 31.

90

may. 31.

151

july. 31.

212

aug. 31.

243

oct. 31.

304

dec. 31.

365


There are four buttons available to navigate through the menu:

Moving left and right: UP, LE, ENTER, EXIT / HOME
By default, use the up / down keys to switch to another menu.
Press ENTER to change the data on the current screen.
Press ENTER again to move to the next data.
The set values are written to the EEPROM when the EXIT button is pressed, so the settings will be retained in case of a power failure (Only the year, current day, latitude, and engine settings are saved.)
Because the microprocessor's EEPROM content is finite (max.10000-100000 writing is a lifespan), so just daily
It is written for 1 time, guaranteeing a minimum of 27 years of faultless operation (10000 / 365,25 = 27,3785 years).
If the memory area with the number of the day had collapsed after 27 years, then the circuit would work, but in case of a power outage the number of the day should be reset too :).
At midnight, the new date will be saved. It follows from this limited write option that the exact time is not saved because, for example, Every 7 days, more than 10000 writing would be available in the EEprom area, so it would be within a few weeks to break the part of the memory and forget the exact time.
To exit the programming mode, press ESC / HOME.
If you press it again, the parabola will go to the HOME position (X = 0 degrees, Y = -90 degrees - that is to the south and toward the earth)

The propulsion of the tracking mechanism can be of two types:
DC motor or stepper motor
It is recommended to use the DC motor as it does not have a resting current on the stepper motor.
When the engine is switched off, the drive must be locked with a brake.

For DC motor control, 0.25 means that a change of state (no clock signal) comes from the decoder disk at 0.25 degrees.
This means that there is a mark (or optical aperture) of 0.5 degrees on the signal disk.
If you divide the encoder 360 into 360, it means that 360 transparent and 360 non-transparent parts will be alternating with it.
This 1-degree disc has a precision of 0.5 degree as it will have a 720 state change.
The main screen with the coordinates:

When using a stepping motor, you do not need a dialer, only the HOME sensor
(Semicircle-clearing of an opt-out gate, where the circle is transparent through 180 degrees)


Home Position Sensor Optical Disc




But here, too, you have to give 1 degree how many steps the parabola is doing (200 steps / degree base is set)
One Piece: If the engine does 200 steps in one revolution and turns 2 degrees in 1 degree of parabola then
Set 400 (This is why step / degree is the unit of measure).

The latitude should also be given, but this is basically set to Budapest (47.5 degrees).
The letter N signifies that we are in the northern latitude, that is, in the north of the globe.
If you set a negative value, the letter "S" appears, indicating the Southern Hemispheres,
(So the circuit can be used all over the world.)

For a stepping motor, you can change the stepping speed.
The smaller the number you enter, the less you wait between two steps. This can eliminate the loss of a move.
It is not recommended to go faster at 1 degree per second (This is especially true with DC motors for possible overshoot).
When using a DC motor, apply a motor with a recommended brake and build the parabola mirror in a balanced way
(So the load of the engines will be much smaller).
-The circuit:

Make sure that the supply voltage is well-filtered, uninterrupted, stable at 5V!

PCB plans in bmpFigyelem! Elavult verzió!

The software in .HEX(26,7kB) Figyelem! Elavult verzió!

Since they are made for the iron-based panel manufacturing technique, they are mirrored (the inscriptions have to be looked at).
The controller's mind is a TQFP enclosure ATMEGA32.
The electronics consumes only a few mAs so the power outage can be overcome for a long time.
When using a DC motor, if the motors are off the voltage, the electronics are on the encoder disks
You will know where the parabola stands, so that you can fit in the right position later.
In the case of a stepping motor it is not realized because there is no feedback at this time! (UPS is recommended).
If you press the HOME button, the position is reset to Home when passing
Again, the parabola will be in the right place.
The 1Hz external clock signal is provided by a cheaply-made Chinese alarm clock transformed electronics. (Since then, it is already software)
Since it runs from 1.5V in factory, there is a transistor in front of the microcontroller.
The 1.5Volt is produced with a 1k resistor and 3db diode (giving approximately 1.8V).
By default, the voltage on the alarm clock is changed by polarity, so it is disconnected with 2 diodes
The positive "half-period", and this goes to the 1Hz clock signal input.

The X> and X <inputs (PB1, PB2) are an optical detector. If the sun shows a deviation horizontally, every minute
The electronics are corrected for 1 second (eliminating possible fuzzy light).
The clock does not show the current time but the current solar time.
So there is no winter / summer time, but there is a ground clearance inaccuracy and clock counter error correction.
Correction is activated every second at 30th second. Pushbuttons from PB3 to PB6 are to be connected to the + 5V rail with 10k resistors. In addition, all inputs must be connected to + 5V by 10k.
(It uses no external clock code for the newer circuit and where possible internal pull-up resistors are activated in the microprocessor)
All the terminals are driven by a mandrel to disassemble or replace all the components of the circuit.

PD0 = Output 'X + / Step X (with DC Motor + Direction / Stepping Motor Clock)
PD1 = Output 'X- / Dir X (for DC motor - Defining / Direction of stepping motor direction)
PD2 = Output 'Y + / Step Y (DC Motor + Direction / Stepping Motor Clock Rate)
PD3 = Output 'Y- / Dir Y (For DC Motor - Define / Define Directional Motor Direction)
PD4 = Input 'X home position - resets the X coordinate when changing the state
PD5 = Input Y position - resets the X coordinate when changing the state
PD6 = Input 'X signal at DC motor This feedback is from the position. (Baseline 0.25 degrees / change of state)
PD7 = Input Y for a DC motor this is a feedback of the position. (Baseline 0.25 degrees / change of state)
PB0 = Input 'clock transducer
PB1 = Input '-X> Correction
PB2 = Input -X <correction
PB3 = Input 'button up
PB4 = Input 'button down
PB5 = Input '-Enter button
PB6 = Input '-HOME button
PB7 = Output 'Pump control
PA0 = Input Th1 Thermometer (Parabola Focus Heat Exchanger)
PA1 = Input Th2 temperature measurement (water storage temperature)


On the right, a standard HD44780 compliant 2X16 character display is connected.
The bottom P10k mark is a 10k potentiometer that adjusts the display contrast.
Since several people have indicated that they are unable to process the SMD processor, I have also made a conventional DIL-circuitry.


Of course, because of the panel-laying technique, the circuit is also reflected here!
-Because there were still some free terminals, the circuit was expanded with two thermometers and one relay,
Thus, it is already possible to control a circulating pump, or if it is boiling water, this will
Out of the sun. If it is too cold (<3 degrees), the pump will not start.
Thermometers are connected to inputs A0 and A1. A0 measures the temperature of the heat exchanger placed in the focal point,
A1 should be placed in the buffer tank. The Pump can be connected to the PB7 via a relay.
There were 2 10K resistors that produced the reference voltage (2.5V).
Accordingly, the output voltage of the voltage distributor generated by the thermometer and a resistor can not be higher!
And finally there is an implant drawing:
The red highlighted parts are + 5V, the blue is 0V.

The newer circuit design is in progress.
Warning Circuit has been completely redesigned since then! See description of the newer circuit (under construction)

Last update: 2009-05-16

<< Back <<