Assembling the Arduino Sun Harvester Electronics System


Subscribe to my Feed!

This documentation is part of the Open Sun Harvesting Project.

This page explains how to wire together the current Arduino Sun Harvester Electronics System. 

Previous version of this system can be found here if you need the documentation.

We will start by listing all of the different components that you will need to build the circuit.

Note that this component list is meant for “medium” (about 1m^2 of collector surface area) sized sun trackers and heliostats. Larger machines can be controlled by using more powerful driver boards, stepper motors, and a larger power supply, but that is not covered here yet. (I eventually plan to develop a board that allows you to easily connect larger driver boards to the existing system, but more on that in the future.)

Component List

Note that the various “Sun Harvester” circuit boards required for this project are currently only available through The Cerebral Meltdown Store. Click the link to learn more about the item.

The following items are not currently available through The Cerebral Meltdown Store and must be obtained through other suppliers. We will cover these items in more detail since they don’t have store link descriptions like the above items.

  • Arduino Microcontroller (Arduino Mega 2560 is recommended)
  • Power Supply for Arduino
  • Wires for Stepper Motors
  • Straight through Ethernet Cable
  • Power Cable for Driver Boards
  • Wire for Limit Switches

Arduino Microcontroller

I recommend the Arduino Mega 2560 for this system. Make sure you get the 2560 and not the older Mega version. The Arduino Uno also works, but you might find the amount of available programming space constricting. The Uno is also less accurate because it is unable to fit the better sun position calculations in its programming space

Other Arduinos can be made to work, but you might not find it worth the trouble. It is recommended that you read the Sun Harvester Shield Arduino Compatibilities page if you are considering using a different Arduino.

Make sure to purchase your board through a reputable site. Adafruit and Sparkfun are two good U.S. suppliers. There are many knockoff boards available at lower prices, but their quality is often suspect.

Arduino Power Supply

You will need a 9V power supply to power the Arduino board. Take a look at this one from Adafruit.com as an example. The Arduino is also powered through the same USB cable that you use to program it, so one can be used for temporary set ups.

Wires for Stepper Motors

Depending on your machine’s design, you may be able to just connect your stepper motors directly to the driver board. If the driver board is located some distance from the stepper motors though, you will need to extend the length of their wires. In the past, I have purchased suitable stepper motor wire from EBay. The stuff used for CNC machines works well. Ideally, you should choose wire that is capable of withstanding the elements if exposed.

Straight through Ethernet Cable.

When purchasing your Ethernet cable, make sure you get a straight through Ethernet cable (as opposed to a crossover cable). You can tell that its straight through by comparing both ends and seeing if the color patterns on the small wires inside the connectors are in the same order.

Direct burial Ethernet cable is best as it is able to withstand the elements.

Power Cables for Driver Boards

Each driver board in the system will require a two wire cable to supply power from the power supply.

The cheapest, best option that I have been able to find is landscape wire, frequently used for outdoor lighting. As the name implies, it is designed to be used outside and will thus hold up to the elements.

Wire for Limit Switches

Depending on your machine’s design, you may have to place your limit switches some distance away from the main circuit boards. You will thus have to run a bit of wire to make the connections between the two.

Since it is just a signal wire, it need not be a heavy gauge. It should ideally be something that will hold up to the elements though. Either the Ethernet or landscape cable mentioned above could be made to work for this, although the Ethernet cable contains thinner gauge wire which will plug easily into the screw terminals on either the Sun Harvester Shield or Driver Board.

 Assembling the Circuit

Attaching the Shield to the Arduino

When attaching the shield to the Arduino, line up the header pin on the shield indicated in the picture below so that plugs into pin 0 on the Arduino. If you are using the Arduino Uno two of the pins, A6, A7, will hang over the end as they are only available on the Arduino Mega.

Shield to Arduino

 

Connecting a Driver Board for Controlling a Single Machine

To assemble the electronics for a single machine system, you will need to connect a Sun Harvester Driver Board to the Sun Harvester Shield . There are two ways that you can do this. The first method is to just hand solder the individual connections from the driver board to the shield. The second method is to use the Sun Harvester Shield to Driver Board Adapter. Both methods are described in the link below.

Connecting a Driver Board for Controlling a Single Machine

Connecting Driver Boards for Multiple Machines using the Breakout Boards

You can control multiple machines by connecting multiple driver boards to the circuit, one for each machine. These boards are added to the circuit by using breakout boards. The link below describes how to do this.

Connecting Driver Boards for Multiple Machines using Breakout Boards

Wiring the Limit Switches

The limit switches (more accurately called homing switches in this application) are used to reset the machine’s position. You will need two limit switches for every machine that you wish to control. One is used for the altitude rotation and the other for the azimuth rotation.

Click the link below to view the wiring for this step
Connecting the Limit Switches to the Sun Harvester Circuit

Wiring the Target Changer Potentiometer and Wind Protection Mode Switch to the Sun Harvester Shield

If you are building a sun tracker, then you don’t need the target changer potentiometer. If you are building one or more heliostats, then the potentiometer is required.

The wind protection mode switch is optional. Leaving it disconnected from the circuit will only prevent you from putting the machine(s) into wind protection mode. Note that the wind protection mode switch should not be the only fail safe you implement to prevent your machine from damage in high winds.

Click the link below to view the wiring for this step
Connecting the Target Changer Potentiometer and Wind Protection Mode Switch to the Sun Harvester Shield

Wiring the Arduino Power Supply

Just to clear up any confusion, the power supply for the Arduino and the power supply for the driver boards are not the same. The Arduino power supply is typically a small 9V supply while the driver board power supply is a bit more robust.

The wiring for the Arduino’s power supply is pretty obvious. Just plug it into the Arduino. If you happen to have a supply with no plug, you can also wire it directly to the Sun Harvester Shield by connecting the wires to the screw terminal in the upper right hand corner of the shield. Positive goes to Vin, and negative goes to Gnd.

Also note that the Arduino is powered through the USB cable as well, so remember to unplug both it and the power supply when working on the circuit.

Wiring the Driver Board Power Supply

If you are only controlling a single machine, then you will wire the driver board power supply directly to the driver board. Positive goes to M+, and negative goes to GND on the driver board.

If you are controlling multiple machines, then you will wire the driver board power supply to the breakout boards instead. You can technically use any of the terminals wired M+ or GND, but I usually use the one located at the upper right hand corner of the breakout board. If using more than one breakout board, I would then use the terminal on the left side of the first board to transfer power to right side the second breakout board. (This is shown more clearly in the Connecting Driver Boards for Multiple Machines using Breakout Boards section.)

The positive wire of the supply goes to M+ and the negative wire goes to GND on the breakout boards.

Wiring the Stepper Motors to the Driver Board

The wiring for the stepper motors sold in the store is as follows.

Red wire –> A+
Yellow wire –> A-
Green wire –> B+
Grey wire –> B-

This color scheme will most likely be different if using another stepper motor. Bipolar stepper motors (4 – wires) tend to be the easiest to wire to the driver board since they have fewer wires compared to the unipolar variety of stepper motors. Unipolar stepper motors can be wired as bipolar stepper motors if needed. Refer to the manufacturer’s datasheet for the correct wiring if possible. Otherwise, a quick web search will reveal several website’s with great instructions on stepper motor wiring.

Relevant Forum Link

If you’re curious, the history of this circuit along with information on how it works is available at the following page on this site’s forum. Note that the topic drifts around a bit since it is just a forum thread. Also, the more recent posts are more accurate than the earliest ones.

http://cerebralmeltdown.com/forum/index.php?topic=335.0

 

This documentation is part of the Open Sun Harvesting Project.

Subscribe to my Feed!