11
Necessary software and hardware: Bases: First, remember that I’m a French guy so my English is not perfect ;) If you see any mistakes, don’t hesitate to tell me so I can correct them (my email is at the end of the document). To achieve this project, you need to have a solid knowledge in electronics, programming, and you need to know how to use basic tools to make the box. You need to be familiar with the Arduino ! If you can’t code, solder, or the « Ohm’s law » doesn’t ring any bell to you, then you’ll have a hard time following this tutorial! I will neither explain how to use the Arduino nor the ProtoShield (there a plenty of tutorials about that on the Internet!) Hardware: - An Arduino Uno or Mega - A PC CD player motor (a simple DC 12V motor, not brushless) and with the head - A wood box (size: 25x15x5cm; 10x5x2inches) - LEDs (and the appropriate resistors, around 330usually): o 2 blue o 3 red o 4 orange o 5 green - 3 potentiometers - 4 switches - 1 Protoshield for your Arduino + HE14 connectors to plug it on the Arduino - Heat-shrink sleeve Software: - Traktor Pro - Serial Midi Converter V2D - LoopBe 30 (demo, works for 1h) - Arduino Software Files: - Source code and Traktor config file [ZIP]

Bases: Hardwarelouisjeckel.com/arduino/files/tuto_traktor_arduino_en.pdf · So, here is the schematic you need to follow (you just need to add one orange LED (after LED8). There are

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Bases: Hardwarelouisjeckel.com/arduino/files/tuto_traktor_arduino_en.pdf · So, here is the schematic you need to follow (you just need to add one orange LED (after LED8). There are

Necessary software and hardware: Bases: First, remember that I’m a French guy so my English is not perfect ;) If you see any mistakes, don’t hesitate to tell me so I can correct them (my email is at the end of the document).

To achieve this project, you need to have a solid knowledge in electronics, programming, and you need to know how to use basic tools to make the box. You need to be familiar with the Arduino ! If you can’t code, solder, or the « Ohm’s law » doesn’t ring any bell to you, then you’ll have a hard time following this tutorial! I will neither explain how to use the Arduino nor the ProtoShield (there a plenty of tutorials about that on the Internet!)

Hardware: - An Arduino Uno or Mega - A PC CD player motor (a simple DC 12V motor, not brushless) and with the head - A wood box (size: 25x15x5cm; 10x5x2inches) - LEDs (and the appropriate resistors, around 330Ω usually):

o 2 blue o 3 red o 4 orange o 5 green

- 3 potentiometers - 4 switches - 1 Protoshield for your Arduino + HE14 connectors to plug it on the Arduino - Heat-shrink sleeve

Software: - Traktor Pro - Serial Midi Converter V2D - LoopBe 30 (demo, works for 1h) - Arduino Software

Files: - Source code and Traktor config file [ZIP]

Page 2: Bases: Hardwarelouisjeckel.com/arduino/files/tuto_traktor_arduino_en.pdf · So, here is the schematic you need to follow (you just need to add one orange LED (after LED8). There are

The box

Place the components and draw their position:

Page 3: Bases: Hardwarelouisjeckel.com/arduino/files/tuto_traktor_arduino_en.pdf · So, here is the schematic you need to follow (you just need to add one orange LED (after LED8). There are

Drill holes:

Advices: Use a flat-headed drill for the motor’s hole (24mm for mine)

Only use wood drills if you don’t want to rip everything out.

For the LEDs, use a 1mm drill or small nails.

Page 4: Bases: Hardwarelouisjeckel.com/arduino/files/tuto_traktor_arduino_en.pdf · So, here is the schematic you need to follow (you just need to add one orange LED (after LED8). There are

Paint it black…

Advices: Obstruct the holes with some tape underneath.

Page 5: Bases: Hardwarelouisjeckel.com/arduino/files/tuto_traktor_arduino_en.pdf · So, here is the schematic you need to follow (you just need to add one orange LED (after LED8). There are

Place the buttons, potentiometers, LEDs:

Advices: Make sure you put the anode (-) of all LEDs on the same side (shorter leg), and bend it inward.

You can paste the LEDs with hot glue.

Page 6: Bases: Hardwarelouisjeckel.com/arduino/files/tuto_traktor_arduino_en.pdf · So, here is the schematic you need to follow (you just need to add one orange LED (after LED8). There are

Soldering (now, that’s the fun part):

Schematic:

So, here is the schematic you need to follow (you just need to add one orange LED (after LED8). There are 11 volume LEDs, so 5 green, 4 oranges and 2 red, plugged in digital from 30 to 40).

Remember where you plug all the components; you’re going to need that for the code, if you don’t follow the schematics to the letter.

Page 7: Bases: Hardwarelouisjeckel.com/arduino/files/tuto_traktor_arduino_en.pdf · So, here is the schematic you need to follow (you just need to add one orange LED (after LED8). There are

Begin to solder the power cables (GND, +5V and +3.3V) - Connect one leg of all the potentiometers (left or right, not in the middle), and the anode of

the LEDs : it’s the ground (GND on the Arduino) - Connect the opposite leg of all the potentiometers, and of leg of each button : it’s the +5V on

the Arduino - 3.3V will be connected to on pin of the motor, and to an analog pin on the Arduino, which

will be used as a reference.

Place the H14 connectors on the Protoshield and solder them: - 5 analog pins (A##) (1 for the motor, 1 for the 3.3V reference, 3 for the potentiometers) - 11 (volume LEDs) + 4 (buttons) = 15 digital - 3 PWM (Beat + Jog LEDs) - GND, 3.3V & 5V pins

Begin to solder to the Protoshield - Connect the other leg of each button to the ground with a pull-down resistor (1kΩ~10kΩ)

and to the Protoshield (digital). - Solder the cables for the LEDs to the Protoshield (digital 30-40) with a resistor, just like that:

- Then connect the LEDs to the Protoshield with the previously soldered cables. (Don’t forget the heat-shrink sleeve!) (Volume LEDs are digital, beat and jog LEDs are PWM).

- Heat up the heat-shrink sleeve to isolate the LEDs to avoid short-circuits. - Connect the beat and jog LEDs cathode (+) to the Protoshield (PWM). - Connect the potentiometers (middle led) to the analog pins on the ProtoShield (A##). - Connect the second motor pin to the ProtoShield (analog). - Solder the ground on the ProtoShield GND - Solder +5V and +3.3V on the ProtoShield.

Page 8: Bases: Hardwarelouisjeckel.com/arduino/files/tuto_traktor_arduino_en.pdf · So, here is the schematic you need to follow (you just need to add one orange LED (after LED8). There are

Plug the ProtoShield onto the Arduino, and that’s how it should look like!

Just need to hot glue a CD on the motor!

Page 9: Bases: Hardwarelouisjeckel.com/arduino/files/tuto_traktor_arduino_en.pdf · So, here is the schematic you need to follow (you just need to add one orange LED (after LED8). There are

Code part

Communication for the Arduino to Traktor

Configuration: You first need to tell the Arduino where the components are, if you didn’t exactly follow the pin mapping on the schematic: You need to modify two places: The declarations at the beginning of the code: for example:

int keyPinPot = A0;

Here, I say that my key potentiometer it plugged on A0. If you’re familiar with the Arduino (hope so…) then you got the idea, it the same for the rest.

You also need to the same for the volume LEDs: just after void setup() opens:

led[0]=30; //1st LED placement led[1]=31; //2nd LED placement... led[2]=32; led[3]=33; led[4]=34; led[5]=35; led[6]=36; led[7]=37; led[8]=38; led[9]=39; led[10]=40; Upload the code.

LoopBe30 - Install LoopBe30 (demo version closes after one hour, but LoopBe1 doesn’t allow you to the

115200 bps as baud rate.) - Open it and click on « Change » to modify « Ports after Reboot », set it to 2 - Uncheck « Enable Shortcut Detection » - Hit OK and reboot

Physical controller

(potentiometer, button)

Arduino : Encoding the

signal in MDID (3 bytes)

PC (Serial to LoopBe's MIDI

port forwarding)

Traktor (recieving 3 MIDI bytes and

executing the action)

Page 10: Bases: Hardwarelouisjeckel.com/arduino/files/tuto_traktor_arduino_en.pdf · So, here is the schematic you need to follow (you just need to add one orange LED (after LED8). There are

Traktor - Once Traktor is installed, go to « File », « Preferences », « Controller Manager », « Add »,

« Import », choose midi.tsi (previously downloaded in the ZIP file). - Make sure « In-Port » & « Out-Port » are set on « All Ports »

Page 11: Bases: Hardwarelouisjeckel.com/arduino/files/tuto_traktor_arduino_en.pdf · So, here is the schematic you need to follow (you just need to add one orange LED (after LED8). There are

Utilization:

Serial_Midi_V2D : - Open \application.windows\Serial_MIDI_Converter_V2D.exe (requires Java) - Press the key corresponding to your COM port (where the Arduino is, of course) - Choose [F] : 115200bps - MIDI INPUT Port: 02. Internal MIDI - MIDI OUTPUT Port: 01.Internel MIDI - Make sure « Converter is running » is written in the bottom left hand corner

Rock’n’Roll : Open Traktor, and start to mix!

If you need to contact me, send me an email at [email protected] I speak English, Deutch and Français!