The first thing I did was designing the gears for the machine to print them on a 3D printer. So I followed this easy tutorial on how to create gears, and started designing the 2 main gears taking in count that I would add some bearings inside of them, so I should leave the empty space for them to fit perfectly.
Basically how I created the gear was by designing the shape of the teeth, and the desired distance to the center (radius), then I created a circular pattern with it, and added a circle in the middle and then extruded an joined everything together.
In the beginning I left the bearings a bit loose, so I did the piece that holds them again so they would be very tight, and therefore, the gears will move smoother between them.
BEARINGS DIMENSIONS:
IN DIAM: 8mm
OUT DIAM: 22mm
THICKNESS: 7mm
I was also going to need two legs, that would connect the two gears between them, and then a tip to add later another tool (needle, pencil, brush) that would be connected to the end of those legs.
I also designed a rail to keep the tip always on track, but in the end I decided to remove it because it generates a lot of friction. Anyway I will add the STL.
STL FILES:
Tatto_Gears_Base.stl
To connect the mosfet to my system, I followed the next schematic, but instead of using a potentiometer, I added a Joystick so that I could control the speed of the motor by moving one of it's axis.
Specifications:
1. Size: 33 x 24 mm.
2. Weight: 10 g.
3. Voltage: 3.3V, 5V.
4. Ports: digital quantity level.
5. Output charging voltage: 0 ~ 24V.
6. Output load current: <5A (1A above need to add heat sink).
7. Platform: Arduino, MCU, ARM, Raspberry Pie
It is pretty straight forward to use, this one has X, Y and a PRESS BUTTON in case you want to use them, but for what I want, I'm just going to use the X axis pin.
The problem with this Joystick module in my opinion is the sensitivity and the range, because they are not pretty well calibrated, so it is har to "fine control" with them.
For the code, I just got the values from the analog reading of the VRx pin, and map it from 0-255 for PMW in the code which I'll describe later.
///////////////////////////////////////////////////////////////
int Motor = 16;
int Joystick = 32;
uint16_t MotorDutyCycle;
const int MotorPWMFreq = 5000;
const int MotorPWMChannel = 0;
const int MotorPWMResolution = 12;
const int MOTOR_MAX_DUTY_CYCLE = (int)(pow(2, MotorPWMResolution) - 1);
const int ADC_RESOLUTION = 4095;
void setup()
{
Serial.begin(115200);
ledcSetup(MotorPWMChannel, MotorPWMFreq, MotorPWMResolution);
ledcAttachPin(Motor, MotorPWMChannel);
}
void loop()
{
int Jspeed;
int Mspeed;
Jspeed = analogRead(Joystick);
// Mspeed =map(Jspeed,0, 1023,0,255);
MotorDutyCycle = Jspeed;
MotorDutyCycle = map(MotorDutyCycle, 0, ADC_RESOLUTION, 0, MOTOR_MAX_DUTY_CYCLE);
ledcWrite(MotorPWMChannel, MotorDutyCycle);
Serial.println("MOTOR: ");
Serial.print(MotorDutyCycle);
Serial.print(" -- ");
Serial.print("\n");
delay(1000);
}
/////////////////////////////////////////////////////////////////////////////
Site was started with Mobirise