456
edits
mNo edit summary |
mNo edit summary |
||
(11 intermediate revisions by the same user not shown) | |||
Line 89: | Line 89: | ||
This is a 3d circuit diagram of both circuits: | This is a 3d circuit diagram of both circuits: | ||
[[File: | [[File:DIG_wiki.jpg]] | ||
--- F I N A L P R O J E C T --- | --- F I N A L P R O J E C T --- | ||
Line 103: | Line 103: | ||
[[File:Motor44_wiki.jpg]] | [[File:Motor44_wiki.jpg]] | ||
[[File: | [[File:Driver8_wiki.jpg]] | ||
[[File: | [[File:MHub_wiki.jpg]] | ||
Driver connection Diagram: | Driver connection Diagram: | ||
[[File: | [[File:drDIG_wiki.jpg]] | ||
Arduino, Motor and Driver connected: | Arduino, Motor and Driver connected: | ||
[[File: | [[File:Ard_mot_wiki.jpg]] | ||
Considered a variety of mounting methods for the Motor and Umbrella: | Considered a variety of mounting methods for the Motor and Umbrella: | ||
[[File: | [[File:MountRes1_wiki.jpg]] | ||
[[File: | [[File:MountRes2_wiki.jpg]] | ||
3D design of the the mounting for potential 3D Printing (using the Blender software): | 3D design of the the mounting for potential 3D Printing (using the Blender software): | ||
[[File: | [[File:3dSeb_wiki.jpg]] | ||
To scale section drawing: | To scale section drawing: | ||
Line 125: | Line 125: | ||
[[File:Metal_1_wiki.jpg]] | [[File:Metal_1_wiki.jpg]] | ||
[[File:motor attached_wiki.jpg]] | |||
[[File:mill 1_wiki.jpg]] | |||
[[File:mill 2_wiki.jpg]] | |||
[[File:mill 3_wiki.jpg]] | |||
[[File:Piece 1_wiki.jpg]] | |||
[[File:Piece Rubber_wiki.jpg]] | |||
[[File:brell1_wiki.jpg]] | |||
[[File:back brell_wiki.jpg]] | |||
[[File:port brell_wiki.jpg]] | |||
[[File:microcontroller attached_wiki.jpg]] | |||
[[File:ubreath02a_wiki.jpg]] | |||
[[File:ubreath01a_wiki.jpg]] | |||
Above: The finished Motor mechanism, attached to the Umbrella. | |||
Below: The circuit on the breadboard, DRV8825 Driver for the motor. | |||
[[File:Breadboard_Seb.jpg]] | |||
The breadboard can only take a limited current. So next step is to make a Custom PCB board. | |||
I spent 2 weeks trying to create the new part (DRV8825) in Fritzig because it was not there. I was editing someone else's shared part, because theirs was incomplete. Long story short: I made it but it still didn't function correctly when trying to draw the connection traces. | |||
So I aborted this design process and instead bought a Arduino Proto-shield to solder my circuit to. | |||
[[File:Proto_example.jpg]] | |||
Soldering the Protosheild: | |||
[[File:shield_make.jpg]] | |||
[[File:Shield_Blank.jpg]] | |||
[[File:Shield_top.jpg]] | |||
[[File:Shield_Side.jpg]] | |||
[[File:Shield_Fin.jpg]] | |||
Images of the general set-up while coding the breathing interaction: | |||
[[File:Coding_1.jpg]] | |||
[[File:Coding_2.jpg]] | |||
[[File:Coding_3.jpg]] | |||
Below: The Code for controlling the motor's speed and direction, via the 'breathing sensor. | |||
The Magnet sensor outputs a range of values, and here it basically operates in place of a Potentiometer. | |||
int dirPin = 7; | |||
int stepPin = 8; | |||
long stepsToDo; | |||
long stepTime; | |||
int dir; | |||
long target; | |||
long curPos; | |||
void setup() { | |||
Serial.begin(9600); | |||
pinMode(dirPin, OUTPUT); | |||
pinMode(stepPin, OUTPUT); | |||
} | |||
void loop(){ | |||
target = analogRead(A2) * 20 ; | |||
stepsToDo = target - curPos; | |||
if (stepsToDo < 0) { | |||
digitalWrite(dirPin,LOW); | |||
dir = -1; | |||
} | |||
else { | |||
digitalWrite(dirPin,HIGH); | |||
dir = 1; | |||
} | |||
delayMicroseconds(stepTime + 10); //10 as minimum step Time | |||
if (stepsToDo != 0) { | |||
curPos = curPos + dir; | |||
stepTime = 300000 / abs(stepsToDo); | |||
digitalWrite(stepPin,!digitalRead(stepPin)); | |||
} | |||
} | |||
Here is a short video of the First Functioning moment. I am using a Potentiometer to control the Umbrella. Later this will be replaced by the Breathing Sensor. | |||
https://www.youtube.com/embed/Sn_Zn28_QuY | |||
Breathing Sensor Version 1: | |||
[[File:Breathing_sensor_v1.jpg]] | |||
Above: Magnet sensor and a magnet attached to a latex glove, which you strap around your upper rib cage (Chest). when your Chest contracts and expends, the magnet is moved closer and further from the sensor, creating a changing value. This is used to control the Umbrella. The Arduino code for this is above. |
edits