DC Mixer

Submitted by soren svejstrup on Tue, 03/12/2013 - 20:23

Description 

The DC Mixer mixes your drinks. You can control the speed of the mixing on the knob on the side of the mixer. However, as it is right now, the mixer will throw your drink out the cup, so it still needs a bit of work when it comes to vibrations. 

 

Components

 

  • Breadboard
  • Arduino Uno
  • Collector
  • Emitter
  • Pot
  • DC Motor
  • Cup
  • Cardboard 
  • Tape 

 

Code

 

/*
 * This creation allows one pot to control a DC motor
 * by DojoDave <http://www.0j0.org>
  * Modified again by Soren Svejstrup
 */
 
int potPin = 0;   // select the input pin for the potentiometer
int motorPin = 10; // select the pin for the Motor
int val = 0;      // variable to store the value coming from the sensor
void setup() {
  Serial.begin(9600);
}
void loop() {
  val = analogRead(potPin);    // read the value from the sensor, between 0 - 1024
  Serial.println(val);
  analogWrite(motorPin, val/4); // analogWrite can be between 0-255
}
 

Watch on YouTube:

http://www.youtube.com/watch?v=eL50YSfWc1Y
0
Your rating: None
Drupal theme by Kiwi Themes.