Introduction: Solar Powered IPhone Charger and Arduino in a Book

  This project is ongoing, but it works well as is and I learned a lot from making it.  It has taken about 7 months to build, little by little, as I acquired knowledge and parts.  I was originally inspired by Honus' Mighty Minty Boost, so thanks to him.   In case some of you are wondering, yes, some of the close-up pictures were taken with my iPhone magnifying camera mod.
   This started as a solar powered 3v/5v power supply and phone charger in a book.  It turned into an evolving and continuously expanding project.  It has a charging circuit that charges several different sizes of lithium polymer batteries which in turn provide the power source for the regulated 3v/5v supplies.  They can be charged via the solar page in the book, USB, or wall wort with a 5v charger.  It has a circuit to charge my phone or other usb devices.  Later, I also put in an Arduino microcontroller, a speaker, mic, photo-cell, and some lights.  I use it as a portable testing bed for circuits and code.  I have intentions for more sensors and outputs in the future as well.
   The main compartment contains the electronics.  There is another compartment beneath which holds the wires and other accessories.  Between the bottom compartment and the back cover is an accordian folder for the "pages".   
   This project is conducive to individualization, so you may need to use other parts to achieve your desired goals.  For this reason I am not going to list materials up front, but I will explain which tools and materials that I used in each step.  If you have any questions, please ask and I will try to answer as best I can.  Of course, suggestions are also welcomed.
   To start, I chose to use the Diprotodon,(but would later change to the nearly identical   Koala)(Datasheet) from Sparkfun as my main board because it has a lithium polymer charging circuit, lots of space to play, and a usb to serial converter which lets it talk to a microcontroller (though I didn't know I would want this at the time).  I have a variety of batteries that it charges: 2000mAh, 200mAh, and a 110mAh.

Step 1: Choose a Book and Prepare It.

   Choose a book that is going to be the right size for what you want to put in it.  I wanted it to be relatively small, normal looking book.  I wanted everything to be contained inside with no visible plugs, wires, etc..  I hollowed mine out in two levels.  The top level is about 1" deep the bottom level is about 5/8" deep.  They are both about 4"x6".  I cut out a wooden template with my jigsaw.  This helped keep the pages evenly compressed as I cut with a utility knife.  It was slow going and a little messy but not too bad.
   After they were hollowed out, I brushed lots of glue (I used PVA, you can use white glue or whatever) on the walls inside the compartment, working the bristles of the brush inbetween the pages a little.  Then use some of the paper you cut out and line the inside of the compartments, firmly pressing it flat.  Allow to dry thoroughly.  You may want to do each compartment separately.  BE CAREFUL not to glue your book closed!  
  Next, I sliced the cover paper along the spine cover and allowed it to flap open to expose the spine.  I made measurements and drilled and cut holes in the spine for my various connections.    
   I then covered the entire outside with book cloth.

Step 2: Wiring It Up.

     First, I plundered all of my electronics for the parts I would need.  I wanted to be able to remove the board from the book to work on it so I decided to use JST and other connectors to connect everything to the board.  I used a slide switch wired to the aux. switch on the board to power it on and off.  This was then embedded in the spine of the book.   I used a contact switch to make a normally closed switch which would open the circuit for the embedded light strip, turning  the power off when the book is closed and on when it is openned.  Almost all of my solder connections get covered in Plastidip (got mine at the hardware store near spraypaint) to prevent shorting and reinforce the connection.  I used hot glue to embed everything which also reiforces and prevents shorts.
     Next, I lined the compartments and spine openning with decorative paper. I labled the connections on the spine flap and put in some screws and rubber bumpers for standoffs to hold the circuit board and battery in the top compartment. My enclosure was ready!

Step 3: Solar "Page"

   I ordered a piece of PowerFilm from Jameco.  It was rated at 6v 100ma. I tested it in full sun.  It was getting 9v and about 80-95mA short circuited.  I used an exacto blade to scratch away the plastic coating on the copper strips on either side.  I then soldered wires to those strips.  The side where the traces connect to the lead strip is positive.  Like this:

    + I----   I  -   
    
    I cut a piece of paper big enough to wrap around the sides of my panel, and cut the corners off to make tabs.  I poked two holes in the bottom tab that corresponded with the outside holes of a four-pronged female connector.  I used the outside holes and a larger connector to prevent the leads from coming in contact with each other and shorting the panel.  I soldered bare copper leads to my wires and stuck them through the holes before using doublestick to stick down the back first.  Then the tabs were folded over and stuck down. 
    At first I had it plugged directly into the aux. charging input on the Koala.  This worked, but not well.  The voltage fluctuated too much and went too high (over 7v)  for the max1555 charging chip on the Koala to handle, causing it to shut down.  I decided to put in an n4002 diode and a couple of 16v 470uf capacitors to smooth things out.  This worked very well.  It charges the smaller batteries very quickly (a couple of hours).  The larger, 2000mAh battery takes a couple of days of full sun.   That being said, I do intend to get another panel and hook it up in parallel making a bi-fold page to double the amperage.  

Step 4: Accordion Folder.

Between the back cover and the bottom compartment is an accordian folder for storing pages and such.  First, I cut two pieces of paper the same size.  I then folded them accordion style.  I  measured and  cutout a step-back for the dividers.  Next , I cut three dividers each is a half inch wider than the next to accomadate the stepbacks cut into the folded paper.  I labeled the dividers and glued the edges to the corresponding folds on the folded paper.  The tabs were glued into the book.  Again, be careful not to glue it closed.

Step 5: IPhone 3gs Output Circuit

Most devices that charge over USB do not use the data pins.  iPhones 3gs and later do.  Therefore, you need to have the correct voltages on the data pins for it to recognize your charger.  Luckily, the people at ladyada.com have been hard at work on this problem.  It seeems as though 2v needs to be supplied  to both of  the data pins in order for the iPhone to recognize the charger.  I used a little potentiometer for this. I tested it on a breadoard to be sure that I could get 2v  from a 5v supply out of it.  I soldered it in place, dialed it in to the correct (2v) voltage.  The connector for this circuit is a five pin (only four of which are used) connector that goes to a USB socket embedded in the spine of the book.  Here is a diagram of USB pinouts

Step 6: Coin Cell Socket

I used the coin cell holder from sparkfun.com along with a two wire terminal plug that I scavenged to make a socket for the 200mAh coin cell.  One wire (+) is soldered to the holder.  The other goes underneath the board and is soldered to a solder pad that goes through to the under (-) side of the battery.  The terminal is soldered into the aux. battery port paying attention to polarity. 

*It is important to note that the plug should only fit into the terminal one way to prevent reversing the polarity into your board.  Also,  you should not have both battery terminals connected to batteries at the same time. 

Step 7: Adding an Arduino!!

    Now for the fun part.   When I ordered my board, I ordered the Diprotodon.  I saw the comments that it had a usb to serial logic converter but the DTR wasn't broken out and laughed to myself.  I never thought I would use it.  I didn't know what it really meant.  I didn't care.  I wanted the lipo charger and regulated power supply.  I also thought that playing around with some surface mount lights might be fun.  Well, in the time since, I have learned of the usefulness of microcontrollers.  I decided that I wanted an Arduino in the book.  I then learned that the DTR pin on the Diprotodon was not broken out.  This is important for the Arduino to communicate properly with the computer throught the onboard usb/serial converter that I never thought I would use.  Moral of the story: Don't sell yourself short.  I ended up trading for the Koala.
    I purchased an atmega 328 bootstrapped with Arduino, a 16MHZ resonator, and some male and female headers.  The other parts (2x .1uf capacitors, 1 10k resistor, 1 220ohm resistor, an led for pin 19 (digital pin 13 on arduino), and a momentary switch) were all scavenged.  I would also recommend using a socket for your microcontroller.  I did not.  However, I wish I did, just for the possiblilty of future upgrades.
    I used the ardweeny schematic to wire everything up,  with pin prog 6 being the line that goes from the DTR port on the Koala (This was the most confusing part, I tried to explain it well in picture 4).  The TX on the Koala gets wired to the RX on the Atmega, and the RX on the Koala to the TX on the Atmega.  Wire the +5v to pin 7 and Ground to pin 8 and you are all set.  I used leftover leads trimmed from other projects etc. to make traces to connect the pins to the headers. These also work as rails on a breadboard.  I can put jumper wires or components through the holes in the top of the board to make connections to these rails.  They are not perfect connections but they are convienient.
 

Step 8: Speaker, Mic, and Photo-cell

    I scavenged the speaker and mic from an old cell phone.  The speaker had a hole in the center, so I thought it would be cool to put a light in there.  I then wired the speaker, light and mic to a six holed female connector (each component has two leads), and embedded it in the book as shown. 
   The photo-cell light sensor came from a broken night light.  I built in the circuit for the photo-cell so that it needs no additional circuitry.  It can just be plugged in to +5v , GND, and signal to the Arduino.  
    When I was finished embedding, I glued more paper over the holes and rough edges to clean it up a bit.
    The Microphone is going to be used as a sound sensor, but I still need to build the amplifier circuit for it. 

Step 9: Accessories / "Pages"

    I used several light strips in this project from some handheld novelty fans (Cheers to my wife's co-workers).  Here I show how I procured and utilized them. It was not easy to solder these up and I was not successful on my first attempt.  Maybe someday I will be able to solder the individual leads on each light and control each of them individually.
    For Jumper wires I soldered wires to headers in a variety of configurations.
    Because of the microcontroller, there are almost endless possibilities for this book.  I have taken some pictures of things that I made before I added the Arduino.  Others are in the works and pictures on the way.  Right now I can use the Arduino as a poor man's voltmeter to check my battery levels.  However, I intend to add an LCD for digital readouts soon.  I will post updates as I move along.

Step 10: In Operation (videos)

 
Here are some videos of the book working.  The first shows Ithe iPhone charging.  The second is a video of the solar charging page.  The next is uploading code which then plays a tune.  The fourth shows the use of the photocell to play light dependent tones.  Finally, remote control of Arduino using the iPhone app TouchOSC and Processing.