{"id":464,"date":"2016-04-19T01:22:12","date_gmt":"2016-04-19T01:22:12","guid":{"rendered":"http:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/?p=464"},"modified":"2016-04-19T01:22:12","modified_gmt":"2016-04-19T01:22:12","slug":"progress-report-4182016","status":"publish","type":"post","link":"https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/2016\/04\/19\/progress-report-4182016\/","title":{"rendered":"Progress Report 4\/18\/2016"},"content":{"rendered":"<p>After buying all the items I need for the project, I started working on getting the software part of the project working. As outlined in the Project Proposal, the first step was getting Processing to output the FFT spectrum of a playing music track on my laptop. There were a lot of helpful tutorials online and they helped me get the real-time FFT data of the song\/microphone input. After, looking around what others have done for Arduino-Processing Spectrum Analyzer projects, I realized that the highest frequency content of the spectrum is about 5kHz for most songs instead of the full human hearing range of up to 20kHz. Therefore, I divided the frequencies from 0 to 5.6kHz into six frequency bins in Processing as shown below.<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-466\" src=\"http:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-content\/uploads\/2016\/04\/freq-division-300x42.jpg\" alt=\"freq division\" width=\"657\" height=\"92\" srcset=\"https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-content\/uploads\/2016\/04\/freq-division-300x42.jpg 300w, https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-content\/uploads\/2016\/04\/freq-division-768x107.jpg 768w, https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-content\/uploads\/2016\/04\/freq-division.jpg 972w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<p>The frequency bin heights were limited from 0 &#8211; 255 to be compatible with the Arduino PWM write function. Different scale factors were used for the human voice bin and the low frequency treble bin since they were pretty small compared to the bass height. A real-time visualization of the FFT spectrum can also be plotted on Processing.\u00a0<img decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-468 aligncenter\" src=\"http:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-content\/uploads\/2016\/04\/fft-spec-300x250.jpg\" alt=\"fft spec\" width=\"300\" height=\"250\" srcset=\"https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-content\/uploads\/2016\/04\/fft-spec-300x250.jpg 300w, https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-content\/uploads\/2016\/04\/fft-spec.jpg 517w\" sizes=\"(max-width: 300px) 85vw, 300px\" \/><\/p>\n<p>Now that these frequency array values are ranging from 0 to 255, I sent them to Arduino using a for loop. Before each iteration of sending data, 0xFF was sent first for synchronization purposes. In Arduino, the code was written so that Arduino starts reading data by byte once 0xFF was recieved through\u00a0the serial port. Equal for loop delay of 5ms and main loop delay of 10ms were added in\u00a0both Processing and Arduino scripts\u00a0to further ensure the data transfer synchronization. It was confirmed that the data transfer between Arduino and Processing was synchronized by sending constant input from Processing and observing the same output at Arduino.<\/p>\n<p>Now that the software part of the project is mostly done, I started working on the hardware part, which is the vibration motor matrix\u00a0and how the motors\u00a0come together with the sphere magnets and the petri-dish containing ferrofluid. Using cardboard boxes, I tried to make a fixture for the motor matrix. Little did I know was that there is a considerable attraction between the ferrofluid and the magnets as well as the motors, which means that the plan to vibrate the sphere magnets to change the magnetic field is not gonna work since everything is sticking to one another&#8230;<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-491 size-medium\" src=\"http:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-content\/uploads\/2016\/04\/12990971_507563189431572_2024781462027586155_n-e1461028736937-295x300.jpg\" alt=\"12990971_507563189431572_2024781462027586155_n\" width=\"295\" height=\"300\" srcset=\"https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-content\/uploads\/2016\/04\/12990971_507563189431572_2024781462027586155_n-e1461028736937-295x300.jpg 295w, https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-content\/uploads\/2016\/04\/12990971_507563189431572_2024781462027586155_n-e1461028736937.jpg 597w\" sizes=\"(max-width: 295px) 85vw, 295px\" \/><\/p>\n<p>So I thought about changing the magnetic field without having any moving parts, which leads me to the idea of using electromagnets instead of permanent magnets. Having spent about 35 dollars on the sphere magnets and vibration motors, all of which have become useless now, I was actually hesitant on buying new materials, so I went ahead and bought six of these\u00a0small and cheap electromagnet brakes from Amazon shown below with two day shipping.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-470 aligncenter\" src=\"http:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-content\/uploads\/2016\/04\/small-electromagnet-brake-300x300.jpg\" alt=\"small electromagnet brake\" width=\"214\" height=\"214\" srcset=\"https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-content\/uploads\/2016\/04\/small-electromagnet-brake-300x300.jpg 300w, https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-content\/uploads\/2016\/04\/small-electromagnet-brake-150x150.jpg 150w, https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-content\/uploads\/2016\/04\/small-electromagnet-brake-768x768.jpg 768w, https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-content\/uploads\/2016\/04\/small-electromagnet-brake.jpg 1000w\" sizes=\"(max-width: 214px) 85vw, 214px\" \/><\/p>\n<p>It turns out that the magnetic field they produce is too small and nothing but a small bump appears on the ferrofluid when they are powered. Another 27 dollars was wasted&#8230;<\/p>\n<p>At this point, I was pretty disappointed because I have spent so much money and nothing really seemed to be working as I expected. I knew I needed a strong electromagnet but I have no idea how strong and how much money I should be spending. I saw some Youtube videos testing some lift electromagnets and thought I should give it a try. So I purchased three of the 12V 5.6lbs lift electromagnets from Amazon with two-day shipping.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-472 aligncenter\" src=\"http:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-content\/uploads\/2016\/04\/pixnor-electromagnet-300x300.jpg\" alt=\"pixnor electromagnet\" width=\"300\" height=\"300\" srcset=\"https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-content\/uploads\/2016\/04\/pixnor-electromagnet-300x300.jpg 300w, https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-content\/uploads\/2016\/04\/pixnor-electromagnet-150x150.jpg 150w, https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-content\/uploads\/2016\/04\/pixnor-electromagnet.jpg 500w\" sizes=\"(max-width: 300px) 85vw, 300px\" \/><\/p>\n<p>By using a transistor and a 12V power supply from AK227 lab, I was able to control the strength of the electromagnet with Arduino. With only ferrofluid in the petri-dish, the movement of the ferrofluid due to the changing magnetic field strength from the electromagnet looks like this following video (It&#8217;s not my experiment, I forgot to document this phase). Instead of the spikes as in the case with a strong rare earth metal, a rather large bump was witnessed even when the electromagnet is at full power (12V, 0.25A).<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-473 aligncenter\" src=\"http:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-content\/uploads\/2016\/04\/Ferrofluid_large_spikes-300x225.jpg\" alt=\"Ferrofluid_large_spikes\" width=\"300\" height=\"225\" srcset=\"https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-content\/uploads\/2016\/04\/Ferrofluid_large_spikes-300x225.jpg 300w, https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-content\/uploads\/2016\/04\/Ferrofluid_large_spikes-768x576.jpg 768w, https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-content\/uploads\/2016\/04\/Ferrofluid_large_spikes-1024x768.jpg 1024w, https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-content\/uploads\/2016\/04\/Ferrofluid_large_spikes-1200x900.jpg 1200w, https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-content\/uploads\/2016\/04\/Ferrofluid_large_spikes.jpg 2048w\" sizes=\"(max-width: 300px) 85vw, 300px\" \/><\/p>\n<p><iframe loading=\"lazy\" width=\"840\" height=\"473\" src=\"https:\/\/www.youtube.com\/embed\/CSNcmmrExNs?feature=oembed\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<p>At this point, I was quite happy with the results since I can see the change in the magnetic field with the incoming music FFT data. But I was not quite satisfied because I thought I was gonna see the spikes with this electromagnet since it is relatively strong. Also, I know that without the spikes, I would not see the cool patterns even when I put the glow material into the ferrofluid.<\/p>\n<p>I did more research online looking for an explanation of why I am getting just a bump and not spikes with the electromagnet but to no avail. Then, somewhere on the Amazon website, I also saw this ferrofluid suspension in a bottle filled with water-like liquid. At this point, my\u00a0plan has changed from hunting for the ferrofluid spikes to just creating a cool visual\u00a0by turning on one electromagnet of the three I have at a time\u00a0and make the ferrofluid chase the electromagnet that is turned on. The light art aspect of this idea would be to just use a RGB led to light up the water-like fluid part with incoming music data.<\/p>\n<p><iframe loading=\"lazy\" width=\"840\" height=\"473\" src=\"https:\/\/www.youtube.com\/embed\/sFOv6_L5C-k?feature=oembed\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<p>So I did more research about what that water-like fluid is, and it turned out to be\u00a070% isopropyl alcohol. I have a bottle of 91%\u00a0isopropyl alcohol sitting in the bathroom closet so I tried with that but it does not seem to work as the ferrofluid just sinks to the bottom and smears all over the container as I drag the magnet around it. So, I took a quick trip\u00a0to the local CVS and bought one of the 70%\u00a0isopropyl rubbing alcohol and it worked. Then, I tested it with the electromagnets that I bought and little did I know that it would also form spikes when the electromagnets are powered on. I hooked the experiment up with my laptop and Arduino and start playing songs with really nice beats. The results are below&#8230;<\/p>\n<p>This first one is with all three electromagnets being driven with the bass FFT data.<\/p>\n<p><iframe loading=\"lazy\" width=\"840\" height=\"473\" src=\"https:\/\/www.youtube.com\/embed\/14XEQWP7iRA?feature=oembed\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<p>The following ones are made with bass, voice, and low frequency treble data. Can you tell which one is which?<\/p>\n<p><iframe loading=\"lazy\" width=\"840\" height=\"473\" src=\"https:\/\/www.youtube.com\/embed\/MLPw9GCVrLQ?feature=oembed\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<p><iframe loading=\"lazy\" width=\"840\" height=\"473\" src=\"https:\/\/www.youtube.com\/embed\/hoDitST9VX8?feature=oembed\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<p><iframe loading=\"lazy\" width=\"840\" height=\"473\" src=\"https:\/\/www.youtube.com\/embed\/rg9HyMNvQQY?feature=oembed\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<p>I know it is hard to see because it is clear, but the\u00a070% sopropyl rubbing alcohol is in the cup. Also, I used a plastic cup because I did not have a glass petri dish.<\/p>\n<p>So once again, and I hope this is the last time, I went onto Amazon and bought three more of the same electromagnets that I already have and 5 glass petri-dishes and a jar of glow paint since getting the glow material out of the glow sticks is extremely messy and difficult.<\/p>\n<p>At this point, I think the majority, or at least the hard part, of this project has been accomplished and I have spent $193 with about $60 spent on items that are not gonna be used at all.\u00a0Looking forward, I will include the Light Art aspect into it by first using the glow paint with the\u00a070%\u00a0isopropyl rubbing alcohol. I am not sure if that is even gonna work since it&#8217;s not really mixing the paint with water but if it did not, I will use an RGB led and light the glass petri-dish from the bottom and have the RGB led change color with the music.<\/p>\n<p>Here is also a picture of the setup in AK227 lab. For the project demonstration, I will have to borrow a 12V power supply in order to power up the six power-hungry electromagnets.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-477 aligncenter\" src=\"http:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-content\/uploads\/2016\/04\/IMG_2833-300x225.jpg\" alt=\"IMG_2833\" width=\"300\" height=\"225\" srcset=\"https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-content\/uploads\/2016\/04\/IMG_2833-300x225.jpg 300w, https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-content\/uploads\/2016\/04\/IMG_2833-768x576.jpg 768w, https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-content\/uploads\/2016\/04\/IMG_2833-1024x768.jpg 1024w, https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-content\/uploads\/2016\/04\/IMG_2833-1200x900.jpg 1200w\" sizes=\"(max-width: 300px) 85vw, 300px\" \/><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-475 aligncenter\" src=\"http:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-content\/uploads\/2016\/04\/IMG_2831-300x225.jpg\" alt=\"IMG_2831\" width=\"300\" height=\"225\" srcset=\"https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-content\/uploads\/2016\/04\/IMG_2831-300x225.jpg 300w, https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-content\/uploads\/2016\/04\/IMG_2831-768x576.jpg 768w, https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-content\/uploads\/2016\/04\/IMG_2831-1024x768.jpg 1024w, https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-content\/uploads\/2016\/04\/IMG_2831-1200x900.jpg 1200w\" sizes=\"(max-width: 300px) 85vw, 300px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>After buying all the items I need for the project, I started working on getting the software part of the project working. As outlined in the Project Proposal, the first step was getting Processing to output the FFT spectrum of a playing music track on my laptop. There were a lot of helpful tutorials online &hellip; <a href=\"https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/2016\/04\/19\/progress-report-4182016\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Progress Report 4\/18\/2016&#8221;<\/span><\/a><\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-json\/wp\/v2\/posts\/464"}],"collection":[{"href":"https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-json\/wp\/v2\/comments?post=464"}],"version-history":[{"count":10,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-json\/wp\/v2\/posts\/464\/revisions"}],"predecessor-version":[{"id":494,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-json\/wp\/v2\/posts\/464\/revisions\/494"}],"wp:attachment":[{"href":"https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-json\/wp\/v2\/media?parent=464"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-json\/wp\/v2\/categories?post=464"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/lightart_D16\/wp-json\/wp\/v2\/tags?post=464"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}