FerroFluid Speaker

by vonas1 in Circuits > Arduino

6939 Views, 7 Favorites, 0 Comments

FerroFluid Speaker

FerroFluid Speaker (1).png
Capture.JPG
Capture.JPG

This is the process I followed when creating my ferrofluid speaker, pictured above.

How it works: A phone or computer connects to a Bluetooth amp chip and that chip drives the speakers. A microphone and an electromagnet is connected to a satshakit (DIY arduino) on the interior of a laser cut container. The microphone is triggered at the base volume of the speakers and stops being triggered at the max volume (using a MAP function). The decibel level is converted into the values 0-250 (also using the MAP function) and the analog write function writes that value to the electromagnet. The electromagnet is situated behind a frosted acrylic box which has ferrofluid in a custom emulsion to minimize staining of the acrylic. The ferrofluid dances when the electromagnet pulses according to the music.

Downloads

Supplies

Here are all the materials, tools etc that I used. LINKS TO PURCHASE ITEMS

- bluetooth/speaker module

- speakers

- ferrofluid

- electromagnet

- audio jacks (TRRS)

- microphone board

- 100 nf, 10nf, 33pf capacitors

- assorted resistors

- wires

- all the parts needed for a satshakit

tools

- laser cutter

- bantam mill machine

- wire cutters

- soldering iron + solder

CAD

- corel draw

- eagle CAD

Speaker

Capture.JPG

The bluetooth amp chip module is preconstructed so that everything needed to operate speakers via blueooth is included. Take two speakers and solder a wire to each node (2 wires per speaker), then plug those wires into the (+-) ports on the bluetooth module board. There is also a 5v and GND port on the bluetooth module. Connect two wires to those, and connect that to a battery. The blue light on the module will flash. The device will show up as "DW-CT14+' on your iphone/computer any modern device that supports bluetooth 5.0, pair the devices and you will hear a little ding. After that ding, you can play your music.

Microphone and Electromagnet

The ferrofluid will dance because of the output from an electromagnet behind it. The electromagnet will be controlled by an Arduino, which will take input from a microphone which will help "decide" if the electromagnet should be turned on or off. As a side note, an LED will also be flashed with brightness varying according to the volume of the music detected by the microphone. As a note, I will note actually use an arduino, but mill a satshakit (DIY arduino) and another board with the wiring for the microphone, LED and electromagnet.

Microphone and Electromagnet Part A: Wiring

Capture.JPG
Capture.JPG
Capture.JPG
Capture.JPG
Capture.JPG
Capture.JPG

The wiring for the microphone is simple. It connects to GND, 5V, and audio. There is an optional pin on this device that we will not use. The electromagnet is more complicated. We will follow this schematic in the photos. Note: control goes to arduino. I mocked up this wiring on a bread board to make sure it works before I mill a board for it, but you can go straight to milling. Here is what my boards/schematics looked like: Note: I marked up the boards with a sharpie so i wouldn't forget which port was which.

I soldered all the components to these boards. The Bootloaders for the satshakit had to be burned: check out this tutorial I wrote the first time i built a satshakit and the satshakit tutorial webpage for more detailed instructions on how to do that.

Microphone and Electromagnet Part B: Code

Capture.JPG

Here is the code I developed for the satshakit and the electromagnet/ mic setup. Basically, it constantly samples the mic analog input, changes the mic input to the correct output scale for an LED, outputs that value to an LED (the higher the value the greater the brightness) and then if the value is high enough it turns the elctromagnet on. If the value is low, the electromagnet turns off. This code was compiled and uploaded to the satshakit through Arduino IDE, using an arduino as a programer. If you want more instructions on how to do that, see the links from Part A, or refer to this link

FILE:

//////////

//#include

const int micPin = A0;

int LED = 6;

int MAG = 3;

int micVal = 0;

int y = 0;

void setup() {

//Initialize Serial

//Serial.begin(9600);

//Serial.println(F("Initialize System"));

//Init Microphone

pinMode(micPin, INPUT);

pinMode(LED, OUTPUT);

pinMode(MAG, OUTPUT); }

void loop() {

readMicrophone(); }

void readMicrophone( ) {

/* function readMicrophone */

////Test routine for Microphone

micVal = analogRead(micPin);

y = map(micVal, 550, 600, 0, 250);

//Serial.print(F("mic val ")); Serial.println(micVal);

//Serial.print(F("y ")); Serial.println(y);

digitalWrite(MAG, HIGH);

analogWrite(LED, y);

delay(50);

digitalWrite(MAG, LOW);

}

//map function: 4 digits: lowest value read to highest value read, next 2: lowest output to highest output

//////////

Laser Cutting Box

Capture.JPG
Capture.JPG

Now we need something that holds all the electronics and the speakers. I designed a box with 3 compartments (top middle and bottom). The speakers go in the top compartment, and there are two holes for the speakers to stick out. The middle has the other electronics, and it is where the acrylic box with the ferrofluid will be. There is a mini section which is slightly bigger than the acrylic box, to snugly hold the acrylic in place. There is a hole at the front so the acrylic box can be seen from the outside. The bottom is just for routing wires and power. I designed it on fusion 360 and laser cut it on an Epilog laser cutter. I used tabs to fit it all together. Here it is assembled loosely. I glued it together once I put all the electronics in.

Acrylic + Ferrofluid Suspension

Capture.JPG
Capture.JPG
Capture.JPG
Capture.JPG

The acrylic box for the ferrofluid was cut out last step. I hot glued it together and used my hands/ clamps to hold it while it dried. The tricky part was getting the ferrofluid(hydrophobic) to be attracted to and stick to the inside of the plastic (also hydrophobic). The ferrofluid had to be suspended in water so it kept its shape (hydrophillic) exacerbating the project. The only thing I found that worked (somewhat) was mixing water with liquid soap (which had a hydrophobic and hydrophilic end, so the hydrophobic end was attracted to the hydrophobic plastic, while the hydrophillic end faced the water, forming a barrier and coating the acrylic so the ferrofluid (hydrophobic) would not even get to the acrylic and stick.

A bunch of photos show me experimenting with different solutions, how bad the staining was without the soap+ water solution, and how good the ferrofluid looks in the soap/water suspension

for a better explanation of the chemistry, see your local high school chem teacher or these youtube videos/websites:

video 1

video 2

website

Assemble

I attached the board to a 9v DC plug for the electromagnet and I attached the speaker to 5v batteries. I glued everything except the back and the top so i can change the batteries/ change out components if it needs to be fixed/ change things I feel need changing.

Et voila! I hope this was helpful. If you have any questions, email me at 22vonas@charlottelatin.org