08/07/2019 at 12:59 •
For better daily handling, a simple "sandwhich"-style case has been drawn up. Below is the design study that has been converted to CAD drawings that were used for the final build. The CAD drawings are published in the GitHub repository cad folder. I am using 9mm plywood for the bottom, 4mm clear acrylic sheet for the top, and 15mm M3 spacers on either side of the board.
08/07/2019 at 12:06 •
With Revision 3, the final shape starts to emerge. After becoming familiar with PCB production basics, it was time to turn the design into a device that can fully emulate and display the solar position.
Expanding the displayboard to arrange the 32x LED set in a circle, and adding the stepper motor driver to the controller board meant moving the OLED display out to the display board. Adding the second OLED is not just for symmetry: showing the current azimuth angle in addition to the boards north heading adds to the convenience of quick data correlation. Here is the Revision 3 PCB set, consisting of mainboard v1.7 and matching displayboard v2.0. In the photo below, it shows the updated mainboard with the new stepstick connector fitted in the place of the previous OLED location. PCB design files (gerber), as well as the Arduino code are published in the revision 3 GitHub repository.
Adding the second OLED display to the I2C bus had an issue that required manually updating the u8g2 display library. I documented the solution in the GitHub issue tracker.
08/04/2019 at 07:51 •
After the epic fail of mirrored Arduino footprint pins, I decided to double up and, together with the fixing the controller board, create the first version of the LED display board for the controller. To match the controllers size and use minimal space, a four-layer PCB became necessary. Because 4-layer boards require much more effort in construction and cost, I didn't go for the full LED ring design yet, but kept the first version with only two LED lines to gain experience.
Now I was eager to see the board with the dual-color LED set in action. Dual-Color LED are basically two LED merged into one. Because of the difference in color/wavelength, colors may differ in their forwarding voltage. I run a few breadboard tests with different resistor values to get a approximate uniform brightness.
While updating the footprint, I also added a 2x DIP switch and two push button switches into the design. It is always handy to be able to control a few settings during the boards operation.
Revision 2 design and code is saved to the GitHub repository https://github.com/fm4dd/suntracker2-r2
08/03/2019 at 18:02 •
After identifying the need for a bigger controller, I picked the Arduino MKR Zero. The Zero has a sufficiently small footprint, generous 32K RAM, 256K Flash, and comes with a build-in MicroSD card reader. The 32bit architecture will be helpful for working with bigger data types, and the 48Mhz are much speedier, too.
The choice of the Arduino controller determined the new system voltage to 3.3 volts. Time for PCB design, adding all components except for the stepper motor control. The board had no space left, so I decided to leave that for later.
For creating the controller board PCB design I used KiCAD 5. After two misguided attempts, the third version looked ready for production. Instead I was in for some disappointment...
As it happens, I fell for the #1 error in PCB design: having created a mirrored footprint for the Arduino MKR Zero. How embarrassing! After finding the presentation for the top-5 footprint mistakes, it was a bit of consolation to learn that even pro's tend to make this mistake. Nevertheless I partly populated the board, using sockets to preserve modules, and turning the Arduino around to align the pins on an awkward angle. I wanted to see if the board otherwise works, and voila, the board works great, flipped Arduino pins put aside.
08/03/2019 at 17:14 •
With the compass functionality tested on a breadboard, the next step is to transfer it to a universal prototyping board, adding a status display and IO expansion ports to drive a LED ring that simulates the horizon. For the board, I am going to use the Takachi TNF 89-136.I had an Ardunio Nano at hand to be used as the micro controller, which will later turn out to be vastly inadequate to drive all the peripherals. At this stage, The Nano was holding up OK: driving the LSM303 magnetometer sensor, the 128x32 OLED display, and two MCP23017 IO expanders from Microchip, all over the I2C bus. In front is the stepdown voltage regulator from Seeed Studio.
In the left half of the universal prototyping board, I placed the remaining components: the DS3231 RTC clock, the MicroSD card reader, and a bigger 128x64 OLED display. For data exchange, was going to connect the two Nano over the serial line interface. But before that, I run into severe RAM space issues. The MicroSD card driver requires >512 Bytes buffer space, the bigger 128x64 OLED reserves a larger frame buffer, exhausting the 2K RAM space of the Nano without having written any code yet.A second challenge was my patience and steady hand. To route and wire 96+ connections required for the LED ring manually, it was going too slow and error-prone. I decided to better get a bigger CPU, and I'd better create a PCB.
08/03/2019 at 03:23 •
The first steps on the solar tracking project were taken in April, when I was reading about building a digital compass. There are various project descriptions on the net, and I was interested what sensor is best suited for that task. Based on what I can source locally, I zeroed in on modules with the LSM303 chip, made by ST Microelectronics. Below shows the first breadboarding tests with the MM-TXS505 module from Sunhayato.
The MMTXS505 modules uses the LSM303D chip released in 2012. It is quite stable, and offers the ability to select one of two possible I2C addresses. I noticed that later chip revisions (e.g. LSM303DLHC) only hardcode one address, which prevents using more than one sensor on a single I2C bus. Now that I can determine North, I can plan for adding the modules that would add the sun position information and provide the tracking output.