Environmental Music Generator: Solar Solutions Final

For solar solutions, we set out to create an environmental music generator that would take in data from the real world and map different sensors to different aspects of music. In order to get this accomplished we ran with the Raspberry Pi using the Grove Pi add on for hardware and Sonic Pi for software music generation. The general flow started with the sun powering the Pi and the speakers and the Grove Pi sensors picking up data from the environment around it. From there the RPi would use Keypresses to signal to SonicPi to change the music whenever the sensor data fell out of a particular range.

Unfortunately, this project went uncompleted. There were a lot of missteps and miscalculations along the way; however, I think the biggest factor at fault here was scale. A huge takeaway from this project seems to simply be that sometimes it is possible to be too ambitious. While generally, the rule of thumb for these types of projects is that anything is possible with enough time if you plan it properly and do your prototyping, unfortunately we simply just did not have enough time to get what we want figured out, let alone accomplished.

Procedurally generated music isn’t an easy task, and one of the first missteps we took was deciding on Sonic Pi as a means for generating that music. By the time the software was decided, we were already only a few weeks from our deadline which meant pretty much all of our time leading up to the “launch date” was going to have to be devoted to figuring out just how Sonic Pi worked, leaving very little time to pivot once we’d realized that it wasn’t the correct route for our particular project. That isn’t to say that the program is severely lacking or unsuitable for all projects, in fact, I plan on using it myself to explore generating music with computers, however the lack of interfacing options available made it an extremely difficult product to work with for our particular needs.

While I focused mostly on the music generation side, I also know that my partner ran into quite a few problems with working with the Pi itself as well. From having to learn basic python to even start up the project to errors on updating to bad audio output, at every step the Pi side of the project also seemed like an uphill battle. While for me, I had to learn a new “language” to code music with Sonic Pi, it can’t even compete with the learning curve that Susan had to be up against simply because we assumed that the more-powerful-than-arduino pi was the best thing for what we wanted to do. After the fact/as we were wrapping up the project, it was suggested to us that the Teensy board which can even be coded with the Arduino IDE would have been a possible substitute. After looking into it, I couldn’t agree more. If we were to do this project again I would a) ask for more time and b) make sure to try out a Teensy because it cuts out a lot of unnecessary “hacking” around traditional interfacing.

Overall, I am disappointed that we didn’t walk away with what we wanted, and sure maybe even a little worried to see what the grade will come out to be. However, I know that watching as my classmates succeeded and seeing our presentation with practically nothing the lessons I learned from the final about project management are going to hit home 1 million times better than if I had simply turned in a more simple project and gotten an A. Originally, we were thinking about calling the project Apollo after the god of sun and music, but for me personally, I’m going to mark this down as Icarus because it is officially the first time I flew too close to the sun working on an IMA type project.

If you want to hear the project for yourself, just run this code first and then in a separate buffer run “slow_speed,” “med_speed,” “fast_speed,” “xfast_speed,” or “reverse.” Or just listen to this file.

define :slow_speed do
 xl = 4
 l = 2
 m = 1.5
 s = 1
 xs = 0.5
 
 light_notes = (ring 70, 67, 75, 63)
 light_under = (ring 62, 74, 63, 74)
 
 live_loop :light do
 with_fx :reverb do
 with_fx :echo, phase: xs, decay: l do
 4.times do
 use_synth :fm
 play light_notes.tick
 sleep xl
 end
 4.times do
 play light_under.tick
 sleep xl
 end
 end
 end
 end
 
 
 live_loop :under_light do
 with_fx :panslicer, phase: s do
 sync :light
 loop do
 sleep l
 play light_under.tick
 end
 end
 end
 
 live_loop :light_drums do
 sync :light
 loop do
 with_fx :reverb, room:1, damp: 0.7 do
 sample :drum_tom_lo_hard, rate: s, pitch_dis: 0.001
 sleep m
 sample :drum_tom_lo_hard, rate: l, pitch_dis: 0.001
 sleep xs
 end
 end
 sleep m
 end
end

define :med_speed do
 xl = 4
 l = 2
 m = 1.5
 s = 1
 xs = 0.5
 
 light_notes = (ring 70, 67, 75, 63)
 light_under = (ring 62, 74, 63, 74)
 
 live_loop :light do
 with_fx :reverb do
 with_fx :echo, phase: xs, decay: l do
 4.times do
 use_synth :fm
 play light_notes.tick
 sleep xl
 end
 4.times do
 play light_under.tick
 sleep xl
 end
 end
 end
 end
 
 
 live_loop :under_light do
 with_fx :panslicer, phase: s do
 sync :light
 loop do
 sleep l
 play light_under.tick
 end
 end
 end
 
 live_loop :light_drums do
 sync :light
 loop do
 with_fx :reverb, room:1, damp: 0.7 do
 sample :drum_tom_lo_hard, rate: s, pitch_dis: 0.001
 sleep m
 sample :drum_tom_lo_hard, rate: l, pitch_dis: 0.001
 sleep xs
 end
 end
 sleep m
 end
end

define :fast_speed do
 xl = 2
 l = 1
 m = 0.75
 s = 0.5
 xs = 0.25
 
 light_notes = (ring 70, 67, 75, 63)
 light_under = (ring 62, 74, 63, 74)
 
 live_loop :light do
 with_fx :reverb do
 with_fx :echo, phase: xs, decay: l do
 4.times do
 use_synth :fm
 play light_notes.tick
 sleep xl
 end
 4.times do
 play light_under.tick
 sleep xl
 end
 end
 end
 end
 
 
 live_loop :under_light do
 with_fx :panslicer, phase: s do
 sync :light
 loop do
 sleep l
 play light_under.tick
 end
 end
 end
 
 live_loop :light_drums do
 sync :light
 loop do
 with_fx :reverb, room:1, damp: 0.7 do
 sample :drum_tom_lo_hard, rate: s, pitch_dis: 0.001
 sleep m
 sample :drum_tom_lo_hard, rate: l, pitch_dis: 0.001
 sleep xs
 end
 end
 sleep m
 end
end

Solar Solution, Professor Dan Mikesell: Solar Art Final

 Initially, this project began as an ambitious art piece composed of a myriad of sensors and actuators. Shelby Firebaugh and I designed a semi-kinetic structure meant to be placed in the backyard. This structure would be a myriad of different sensors and actuators, and would be able to sense things like temperature, humidity, light, etc. In this system, the actuators would cause the kinetic statuettes placed within the larger structure to move. Ideally, each sensor would relay analog values to an analog actuator, which would in turn cause the kinetic statuette to move accordingly. Here is a sketch of this statuette.

IMG_1712 (1)

However, this idea was critiqued, and as a result Shelby and I decided to reevaluate and eventually go another route. While still brainstorming, Jamie Chuan joined our group, and together with Professor Dan Mikesell, we came up with a commentary art piece which would be our solar project.

This art piece would physically be composed of several cell phones strung up from the ceiling, hanging at different lengths. These phones would have their back lights turned on, and the culmination of several cell phones would ideally emulate a starry night. The meaning behind this piece is a commentary on how Shanghai, a mega city and bastion of man’s manufacturing abilities, no longer has stars. Moreover, what has replaced stars is the technology, like cell phones, which we now look to in the same way mankind once looked to the stars.

Constant discussions with Nofar Hamrany, who was coordinating to help us establish our art pieces in the back yard, helped us distinguish where the art piece should go. In the end, we decided to hang these cell phones from underneath the back-yards canopy. Unfortunately, this canopy offered no place to hang these cell phones. To remedy this, my group agreed to take metal wire and bend it into bars, which would intersect with the canopy’s support beams and create a rigid structure to hold the phones.

While a simple trip to the electronics market was enough to get some components for this piece, actually attaining the cell phones was difficult. After several weeks of research and failed attempts to acquire them, Jamie was able to attain 30 old and broken cellphones from which we could work. The next two days were spent dismantling the cell phones so that their screens and batteries were removed. When each cell phone was stripped of these components, we stored them away and got started on the wires.

TO allow for the cell phones to hang, we cut 1 meter of red and black stranded wire, and twisted them together using the drill. Then we soldered the black wire to the cathode of a white LED, and the anode to the red wire. Once we had wired all of our LEDs in this system, we drilled holes in the phones to allow for the LED to fit in the old phone’s screen. After a phone had been fitted with its LED, we hot glued the phone shut to prevent it from ever being opened again.

As the system would be powered from a 12v battery, we decided to use 27 phones and place sets of three in a series. Each of these series would then be placed in parallel with one another. We soldered a 150 Ohm resistor to each set of 3 LEDs, and then connected these groups in parallel with the others by connecting them with 1.5 meters of wire. When this was done, the system could even be powered of a 9 volt battery.

IMG_1816 (1)

IMG_1815 IMG_1814 IMG_1813

IMG_1812 IMG_1811 (1)

Installation only took a few hours to complete. My teammates and I bent the metal wire into 5 meter long segments, or “ribs” as I called it. In total we made 3 ribs, and then attached them to the canopy’s support beams. Once these were up and secure, we strung the phones across the ribs. By the end, we had hung 27 phones hanging, each capable of being lit from the solar panel’s 12 volt battery.

Final Project for Paper Arts and Solar Solutions // Ewa Oberska

My final project was an interactive solar powered book of essential knowledge for children. That was actually the best and shortest version of the name of the book that I managed to come up with.

The first stage of creating the book was making numerous sketches and plans of it in my sketchbook. I planned all the materials, scripts, made a schedule and planned out the layout of each page. I usually just improvise and work on my projects until they accidentally start looking good however, I did not want to risk this time because of the very limited amount of time and quite an ambitious idea, I believe.

I started the production process with making Adobe Illustrator designs for laser cutter. It actually gave me some grasp of Illustrator as I had never properly used it before. I cut out all the movable and interactive components of my book from wood however, I cut out only their contours so that there would be plenty of space to fill out using paper-cut elements.

There is one example of my paper cutting below. At first, it might look a bit as if it had been painted, but all the small components were painfully paper cut.Except the solar panels, I made them using little broken pieces of solar cells that I had left from making my own solar panel for this project.

13187681_1757396297828284_403797957_n

In the book all of the pages were covered with paper cut pieces. Also, some wood compartments were “camouflaged” and entirely covered in paper. Like below. In this case the paper covers all the circuits that are on top of the wooden “page”.

DSC_184713183098_1757396314494949_838984331_n13162528_1757396301161617_843918667_n

The circuits were quite a difficult task and took me countless hours to finally make them all work. The problem was that I did not want to have a book with a thousand wires sticking out of it. I decided to use conductive tape which turned out to be quite difficult to work with in case of bigger projects like this. However, I did eventually make it all work.

 

13219801_1757396304494950_1925392664_n13219905_1757396281161619_2050401897_n13183061_1757396337828280_1144969549_n

Overall, I believe I learnt quite a lot while doing this project. It was so much more time-absorbing than I ever expected, but I was quite happy with it.

Solar Solutions, Professor Dan Mikesell: Solar Pet

 Harnessing the awesome power the sun is no easy task. However, with the ever improving efforts of physicists to improve solar energy devices, this task has become largely democratized and therefore can be utilized for purposes like our own. Thus, the assignment to create a toy “pet” that utilized solar technology was well within our abilities.

            When designing this solar pet, I wanted to create a toy that had at least four characteristics. I wanted to build a solar pet that could move from one location to another location, had geared mechanisms, included some organic component, and was aesthetically cute. In respects to the mobility and organic component, I had failed. The solar power/motor capabilities were limited, as the motors typically suffered from very, very low torque.  Because of this, the motors didn’t provide enough power to actually move anything, and therefore rendered mobility impossible. Here were some potential designs for how the motor could allow for mobility.

For the organic component, I had initially envisioned adding a small potted plant to the final product. However, as this plant would have a weight most likely greater than the abilities of the motors’ torque, I immediately eliminated it from the final design.

I also had wanted the solar pet to be cute, and have an aesthetic that was appealing and pet like. Initially, I had a few ideas for how I could make my pet cute, but in the end I improvised. Here are a few of the initial designs.

Picture1

Picture2

Picture3

Picture4

Picture7

Picture6

The one way in which I can say I was relatively successful was in incorporating the geared mechanisms. The process of designing, fabricating, prototyping, and redoing these mechanisms took the most time and effort of the entire solar pet construction process. I began by thinking of ways in which I could have these low-torque motors actually make something substantial move. The solution was a geared system, which utilized a worm gear attached to the motor connected to a series of gears.

I began by designing a worm screw in tinker cad, which was simple as I could easily take an already existing worm-screw like shape and edit it to suit my cause.  I then printed the first version, a relatively wide but short worm screw, which I then attached to a sample motor for testing. Once the model was complete, I noted it’s dimensions and began to design gears on Geargenerator.com. Unfortunately, the design process and SVG files are not up to scale on the site, and therefore produce inaccurate SVG files. Attempts to 3D print the gears output by this website yielded unsuitable gears that did not mesh with the worm screw nor with each other.

The inefficacy of Geargenerator.com provided me with a challenge, as I now had to find an alternative way to design gears. The solution, as I realized, was to design the gear in Tinkercad along with the worm screw, so that I could create a gear that fit the worm screw perfectly. Using a custom gear shape within Tinkercad, I modified the object so that the gear’s teeth had lengths and widths congruent to the worm gear’s spirals. Once I had done this, I downloaded an SVG file of all the 3D models and placed this file into Adobe Illustrator. From here, I simply deleted all the other aspects of this file except for the gears, which I then converted into a laser cutter friendly format and tested.


Picture9

Picture8

After several tests, I concluded that these gears would indeed work with the worm screw, and opted to first alter the worm screw to make it longer, as well as increase the number of gears the solar pet would use. In respects to the worm gear, this change ultimately allowed me to have a better ability to turn the gears. In regards to changing the gears, I decided to create three gears in total, each of which consisted of two gears attacked alongside one another. One half of this gear would be large and have a greater number of teeth, while the second gear had almost half this gear’s diameter and fewer teeth. The idea was to connect the larger gear to the worm screw, which would in turn rotate the smaller gear. This would take the low power from the motor and amplify it slightly, giving the second gear a greater torque. The second gear would then take this torque, and using the same technique, amplify the torque from the first gear and rotate the third gear. Finally, this third gear would take the already amplified torque and use this to rotate the Solar Pet’s hands.

Finally, it was time to design the first iteration’s body. I did this by taking the already conceived design from the previous gears and creating a new SVG file in Adobe illustrator. Here, I created three identical sets of gears, a box to serve as the solar pet’s body, arms, and a cylindrical holder to keep the motor in place within the confines of the pet. Once this was done, I went about cutting this SVG and with the laser cutter on 5 mm clear acrylic. In addition, I took the schematic of the miller solar engine and created a perfboard version. I then connected this circuit to the motor with corkscrew and the solar panel. Having both the circuitry and mechanism completed, I then built the first iteration.

Picture10

This first iteration was successful in some aspects, but unsuccessful in others. The first issue I encountered was that I didn’t create segment to hold the axis of the gears. Therefore I had to drill makeshift holes into the laser cut body several times to get the gears in the right configuration. But even with the gears in their exact position, I still failed to keep them from sliding around on their axis, which there were inclined to do when being rotated via worm screw. A potential remedy I tried was attaching small springs to either side of the gears in the hopes of keeping the gears in place. Unfortunately, the spring often exerted too much force, one greater than the torque to turn them, resulting in a fixed and worthless gear. By cutting the springs and making them shorter, I eased some of this force, but still exerted way too much to allow the gears to turn as desired. Moreover, I learned that the laser cut arms were too heavy for the motor or gears to rotate. In addition, I found that the first body was a little bit too thin, as the board and motor barely fit within the confines of the laser cut box. Moreover, all these troubles sent me back to the drawing board to design the next iteration.

Learning from the mistakes of the first iteration, I created a better final body by making several adjustments. First, I made the box slightly larger to accommodate every internal component. Second, I designed holes which allowed me place the gears’ axis perfectly in relation to one another, so that they could make efficient contact. And finally, I designed a stand and a face so that this solar pet could satisfy the previously mentioned aesthetic aspect.

Construction of the pet the second time around was much easier, even though issues still occurred. This time I decided to hot glue to gears in place on their axis, so that they could not move as readily and maintained their position. In addition, I decided to extend the metal axis of the third gear and bend it so that when it was outside the solar pet’s body. The resulting and protruding two metal appendages resembled arms, to which I added felt hands. These hands further added to the aesthetic quality. Unfortunately, despite my best efforts, the gears would often get stuck, preventing the arms from rotating as I had planned. In a last ditch effort to have the arms at least move a little, I decided to only utilize the first gear directly connected to the worm screw, to ensure continuous, albeit slow, motion.

The final product was a cute little “Sol Troll”, which turned arms slowly and also included glowing red eyes.

Picture11

“(Final Backyard Project) Apollo: Environmental Music Generator, by Kadallah Burrowes and Zhuoling Shi (Susan), Instructor Daniel Mikesell

For this project, our concept was to create an environmental music generator which can read value from sensors and generate music according to the sensors.

There are 2 parts of this project: music programming and hardware processing. Kadallah was in charge of music programming and I was in charge of raspberry pi.

The equipments I used were raspberry pi 3, Grove pi+, grove air quality sensor, grove uv sensor, grove light sensor, grove temp & humi sensor, grove sound sensor and a grove LED.

I installed noobs on Raspberry pi.

IMG_2012

Then installed the Grovepi folder on the desktop.

IMG_2017

There were many other packages to be download in order to run raspberry pi with grove pi successfully.

After that I plugged in the grove and then the sensors.

I wrote some programs to read values from the sensors. The codes were modified from either wikipedia of those sensors or other tutorials.

Extra packages were needed to run the python code.

IMG_2022

In all the process above, the most common problem was that certain packages are needed to run certain functions, but I did not know what packages are needed. I spent 2 week on setting all these up.

After I got the sensors to work, I dowloaded the pikeyboard library in other to simulate keyboard in the program.

I set a range and if the value from a particular sensor changes out of the range, it will send out a key function.

The key function can change the content in sonic pi and change the music.

The problem that I encountered here was the music could only come out through HDMI from the monitor but could not be switched to headphone jack. I have been working for a week and tried all kinds of documentations but none of them worked. I asked Aven for help and he could not figure it out either. Days after, my boyfriend Jack B. Du came back from New York and helped me with this. He accidentally made the sound coming out of the headphone jack and default to be from headphone jack but the volume could not be changed by raspberry pi. We could not switch to HDMI in this case, either.

Another problem is that we wanted the program to run once it boots, however I only got it to run in the background and could not affect other programs. The way to fix it is to work in the command line instead of GUI. In this pi, there was no option to switch to GUI. I worked with my boyfriend and searched for plenty of tutorials and finally got the command lines.

The most serious problem in this project which caused it unable to work is that sonic pi does not have a command line interface, which means we have to use a monitor and a mouse to click on the sonic pi tab every time when it boots.

Mysterious Wifi Final Documentation

The final result of our project has gone through a long journey to get where it is now. The main idea is still there, a notebook on an isolated self contained network where people can write their secrets. What has changed is the technology used to implement it. Originally, we wanted to use the Raspberry Pi. I found several tutorials on turning the Pi into an access point and even managed to get the wifi working. However, configuring the dhcp server would not work even after clearing the system and reinstalling everything. After working with the Pi for about two weeks, we decided to use the Node MCU since it is much simpler to use but still has the capability to work as an access point and host a web server. Prudence worked extremely hard to get the web server and access point to work on the MCU, and I wrote the javascript for writing messages to the website.

Right now the project works like this. When a user writes something to the notebook, the message is added to the end of the URL so that it can be read. The message is then written to the SD card (because the space on the MCU is not very large). The server reads from the SD card, and then writes that information to the page.

Now all that is left is advertising and getting people to use it. I have several friends who are currently freshman, and I will get them to spread the word to others who will still be around next semester. I also really like the idea of creating posters around school with a simple message asking for people to share their secrets.

Mysterious Wifi Progress Update

In terms of our production process, we have already designed the notebook site. You can type in text, submit it, and it will show up on the page. The hotspot is functioning and can be connected to from any device which will then be able to use the website.

Right now, what we need to finish for Tuesday is connecting the webserver so that it can save the message log. Although the messages are saved and shown for one user, not everyone sees the same thing. Once the webserver is working, we will just want to polish the front end more.

On Thursday, we will show a demonstration of the website. We will use two computers and show that what is added on one is also added on the other. We will also invite our audience to connect to the hotspot on their phones and also send messages.
The user experience will involve discovering our network, and then connecting. The main experience will be on the chat page itself. The experience can either be a passive or an active one; users can choose to either just read what other’s secrets are, or post their own secrets.

 

Solar Solutions Final Project Blog Post

1) Where you are in the production process:

After a long process of finding the needed material and testing out the feasibility and capability of these materials according to our project space, our concept is fully planned out (down to the last measurement) and our materials finally secured. We have tested out all the phones and checked if they worked. Of the 31 old phones that we acquired, about 4-5 of them have working batteries and screens that light up. The rest are either missing a working battery or have far too specific a charger for us to find. For these phones, we dismantled them to view the inner workings of each and took out the screens. With the hollow place where the screen will be, we intend to place an led. We also disposed of the batteries that are no longer needed.

Going forward, we will need to place an led into each one of the screens and solder these leds to wires securely. We will then secure these phones and wires to our structure and then install the structure to the our project space (which is the overhang by the smoking area).

 

2) How you will finish your project for presentation on Thursday and what you will present:

We will try to finish the project up until the installation part by Thursday. We will make sure that the phones are well connected. If possible, we would like to attach the connections to the sturdy structure, but we will have to gauge if attachment to the structure immediately will be hard to move the entire structure around and present on Thursday (we could show both parts separately and only attach during installation). We will be leaving only the installation part for the installation date as we may need the structure to be on display for the ima show.

We will present the process behind our concept, the various difficulties we ran into, how we overcame these problems, and a retelling of the steps we took to reach our goal. We will have photographs and videos of our process to present and explanations of why we chose to use the methods we used.

 

3) How much energy your project will need:

We think we will be using the 12V battery.

 

  1. What the user experience will be:

The users will walk underneath the overhang area and gaze up at the mobile phones hanging above them. The mobile phones will be lit up by an led within. Users can see these junky old mobile phones lit up, visual commentary on the growth of technology and the pace of societal technology use, as well as on the waste generated from it.

 

  1. A photo of where your project will go in the garden:

Our work will be displayed here. The wire ribs will go across the overhang to hug either pole on both ends. Phones will hang down from the ribs.

Solar Solutions Final Projects

solar solutions | backyard project progress

Currently…

At this point in time, we have all of the phones that we need, as well as the materials to construct the “ribs” structure of the installation. We have sorted the phones out into ones that will light up when plugged in, and ones that will not. For the ones that will not light up, we have dissembled them and removed their screens. In the empty space where the screens were, we will place LEDs which we will power in place of a phone screen.

For Thursday

For Thursday, we will present the network of phones which will go on the rib structure. Since the structure itself will be large and must be made to fit the installation space, we will not present that portion in class. Between now and Thursday, we need to put LEDs into the phones that do not have screens, and solder on their connections. We will decide the layout of the network and how much wire is needed, and then connect all of the components. We also need to create the circuit that will attach our phone network to the main solar panel.

Energy

12V battery? Probably? Maybe? We shall test.

User Experience

Users will experience this installation by walking beneath it. The phones will hang from a rib-like structure that is mounted beneath the overhangs that mark the smoking area in the backyard. The phones will be lit up (either by their screens, or in the place where their screens should be), and hung by their connecting wires to the larger network of wire connecting all the phones along the ribs.

Where it will go

20160510_123652

 

 

 

 

 

 

 

 

 

It will be attached to the bars along a section of this overhang.

20160510_123624