Want to build your own FerroFluid motor? Well, here's all the steps to get you on your way!
You'll be able to build it within a days work if you have all materials and parts available. Some may need more time to fine-tune the system, but this guide will summarize the process. It should be less work than we did to figure things out because you won't experience the difficulties, trials, and errors we faced.
You might also be able to build this system more effectively and with better performance than we did & hopefully you can apply this to real life situations or even test its application on a CubeSat!
You might also be able to build this system more effectively and with better performance than we did & hopefully you can apply this to real life situations or even test its application on a CubeSat!
First Step: getting your parts ready!
- A Power Supply to power the system.
- An Arduino with support software for programming. This will be the main driver of your build.
- Coils, you can either build your own coils or try to find some pre-built ones (though they are quite difficult to find).
- Motor Drivers, this will take output signals from your Arduino and amplify the power supplied from your Power Supply and then output it to the Coils.
- 3D Printer or access to one. This will be used to print the container and stator frame if you don't plan on making them by hand using wood or other materials.
- CAD Software & Slicers for the printing service.
- FerroFluid. 10-Oz or more would be enough.
- Either Plasti-dip or Flex-Seal or any other Rubberized spray to make sure your parts can hold ferrofluid without seepage and protect your circuit from shortage from accidental spillage.
- An Arduino with support software for programming. This will be the main driver of your build.
- Coils, you can either build your own coils or try to find some pre-built ones (though they are quite difficult to find).
- Motor Drivers, this will take output signals from your Arduino and amplify the power supplied from your Power Supply and then output it to the Coils.
- 3D Printer or access to one. This will be used to print the container and stator frame if you don't plan on making them by hand using wood or other materials.
- CAD Software & Slicers for the printing service.
- FerroFluid. 10-Oz or more would be enough.
- Either Plasti-dip or Flex-Seal or any other Rubberized spray to make sure your parts can hold ferrofluid without seepage and protect your circuit from shortage from accidental spillage.
-supplement materials
- Screws & glue to hold your coils to your frames
- LEDs to be used to visually see your Arduino outputs
- Potentiometers, this can be used instead of hard-coding for On-The-Fly circuit tuning. ex. Signal Frequency, Signal Duration, and code switching. Your Arduino can read the resistance and use the data in your code instead of hard-coding numbers and needing to reset and Program when changing values.
- Switches, these can be used with your Arduino to switch between codes if need be and you'll only need one code to run multiple different configurations based on which switch is turned on.
- Connector Pin Kits. this can help with easier swaps between your circuit and your fluid machines if you want to change between configurations easily. (This is Recommended- you'll likely want to create different coil configurations while keeping your other ones that are working untouched)
- LEDs to be used to visually see your Arduino outputs
- Potentiometers, this can be used instead of hard-coding for On-The-Fly circuit tuning. ex. Signal Frequency, Signal Duration, and code switching. Your Arduino can read the resistance and use the data in your code instead of hard-coding numbers and needing to reset and Program when changing values.
- Switches, these can be used with your Arduino to switch between codes if need be and you'll only need one code to run multiple different configurations based on which switch is turned on.
- Connector Pin Kits. this can help with easier swaps between your circuit and your fluid machines if you want to change between configurations easily. (This is Recommended- you'll likely want to create different coil configurations while keeping your other ones that are working untouched)
Second Step: Coding your Arduino and verifying functions!
Now that all your parts are ready, we need to move on to coding.
For your convenience I have uploaded my code here for you to use, you can change output & input pins and values as you please to suit your needs.
It's fairly easy to dissect this code, but I will add some comments to help you understand its functions.
For your convenience I have uploaded my code here for you to use, you can change output & input pins and values as you please to suit your needs.
It's fairly easy to dissect this code, but I will add some comments to help you understand its functions.
int OUT0 = 9;
int OUT1 = 10;
int OUT2 = 6;
int OUT3 = 11;
int OUT4 = 5;
int OUT5 = 3;
int sensorPin = A0;
int sensorPin2 = A1;
int sensorValue = 0;
int sensorValue2 = 0;
int v1 = 13;
int v2 = 12;
int v3 = 7;
//These 3 variables are used for the values for the variables below, but these dictate which pin they read from.
//These 3 values below store the values from the above pins and are connected to
//my switches and are used to dictate which code will be used to run.
int v11 = 0;
int v22 = 0;
int v33 = 0;
void setup() {
pinMode(OUT0, OUTPUT); // these tell the arduino which pins are used to output signals
pinMode(OUT1, OUTPUT); // and which are used to read signals from
pinMode(OUT2, OUTPUT);
pinMode(OUT3, OUTPUT);
pinMode(OUT4, OUTPUT);
pinMode(OUT5, OUTPUT);
pinMode(v1, INPUT);
pinMode(v2, INPUT);
pinMode(v3, INPUT);
}
void loop() {
// here we initiate some variables and store a "0".
int statePIN = 0;
int stateOUT = 0;
// here we use the variable to read the resistance of the potentiometer connected the corresponding pin
sensorValue2 = analogRead(sensorPin2);
// the resistance is then stored in this vairable and the value is divided by a number to scale it accordingly
// your potentiometer may need a different divider if its resistance range is different
int x_pin1= (sensorValue2 )/10;
// here we read all three switches pins to see which part of the code will run, remember this runs
// from top to bottom, so you must ensure your other switches are off and your
// desired switch is turned on or else it will run whichever switch is on from the order it reads it in.
v11=digitalRead(v1);
v22=digitalRead(v2);
v33=digitalRead(v3);
//This is the code that outputs the signal
while(1) {
if(v11 == HIGH) { // this part turns on 6 coils, one coil at a time
int x_pin1= (sensorValue2 )/10;
if(statePIN == 0) {
digitalWrite(OUT0, HIGH);
digitalWrite(OUT5, LOW);
statePIN = 1;
sensorValue2 = analogRead(sensorPin2);// your resistance value here dictates how long it waits
delay(x_pin1); // in the delay function here until it turns on the other coils
} // this is effectively your frequency
else if (statePIN == 1) {
digitalWrite(OUT0, LOW);
digitalWrite(OUT1, HIGH);
statePIN = 2;
delay(x_pin1);
}
else if (statePIN == 2) {
digitalWrite(OUT2, HIGH); //The High and low signals are sent to your dirvers and amplified to your coils
digitalWrite(OUT1, LOW);
statePIN = 3;
delay(x_pin1);
}
else if(statePIN == 3) {
digitalWrite(OUT2, LOW);
digitalWrite(OUT3, HIGH);
statePIN = 4;
sensorValue2 = analogRead(sensorPin2);
delay(x_pin1);
}
else if (statePIN == 4) {
digitalWrite(OUT3, LOW);
digitalWrite(OUT4, HIGH);
statePIN = 5;
delay(x_pin1);
}
else if (statePIN == 5) {
digitalWrite(OUT4, LOW);
digitalWrite(OUT5, HIGH);
digitalWrite(OUT3, LOW);
statePIN = 0;
delay(x_pin1);
v11=digitalRead(v1);
v22=digitalRead(v2);
v33=digitalRead(v3);
}
delay(sensorValue/4);
}
else if (v22 == HIGH) { // This is the other code if your second switch is on
int x_pin1= (sensorValue2 )/20; // this part only turns on 3 coils, one coil at a time
if(statePIN == 0) {
digitalWrite(OUT0, HIGH);
digitalWrite(OUT3, LOW);
statePIN = 1;
sensorValue2 = analogRead(sensorPin2);
delay(x_pin1);
}
else if (statePIN == 1) {
digitalWrite(OUT0, LOW);
digitalWrite(OUT1, HIGH);
statePIN = 2;
delay(x_pin1);
}
else if (statePIN == 2) {
digitalWrite(OUT3, HIGH);
digitalWrite(OUT1, LOW);
statePIN = 0;
delay(x_pin1);
v11=digitalRead(v1);
v22=digitalRead(v2);
v33=digitalRead(v3);
}
delay(sensorValue/4);
}
else if(v33 == HIGH) { // this part is the one that worked the best for us and it's what we used
int x_pin1= (sensorValue2 )/20; // primarily, it turns on 3 channels, but our channels were in series
if(statePIN == 0) { // with 3 coils for each channel. So if one channel is on, then the 3 coils
digitalWrite(OUT0, HIGH); // would turn on. Also, it turns on 2 channels at a time, and turns one Off,
digitalWrite(OUT1, HIGH); // this made the fluid transition much smoother between the coils
digitalWrite(OUT3, LOW);
statePIN = 1;
sensorValue2 = analogRead(sensorPin2);
delay(x_pin1);
}
else if (statePIN == 1) {
digitalWrite(OUT0, LOW);
digitalWrite(OUT1, HIGH);
digitalWrite(OUT3, HIGH);
statePIN = 2;
delay(x_pin1);
}
else if (statePIN == 2) {
digitalWrite(OUT3, HIGH);
digitalWrite(OUT0, HIGH);
digitalWrite(OUT1, LOW);
statePIN = 0;
delay(x_pin1);
v11=digitalRead(v1);
v22=digitalRead(v2);
v33=digitalRead(v3);
}
delay(sensorValue/4);
}
}
}
int OUT1 = 10;
int OUT2 = 6;
int OUT3 = 11;
int OUT4 = 5;
int OUT5 = 3;
int sensorPin = A0;
int sensorPin2 = A1;
int sensorValue = 0;
int sensorValue2 = 0;
int v1 = 13;
int v2 = 12;
int v3 = 7;
//These 3 variables are used for the values for the variables below, but these dictate which pin they read from.
//These 3 values below store the values from the above pins and are connected to
//my switches and are used to dictate which code will be used to run.
int v11 = 0;
int v22 = 0;
int v33 = 0;
void setup() {
pinMode(OUT0, OUTPUT); // these tell the arduino which pins are used to output signals
pinMode(OUT1, OUTPUT); // and which are used to read signals from
pinMode(OUT2, OUTPUT);
pinMode(OUT3, OUTPUT);
pinMode(OUT4, OUTPUT);
pinMode(OUT5, OUTPUT);
pinMode(v1, INPUT);
pinMode(v2, INPUT);
pinMode(v3, INPUT);
}
void loop() {
// here we initiate some variables and store a "0".
int statePIN = 0;
int stateOUT = 0;
// here we use the variable to read the resistance of the potentiometer connected the corresponding pin
sensorValue2 = analogRead(sensorPin2);
// the resistance is then stored in this vairable and the value is divided by a number to scale it accordingly
// your potentiometer may need a different divider if its resistance range is different
int x_pin1= (sensorValue2 )/10;
// here we read all three switches pins to see which part of the code will run, remember this runs
// from top to bottom, so you must ensure your other switches are off and your
// desired switch is turned on or else it will run whichever switch is on from the order it reads it in.
v11=digitalRead(v1);
v22=digitalRead(v2);
v33=digitalRead(v3);
//This is the code that outputs the signal
while(1) {
if(v11 == HIGH) { // this part turns on 6 coils, one coil at a time
int x_pin1= (sensorValue2 )/10;
if(statePIN == 0) {
digitalWrite(OUT0, HIGH);
digitalWrite(OUT5, LOW);
statePIN = 1;
sensorValue2 = analogRead(sensorPin2);// your resistance value here dictates how long it waits
delay(x_pin1); // in the delay function here until it turns on the other coils
} // this is effectively your frequency
else if (statePIN == 1) {
digitalWrite(OUT0, LOW);
digitalWrite(OUT1, HIGH);
statePIN = 2;
delay(x_pin1);
}
else if (statePIN == 2) {
digitalWrite(OUT2, HIGH); //The High and low signals are sent to your dirvers and amplified to your coils
digitalWrite(OUT1, LOW);
statePIN = 3;
delay(x_pin1);
}
else if(statePIN == 3) {
digitalWrite(OUT2, LOW);
digitalWrite(OUT3, HIGH);
statePIN = 4;
sensorValue2 = analogRead(sensorPin2);
delay(x_pin1);
}
else if (statePIN == 4) {
digitalWrite(OUT3, LOW);
digitalWrite(OUT4, HIGH);
statePIN = 5;
delay(x_pin1);
}
else if (statePIN == 5) {
digitalWrite(OUT4, LOW);
digitalWrite(OUT5, HIGH);
digitalWrite(OUT3, LOW);
statePIN = 0;
delay(x_pin1);
v11=digitalRead(v1);
v22=digitalRead(v2);
v33=digitalRead(v3);
}
delay(sensorValue/4);
}
else if (v22 == HIGH) { // This is the other code if your second switch is on
int x_pin1= (sensorValue2 )/20; // this part only turns on 3 coils, one coil at a time
if(statePIN == 0) {
digitalWrite(OUT0, HIGH);
digitalWrite(OUT3, LOW);
statePIN = 1;
sensorValue2 = analogRead(sensorPin2);
delay(x_pin1);
}
else if (statePIN == 1) {
digitalWrite(OUT0, LOW);
digitalWrite(OUT1, HIGH);
statePIN = 2;
delay(x_pin1);
}
else if (statePIN == 2) {
digitalWrite(OUT3, HIGH);
digitalWrite(OUT1, LOW);
statePIN = 0;
delay(x_pin1);
v11=digitalRead(v1);
v22=digitalRead(v2);
v33=digitalRead(v3);
}
delay(sensorValue/4);
}
else if(v33 == HIGH) { // this part is the one that worked the best for us and it's what we used
int x_pin1= (sensorValue2 )/20; // primarily, it turns on 3 channels, but our channels were in series
if(statePIN == 0) { // with 3 coils for each channel. So if one channel is on, then the 3 coils
digitalWrite(OUT0, HIGH); // would turn on. Also, it turns on 2 channels at a time, and turns one Off,
digitalWrite(OUT1, HIGH); // this made the fluid transition much smoother between the coils
digitalWrite(OUT3, LOW);
statePIN = 1;
sensorValue2 = analogRead(sensorPin2);
delay(x_pin1);
}
else if (statePIN == 1) {
digitalWrite(OUT0, LOW);
digitalWrite(OUT1, HIGH);
digitalWrite(OUT3, HIGH);
statePIN = 2;
delay(x_pin1);
}
else if (statePIN == 2) {
digitalWrite(OUT3, HIGH);
digitalWrite(OUT0, HIGH);
digitalWrite(OUT1, LOW);
statePIN = 0;
delay(x_pin1);
v11=digitalRead(v1);
v22=digitalRead(v2);
v33=digitalRead(v3);
}
delay(sensorValue/4);
}
}
}
Step Three: Construct the Circuit - Refer to Media Tab for pictures
The tab on top of this page of Items used, sends you to the Arduino and Driver Pinouts.
You can see where the pins in your code connects to the Arduino and Drivers. You can also change this to your liking.
You can see where the pins in your code connects to the Arduino and Drivers. You can also change this to your liking.
Remember, that you can power on the Motor Drivers and utilized the 5V output to power on the Arduino.
*THIS IS VERY IMPORTANT* If you wish to use a power supply to run the motor drivers and the usb cable to run the Arduino - MAKE SURE TO CONNECT THE GROUND WIRES OF EACH. These become now two different circuits being run by different sources, we had experienced issues and thought that our Motor Drivers weren't working and it turned out to be that the signals traveling from the Arduino couldn't travel through the Motor Drivers since the two circuits were independent and didn't share a common ground. This took us a while to figure out and it was fixed by simply placing a jumper wire from one ground to another; effectively making them one circuit.
Step Four: Verify Operation - Refer to Media Tab for videos
Before Soldering or gluing coils on the frames, use jumper wires to connect the circuit and verify that the drivers turn on, the Arduino functions properly, and the Coils are creating a magnetic field - you can test this by putting a metal object next to it and seeing if they attract.
Your Motor Drivers may need to use upwards of 12V-24V to have sufficient power delivery to your coils, but it also depends on the size of your coils and the resistance. Adjust your power supply and look for the minimum voltage operation, you will come by an inflection point in the power level, where your coils won't be as effective with more power and you'll be seeing little magnetic field gain, and they will start to heat up to a point that they will melt plastic. Also this should be a *WARNING* that running these coils for a long time will make them heat up depending on the power used and may burn you. USE CAUTION.
Make sure the Potentiometer is being read and the coils switch operation in respect to your input.
Your Motor Drivers may need to use upwards of 12V-24V to have sufficient power delivery to your coils, but it also depends on the size of your coils and the resistance. Adjust your power supply and look for the minimum voltage operation, you will come by an inflection point in the power level, where your coils won't be as effective with more power and you'll be seeing little magnetic field gain, and they will start to heat up to a point that they will melt plastic. Also this should be a *WARNING* that running these coils for a long time will make them heat up depending on the power used and may burn you. USE CAUTION.
Make sure the Potentiometer is being read and the coils switch operation in respect to your input.
Step Five: Putting Everything Together & Fine-Tuning - Refer to Media Tab for Construction Process Images
By this point your circuit should be running correctly, your frames and containers have already been printed from your first step and all is left to do is put it all together.
But before we do so, this is where you want to make your connections modular by using the connector pin kit for easy connecting and disconnecting, and spray your containers and parts with the rubberized spray for protection when introducing the FerroFluid.
Now, that all parts are prepped, you can begin putting things together. For some help, you can take a look at our Gallery and it will show some of our construction process and how we put this together.
Be careful when introducing the FerroFluid, like metal shavings, this will be impossible to clean off permanent magnets. Make sure you contain the fluid in the container well and wear gloves and cover your work area as this fluid is very hard to clean.
Once it's all together, you can now fine-tune the resistance value, edit the code to better suit your needs. You can look at our testing videos and see how your system compares.
Step Six: (Optional) Improvements
This step is for you to make. We wish we had more time and funding to take this to the next level, but we hope maybe someone else will and advance this enough to utilize in a cubeSat for real life application and proof of concept.
Here are some ideas we wanted to integrate to make this thing move up to the next level in performance:
First Idea:
-Utilize AC to run the coil configurations. Similar to 3-phase AC motors, if you are able to connect the coils to an AC driver and use a controller for frequency change, you can induce a magnetic field within the container that keeps its presence. The frequency of the AC will rotate the magnetic field while its presence is maintained. This is different from our current design foundation because we turned coils on & off at a high frequency to create the effect of spin, with an AC system you will have spin at all times even at a low frequency.
Second Idea:
-If either AC or DC design proved to work best, we wanted to enclose this fluid within a sphere and rotate the fluid inside about different axis of rotation. If one is able to completely surround the sphere with coils, then rotation would be possible around any axis but we still have yet to come up with an idea how we can show the fluid spinning inside, either visually, or through rotational momentum like a gyro.
Third Idea:
-Use a toroid configuration container for the fluid, wrap the torus with coils that are associated with different phases and spin the fluid inside. Since the fluid is in close proximity to the coils and the coils are surrounding the container, the efficiency of electrical to magnetic induction is increased dramatically.The container however would need to be made of a heat-resistant material as the coils would be in contact with it.
Here are some ideas we wanted to integrate to make this thing move up to the next level in performance:
First Idea:
-Utilize AC to run the coil configurations. Similar to 3-phase AC motors, if you are able to connect the coils to an AC driver and use a controller for frequency change, you can induce a magnetic field within the container that keeps its presence. The frequency of the AC will rotate the magnetic field while its presence is maintained. This is different from our current design foundation because we turned coils on & off at a high frequency to create the effect of spin, with an AC system you will have spin at all times even at a low frequency.
Second Idea:
-If either AC or DC design proved to work best, we wanted to enclose this fluid within a sphere and rotate the fluid inside about different axis of rotation. If one is able to completely surround the sphere with coils, then rotation would be possible around any axis but we still have yet to come up with an idea how we can show the fluid spinning inside, either visually, or through rotational momentum like a gyro.
Third Idea:
-Use a toroid configuration container for the fluid, wrap the torus with coils that are associated with different phases and spin the fluid inside. Since the fluid is in close proximity to the coils and the coils are surrounding the container, the efficiency of electrical to magnetic induction is increased dramatically.The container however would need to be made of a heat-resistant material as the coils would be in contact with it.