The Mediatek LinkIt One has a whole bunch of cool features, along with the on-board GPS and GPRS, the included battery and charger really made my day, supplying power to a project if often a real nuisance, so it is great to literally have "batteries included". These features make it ideal as a remote sensing device, just the kind of thing that you would want to recharge with solar power.

In this Instructable I show you two things:

How to power your LinkIt One with a solar panel

Powering the board and recharging the battery via solar is extremely easy, I will give you some guidelines on how to choose and panel and how to regulate the voltage.

How to make a simple single-axis solar tracker

The LinkIt One has a GPS on-board, which means that it has access to accurate time and position, which is all that we need to determine the relative location of the sun.

Step 1: Determine How Much Power You Need

The first step with an solar installation is to figure out how much power you require. There are some good tutorials on the web, like this one, where you can get all the nitty-gritty, I will help you do some engineering approximations.

Instantaneous vs. Continuos Current

There are to main requirements to consider when designing the system

  1. Instantaneous Current Draw
  2. Continuous Current Draw

Instantaneous current draw is not too much of a problem for us, since we have the battery to supply short spikes of current that the panel cannot.

Continuous current will be the killer, we need to make sure that on average across a 24 hour period the power generated by the panel is higher than the current consumed by the device.

What kind of battery does the LinkIt One come with?

The battery that comes with the LinkIt One is a 1000mAh, single cell, Lithium Ion battery, with an operational voltage range of about 3.7 to 4.2V.

How long does a 1000mAh battery last?

The milliamp hour rating of a battery means exactly what it says, in other words, if you draw one amp from the battery it will last for 1 hour.

If you draw 125mA from the battery it will last 8 hours.

This is an interesting experiment that someone did with the LinkIt One to test battery life.

How long does it take to charge a 1000mAh battery?

For now we will assume 100% efficient charging, which is not accurate, but it is good enough for our engineering approximations.

A 1000mAh battery can be charged in 1 hour with a 1A supply, so it is just the reverse of discharging.

How much current can my solar panel supply?

I used a very small solar panel, rated for 1.5W at 8V, i.e. 187.4mA (remember, power = votlage*current).

The LinkIt charges at 5V though, so 1.5W at 5V = 300mA, or about 240 if we assume am 80% conversion from 8V to 5V

How much current can I draw during the day?

Lets assume that there are 6 hours of usable sunlight in the day.

240mA * 6 hours = 1440mAh, so we can easily recharge the battery in a day!

In fact, there is 440mAh of extra capacity, which can be used to operate devices during the day.

Say that I want to move the panel 20 times during the day and that the movement takes 1 minute (these are reasonable numbers from my project). I have 440/20 = 22mAh of capacity

22mAh equates to 1.32A for a minute, a very healthy number. Most of the minute is spent in GPS search, the high current of the servo is only for a second.

How much current can I draw at night?

Assume that we are willing to consume 80% of the battery's capacity.

For the 18 hours of darkness (assuming 6 hours of light, which is conservative where I live) we can draw a continuous (1000*80%)/16 = 50mA, which is very little, but enough to keep the LinkIt alive.

Step 2: Regulating the Voltage

The LinkIt One has an on-board battery charger, which expects to be provided with a nice steady 5V via the USB port.

Solar panels don't put out a steady voltage, rather it is a function of the amount of light hitting them.

Fortunately it is very easy to convert the voltage using a switchmode regulator.

There are oodles of options, you just need to make sure that the one you choose meets the following requirements

Input Voltage

Make sure that the expected outputs of your solar panel fall within the input voltage range of the switchmode regulator

Output Voltage

This must be 5V, no two ways about it

Output Current

The regulator must be able to handle the current that you are putting through it.

Take a look at your solar panel's current rating (or determine it from power/voltage), this will be the maximum input current, and the regulator must be able to handle it.

Ignoring inefficiencies, output current will be (input current)*(input voltage/output voltage), and the regulator must be able to handle it.

Example Regulator 1

I chose the Power Trends PT78ST105S because I had one lying around, here are its specs

Input Voltage: 9-38V

Output Voltage: 5V

Output Current: 1.5A

Example Regulator 2

I am also quite a fan of these little guys, but note here how the input voltage is 14V minimum, which means that I would have needed two of my 8V solar panels in series.

Input Voltage: 14-28V

Output Voltage: 5V

Output Current: 500mA

Step 3: Build the Circuit

What you need

For more details on choosing the components, see previous steps

  • Solar Panel
  • 5V switching regulator
  • Micro USB connector/cable

Wiring it Up

I have attached a diagram, but there is really nothing to the wiring

  • Positive output of the solar panel to Vin on the regulator
  • Negative output of the solar panel to GND on the regulator
  • Vout from the regulator goes to +5V on the USB connector
  • GND from the regulator goes to GND on the USB connector

Make sure that the LinkIt One's battery switch is in the "BAT" position, this mode ensures that the battery is used to power the device and that the battery charges via the USB port.

Driving Leds

The LinkIt One can only supply a couple of mA via its GPIO pins, so we use transistors to drive the LEDS. I chose a bog-standard BC5468 with a 2.2k ohm resistor on the base. The red green and yellow LEDS all had a forward drop in the region of 1.65-1.75V, so I chose 90ohm resistors (Since I was using the 3.3V rail for supply).

I wired these trasistors/resistors inline as you can see in the pics.


I extended the leads of the battery and put a switch in line so that the whole device can be easily turned on and off.

Pin Numbers

These are the pin numbers that I used, you can use whatever you like, just make sure it matches up with the software.

Pin (LinkitOne)Purpose
D9Servo Signal
D11Red LED (indicates servo movement)
D12Amber LED (indicates charging)
D13Green LED (indicates GPS status)


Make sure to attache the LinkIt One's GPS antenna (if you are going to do solar tracking)

Step 4: Simple Single Axis Tracking Introduction


By this point you have a LinkIt One that can be powered by the sun, which is pretty darn cool, and for most projects, probably good enough, but let's take it a bit further.

As you will be aware, having lived on Earth all your life, the sun rises in the east and sets in the west, however, it takes a different amount of time to do so, depending on the time of the year. It also does not always or (unless you on the equator) ever pass directly overhead.

The full theory behind solar tracking is beyond the scope of this Instructable, if you are interested, this document is a great jumping in point (I attached as a PDF too in case the link disappears, I have read teachengineering's terms and conditions and it appears to be acceptable use).

The long and the short of it is:

  • In order to determine the sun's location in the sky we need our location on the ground and the current time. Both of these are avaible from a GPS signal
  • To track the sun's movements perfectly we would need to tilt the panel in two axes, but the majority of the benefit can be gained by tilting in only one.


There are a number of different types of solar trackers, the one we are building is a "Horizontal single axis tracker with tilted modules (HTSAT)".

I used a servo from and RC car to control the active tilt, the axis of which is along the north/south line. The whole assembly is attached directly to the servo on one end and supported by a loose fitting bolt through the perspex on the other.

I used a regular nylon door hinge to handle the "tilt", along with an adjustable linkage (also from an RC car) which allows me to set the angle.

As you can see, my tracker was put together from scraps, so you would do best to study the pictures and then think of your own better design ;-)

The Servo

I chose to use a high torque (about 15kg/cm at 6V) 1/8 scale RC servo. The high gear ratio means that it has far more holding torque when powered down, in other words, when we aren't moving the panel the servo can be turned off to save power without the panel rotating under it's own weight.

Step 5: Simple Single Axis Tracking: Software

I was pleased to find a ready-made solution for determining elevation/azimuth from latitude/longitude on the Arduino forums. If you are interested in the operation of the code I recommend reading the thread, I will just point out a few salient points.

Determine Time/Location from GPS

I have written about this a few times now in other Instructables, so for my own sanity I shall just direct you to my GSM proximity sensor, step 2 for details.

I just had to convert the latitude and longitude to the appropriate data type and voila, mowcius' code spat out an elevation and azimuth

Verify The Software

You will want to verify that the elevation and azimuth values that you are getting are correct, I recommend timeanddate's handy tool, here is a link for Cape Town, but you will be able to find your own city.

Converting Elevation into Servo Position

If you take look at plot above you will see that the elevation ranges from 0° to about 78° and then back to 0°. This angle represents the "height" of the sun above the horizon.

Since my trackers axis of rotation is angled North-South the servo must move from 0° (sunrise) to 90° (midday) and over to 180° (sunset).

I decided that the easiest way to achieve this was to scale the elevation angle (using the map() function), which meant that I need to calculate the noon elevation ahead of time. I do this by stepping through decimal hours at 6 minutes intervals and calculating the sun's position for each one.

//this function determins the maximum elevation (i.e. at noon) on the current day
// only do it once per day
//remember to reparse the GPS string afterwards, since it messes with time variables
void determineMaxElevation() {
  ElevationMaxToday = 0;
  Hours = 0.0;
  Minutes = 0.0;
  while (Hours < 24.0) {
    Hours += 0.1; //increment hour by 0.1 (6 minutes)
    if ( ElevationAngle > ElevationMaxToday) {
      ElevationMaxToday = ElevationAngle;  
      Noon = Hours;
  Serial.print("Noon today at ");
  Serial.print("Maximum Elevation ");


The only remaining issue is to convert the 0°-90°-0° movement of the sun into 0°-180° movement for the servo. This however is easy, we just split the day at noon and do two separate mappings.

if (DecimalHours < Noon ) {
      panelElev = map(ElevationAngle,0,ElevationMaxToday,sunRiseServoAngle,midDayServoAngle);
    else {
      panelElev = map(ElevationAngle,ElevationMaxToday,0,midDayServoAngle,sunSetServoAngle);     

Display Charging State

It is helpful to know whether the device is charging or not, fortunately, there is a library for that included. Below is an example of how I use it to set the state variable for my amber LED

#include <LBattery.h>
void chargeStatus() {
  if(LBattery.isCharging()) {
    ledStateAmber = HIGH;
  else {
    ledStateAmber = LOW;

Flashing Indicator LEDS

I used my code from my previous project to handle flashing/updating the LEDS

<p>Did you measure the current draw of the LinkIt One? I want to know what the max current draw is of this board as I also need to build a solar power solution</p>
<p>how match use te linkit and, howmatch power givs the solar panel?</p>
<p>Have you read through step 1? I will be happy to elaborate if anything isn't clear enough. Basically it depends what you are doing with the LinkIt, and what percentage of the time you are doing it. My solar panel is a small 1.8W device, and I think it is enough to handle the tracking and anything that the LinkIt's onboard peripherals (except perhaps WiFi if it was on 24/7) would consume.</p>

About This Instructable




Bio: Electrical Engineer by trade, tinkerer by heart.
More by ossum:RC Tyre Magnetic Picture Frame 3D Printed MB Jeep and M416 Trailer in 1:10 Scale Blooming Marvelous Flower Lamp 
Add instructable to: