More Secrets of the Solar Powered SunAirPlus Controller – Application Notes
Want to Solar Power your project? Secrets? What could be Secret about SunAirPlus?
OK, well not really secrets. What we are talking about here are four ways of using the SunAirPlus that aren’t completely documented in the specification. Buy it here!
Part 1 of this posting talks about the first two secrets:
- – Stepper Motor Controller / SunTracker
- – Turn off A USB Power Control with SunAirPlus
In this posting we talk about these undocumented features:
- – Directly Charge an iPhone / Android Phone from SunAirPlus
- – More More More Analog to Digital Inputs
What is SunAirPlus?
Ever wanted to build your own Solar Powered Raspberry Pi or Arduino system? SunAirPlus is a 3rd Generation Solar Charging and Sun Tracking Board designed specifically for Arduino and Raspberry Pi systems. This project was funded (150%) by a successful Kickstarter.
The SunAirPlus board takes Solar Power from 6V Solar Cells, charges a 3.7V LiPo Battery Pack and
supplies 5V power via a USB plug to the Raspberry Pi and Arduino. It supplies up to 5W (1000mA @ 5V) of good clean power to your USB connector. You can even charge your phone! The board has solar panel charge control system, a voltage booster, two A/D converters and an INA3221 on the SunAirPlus Board.
It has the charge control systems and GPIO interface circuitry systems for voltage level shifting and for servo motors as well as aiding in stepper motor control. SunAirPlus contains more robust ADS1015 A/D converters, INA3221 voltage and current sensing circuitry and an optional stepper motor controller.
It has the following other interfaces built into the board:
- Built-in I2C data gathering chips for system currents /voltages
- Built-in I2C Interface for Solar Tracking Photoresistor devices
- Built-in Interface for Servo motor or Stepper motor
- Built-in Interface for Limit Switches
Below is the block diagram of the SunAirPlus board.
Secrets
Directly Charging an iPhone / Android phone from SunAirPlus
You can directly plug your iPhone USB charging cord or your Android USB charging cord directly into the SunAirPlus J3 USB A Out plug.
You can’t usually charge your iPhone/iPad from a generic USB charger. You get the dreaded “charger not supported error”. The reason is that for the iPhone to recognize a charger, there needs to be a resistor network between the data pins.
A USB connector has 4 pins: +V, D-, D+, GND. The +V pin gives +5 V that charges the phone; while the D- and D+ pins are used for communications. The iPhone expects a certain voltage on the two data pions (D- / D+) pins to decide how much current to absorb from the charger.
The image to the left shows the network added to SunAirPlus to make the USB A Out plug compatible with Apple products and will charge up to 1000mA.
You don’t need a computer to charge your phone. Take SunAirPlus, add a LiPo battery and a solar panel, and you are off to the races!
Two Additional 12 bit Analog to Digital Inputs Available
SunAirPlus uses an ADS1015 4 channel 12 bit Analog to Digital Converter (ADC). The internal A/D converters on the Arduino are sufficient for reading the photoresistors used by SunAirPlus to track the sun, but since the Raspberry Pi has no built-in A/D converters, SunAirPlus includes a circuit to do this. SunAirPlus contains an excellent built-in 12 bit 4 channel A/D converter an I2C device known as the ADS1015. The ADS1015 is a precision analog-to-digital converter (ADC) with 12 bits of resolution. The ADS1015 features an onboard reference and oscillator. Data are transferred via an I2C-compatible serial interface; four I2C slave addresses can be selected.
SunAirPlus only uses two of the four channels. When you want to track the sun with SunAirPlus, you use two 20K Ohm photoresistors to determine where the sun is and then a stepper motor turns the solar panel to track the sun. Two of the ADS1015 channels are connected to the two pins that are provided for the photoresistors (JP1 and JP2). The other two ADC channels of the ADS1015 are available for your use on JP5. Both are unbuffered and can be connected to other analog sources for you to measure the voltage.
These two channels can perform conversions at rates up to 3300 samples per second (SPS) and can measure signals from 0 – 5V. Note: If you want to measure voltages higher than 5V, you must use a voltage divider to reduce the voltage below 5V.