3X3 LED Multiplex, Shift Register (SN74HC595N), Accelerometer, ATtiny85 Microcontroller Experiment


This week in Homemade Hardware our assignment was to use the ATtiny85 Microcontroller to minify our projects. To get the ATtiny85 up and running you have to burn bootload it, I followed a tutorial at http://highlowtech.org/?p=1706 bolted it.


My goal for this project to have an Accelerometer control a 3X3 matrix of LEDs. A single LED would light up depending on the style of X and Y axis of the Accelerometer.

Because the ATtiny has limited about of pins so I muliplexed the LED array and used a Shift Register (SN74HC595N) to size out the amount of pins on the microcontroller.

3X3 LED Multiplex

Muliplex multiPlex_LEDs multiPlexTransistirs

Shift Register (SN74HC595N)

PinConfig Screen Shot 2015-09-09 at 8.57.11 PM




  • 0

Solar Panel Data Logger

For my final in Energy I team up with Hugo Lucena and we made a Solar Panel Data Logger.

This Data Logger logs the efficiency of a solar panel in any specific location. This module is an easy to use low cost module that can be installed in any location. It has specifically been designed for City roof tops to determine cost and feasibility of installing a full scale solar power systems.

On average the total cost of solar installation can be between $15,000 to $29,000 for average sized systems sized between 4kW and 8kW. This module can give the consumer the confidence need to make the switch to using a full sized solar powered system for there home.

A properly functioning solar system for apartment building can significantly lower energy costs through everyday energy uses like powering appliances like microwaves, dishwashers, lights etc.





Components used:

$29 Voltaic 2 Watt Solar Panel

$14.95 SparkFun USB Lipoly charge controller – single cell

$12.50 Lithium Ion Battery – 3.7v 1200mAh

$8.95 Spark Fun Current Sensor Breakout

$9.95 Arduino Pro Mini 328 – 3.3V/8MHz

$5.95 SparkFun 5V Step-up Breakout

$1.95 1 MByte SPI Flash EPROM

Libraries Used:

    – JeeLib library for Low power functions. Put Arduino & GSM to sleep when logging data is unnecessary.

    – Adafruit_TinyFlash that send the data from the Arduino to the EPROM while using the SPI library.

    – SPI library  connects with the Adafruit_TinyFlash library for logging data to the EPROM.

    – Software Serial library that defines RX TX pins and creates a serial port for talking to the GSM board.



Screen Shot 2015-05-11 at 8.52.13 PM

The EPROM is used to save and store the data read from the solar panel.

Ever 10 min the board wakes up and reads the current and voltage from the solar panel and calculates the total Energy and stores that Data to the EPROM. After the EPROM reaches 200 BYTES the DATA is sent vis GSM to a Server that visualizes the total energy over that year.

Every-time the data is sent to the server the next set of stored data overwrites the old data.

The SPI and Adafruit_TinyFlash libraries use PIN 10 & 12 by default as the Address pins, the SCL PIN is 11 and SDA PIN is 13 (as seen in schematic).


When using the EPROM you have to set an address and an Index that specifies where to write the data in its memory. Then When you want to write over that data you use that reference to write over.

We send the data from the EPROM by specifying the location of the data using the address and the index to put each compiled byte into a string.

Current Sensor Breakout:


This component is used in order to determine the real time current of the solar panel.


A voltage divider is used to make the voltage reference on the Arduino match the voltage rating on the solar panel. 

Because the voltage rating on the Arduino is 3.3 volts and the rating on the solar panel is 6 volts, a voltage divider was necessary so that we could accurately log the voltage coming out of the solar panel with the low power Arduino.

The voltage divider consist in two different resistors used in series so that the AnalogRead numbers at Arduino can always be proportional to its own internal voltage (3.3V). In this case, if the solar panel was generating 6V the Arduino would read it as 1v. This is accomplished by using resistance values of 1KΩ and 4.7KΩ. By doing this the voltage coming to Arduino will always be 1 / 5.7 the real time voltage from the solar panel. Doing the reverse math in the code will determine the voltage before the divider (SolarPannelVoltage = AnalogRead * 5.7). Its important to notice that the actual resistance of the resistor is not important if the ratio between them are the same as used here (1 to 4.7). If the ratio between the resistor changes the proportion between the AnalogRead in Arduino and the voltage on the solar panel will also change.

The position of the resistor on the setup is also very important as it determines the current flow in the system. The smaller resistance needs to be connected to ground so it will not make all the current run to Arduino (Path of least resistance). Also the current sensor need to be connected before the current divider so it will use the full voltage and current going to the battery for its reading. 

Some drawings on calculating the voltage divider:





The GSM shield sends our data over 4G network to our Server via GPRS. The GSM shield uses something called AT Commands that sends and receives the data.

Screen Shot 2015-05-11 at 12.47.52 PM

To send the data over the GSM we used GPRS GET commands to send over a 4G network. We used the Software Serial library to define new RX TX pins on the Arduino that connected to the GSM board. There is a class here at ITP called Towers of Power that concentrate on GSM networks that explores cellphone technologies and how to get projects communicating with a cell carriers that is taught by Benedetta Piantella here at ITP. I referenced a lot of what was taught in this class by consoling with Benedetta on how to use the GSM board. There are a series of AT Commands that need to be called in code to send the data. First you need established a connection and what channel is being used by calling AT+QIFGCNT=0, in our case we used channel 0. To establish the network provider, in our case we were on T-Mobile, we write: AT+QICSGP=1,”EPC.TMOBILE.COM”.  After establishing the provider we call the URL to our server by writing: AT+QHTTPURL=200,30, the first number is how many characters are in our URL (in our case we posted our data in the URL), there is a Maximum of 200 characters allowed in the URL, the second number is how many seconds to then input the URL. Our URL is, everything posted after the add/ is posted to our JSON file on our server. To finalize our connecting and post the data, we write an AT command called GET: AT+QHTTPGET=60, and this posts out data.


A voltage amplifier was necessary to power the GSM board because it was drawing 5 volts and a maximum current draw of 0.11 amps for about 30 seconds while sending data via GPRS 4G network.


  • 0

Jesus Shoes

For a long time we have all wonder what it would be like to WALK ON WATER. We all know of one person in history who successfully “walked the walk,” Jesus Christ. So I decided to bring us closer to the holy act of walking on water with the brand new “JESUS SHOES.”

Now with the power of Arduino and and your step you to can walk on water. (Only if you close your eyes and imagine you are actually on a lake or something, or Oculus Rift).

I used a Arduino Pro Mini and a Bluetooth module from adafruit called blueFruit easylink and a  lithium Ion Polymer Battery 3.7v to power it.

Screen Shot 2015-04-05 at 12.25.26 PM

I wrote a MAX MSP patch to connect to the arduino and program the interaction.

Screen Shot 2015-04-05 at 12.37.02 PM

Screen Shot 2015-04-05 at 12.36.21 PM

Screen Shot 2015-04-05 at 12.25.18 PM

Below is a picture of the circuit.

Screen Shot 2015-04-05 at 12.51.03 PM




Below is a picture of the fabricated heels that house the sensor, micro-controller and Bluetooth module.

Screen Shot 2015-04-05 at 12.52.17 PM

  • 0

Kinetic Energy Challenge.

For this Kinetic Challenge in the Energy class at ITP Yifan Hu and I worked  together to generate Kinetic energy out of a gear head stepper mot0r. We designed a gear box that is powered by manual input from the user. This input activates the gear train, the last and smallest gear is attached to the stepper motor. A stepper motor is made of many copper coils as seen in the picture below, at the center of the motor is a strong magnet.

Stepper_back_webIf electricity is applied to the coils of the stepper the magnet will spin and the shaft will spin which will in turn give you motion. The opposite is also true, if you manually spin the shaft which spins the magnet, the coils will push electricity in the opposite direction. We used a 1.5F 5.5V capacitor to store the energy generated out of spinning our motor / “charging” phase.  We made use of a bridge rectifier to ensure the electrical input was as smooth and consistent as possible.  The image below shows a circuit diagram for the completed circuit. With 30s of input we stored enough energy to the capacitors and were successfully able to keep a series of LEDs lite for 30 min without any other input.

Below is a image of the circuit. The stepper has 4 wires that correspond to the different coils inside the motor so we were able to store energy into two capacitors for two series of LEDs.


Below is an image of the gear after cutting them out on the CNC (3 axis router).


We custom made ever part on the gear box, below is a picture of our axles that hold the gears in place.


Below is a picture of the CNC cutting out the face of our box.


Bending our crank handle witch is attached to the largest gear.


Below is a picture of all our parts.



Completed, charged, and lights on.


  • 1

Nature of Code Mid Term
















Screen Shot 2015-03-22 at 2.40.15 PM












Screen Shot 2015-03-22 at 5.13.05 PM













Screen Shot 2015-03-22 at 5.21.29 PM













Screen Shot 2015-03-22 at 6.39.42 PM













Screen Shot 2015-03-22 at 10.55.09 PM













Screen Shot 2015-03-22 at 11.32.35 PM














Screen Shot 2015-03-22 at 11.57.18 PM













Screen Shot 2015-03-23 at 10.34.24 AM

  • 0