DIY USB DJ Controller
A way of expressing or making extra money.
I love DJing because it provides a music that is more fun, engaged, and interactive.
Whether in the company of friends, or in private, have the experience of listening.
The hardware DJ controller is traditionally the next step after using software to wet your feet
Based on DJ controller.
And it\'s traditional expensive.
I\'m just an amateur DJ and don\'t want to spend a lot of money on my first DJ controller.
About $100 but I love DIY too!
I was passionate about music and electronics and wanted to combine the two, so I decided to use low-
Cost and quick construction are considered.
The DJ controller I will build in this Instructable will provide you with an example of what you can build using the code, structure, and process I show here.
If you accept the idea and expand it and polish it, you may get a very good and/or completely different MIDI device.
My favorite aspect of this project is how open it is to changes.
The final product is something simple that requires analog and digital input and provides a unique and easy way to turn them into MIDI outputs.
See what I like to call \"quasi\"
MIDI \"at the back of this introduction \".
I modeled my controller after Numark Mixtrack II.
My specific DJ controller uses an earlier version of the TI mcu launch Board, a micro-controller development platform known for its low price ($10)
Follow with amateurs.
The micro-controller code I provided is written using Energia and may take little effort to transfer to Arduino and other micro-controllers may need to port the code specifically to them, which won\'t be too difficult.
A better micro controller with more pins will be able to support more input, keep this in mind if you are going to build this project in a different way.
Later on, I will include a broader list of required materials, skills and software in the structure.
What is the DJ controller?
You should ask.
DJ controller is a physical device that you can connect to a computer equipped with software-based musicmixing program. A music-
The mixing program allows the DJ to play songs and add effects, \"snap\" tracks, control the audio EQ, volume, play loops and samples, and, most importantly, mix multiple songs together, seamlessly switch from one song to another.
It all happened on the spot and it was impressive if the DJ was good (
See this video, warning: contains explicit language.
She uses multiple DJ controllers in this video to mix four tracks at the same time)
, Sometimes similar to playing an instrument!
The DJ controller provides a physical interface for the DJ to perform all these operations quickly.
After a while, if you use a software, DJ with mouse and keyboard will quickly become limited
You know what I mean for a while.
At the hardware level, entrance-
The level DJ controller is a very simple device.
They read input from a bunch of sensors (
Buttons, sliders, knobs, etc)
And convert the input to the control message of the DJ software.
One popular format for these messages is MIDI, which is almost what we will use here.
However, this project
The final professional DJ controller that is more complex and performs other functions (pre-
Integrated sound card, etc ). .
There are no joggers in this project (
I don\'t know where to get the parts, I personally don\'t use them and they will cost this project more).
This project provides a relatively simple and inexpensive custom interface to complete the basic tasks of DJing.
Fun to build, customizable, scalable and entry-level DJ controllers for amateur DJs!
Think about how cool it is to have your own hands.
Let the DJ controller put the table on the party and know that it actually works!
Function: how many and what controls does this DJ controller have?
There are many controls on this controller.
Because I only use 20-
Needle micro-controller, I decided to use two identical micro-controllers, the other 8-channel Analog-to-
Make the most of my digital converter for the little pixel g2553 s.
I have the arrangement for this controller: these controls can be programmed for anything you want to do!
My configuration will be shown later, but basically: knob-
Bass/mid/treble/FX 1/FX 2 for each deck, then a \"master stuff\" slider-
Cross fader, deck 1 roll and deck 2 roll buttons-
Play/Pause and sync for each deck, then \"! \" button (
No matter what you want
Used to browse music collections and select a list of songs-
Pattern 1 for loops, Pattern 2 for effects, pattern 3 for samples I will introduce you to some electronic courses that will be combined to create the final product!
A rough list of some things you can learn/practice by building the following: probably more!
Please note that this item is difficult to assemble, so will only try if you are good with a soldering iron or able to make some mistakes!
Required material Overview this list will change depending on how you specifically build this project, but it provides an overall overview of what you should expect to need.
A list of specific parts for each step will be included in the following steps.
Links are provided for reference.
For electronics: for this situation: you need to use a laser cutter using my design.
For the top and bottom panels, we used 1/8 plywood and 1/8 plexiglass for the side panels and inlays.
This should be available at the laser cutting shop.
You also need strong glue (
I recommend gel control and liquid Letai).
You might want to try the organic glass glue so it becomes clear, but I find it not strong enough. And that’s it!
Overview of tools/equipment required: Some tools are not completely necessary, but they make construction faster.
I used: the skills overview for NeededI will try to make this project as easy to understand as possible, but you should have a basic understanding of some things, including: what is \"quasi-MIDI”? Quasi-
I like to call it MIDI, which is what I made up for this project.
When I first figured out how to connect the hardware to DJing software in the fastest and easiest way, I immediately thought of MIDI.
Almost every major DJing program supports it, it can be used for other projects, and it is a very simple protocol in itself.
However, the outdated connector it uses no longer exists on modern computers, and you often need MIDI to USB converters, which increases the extra cost and may not be compatible with the project.
Additional circuits are required for MIDI devices that actually meet industry standards (
Optical isolator, etc. , more complicated! )
And it is often difficult to prototype quickly.
So I came up with the idea of using several intermediary programs.
An overview of how it works is: 1.
The main micro-controller receives hardware input.
The main micro-controller sends a dedicated message to the computer via a USB serial connection.
A host program on a computer written using Processing listens on that port and receives message 4.
The handler converts this message to a MIDI message and sends this message via a virtual MIDI connection (
More information on this).
The virtual MIDI connection varies from platform to platform, but on Windows I used the loopMIDI from Tobias Erichsen.
This feature is built in on Mac and Linuxin…5.
The DJing program receives MIDI messages through a virtual MIDI connection and maps specific features to that MIDI message.
Later in structure, I will do my best to detail the specific steps involved in this process.
This is far from strong enough, but it works without any additional hardware, which is a clear advantage given the initial goal of my project.
You can modify this data stream to fit any MIDI-
You can come up with project based!
Want to make your own custom digital MIDI drum set?
Or something more strange, such as the use of a purity ring?
With this method you can do this easily!
Credits: music in the video: shouting and other things I would like to recommend a few yelling to any judges who are evaluating the few matches I want to attend :).
Formlabs contest: it has always been the hardest part for me to defend the electronics project.
How will everything be combined?
How will I route the cable?
How will the interface match the electronics?
The last item was just a breadboard circuit on a piece of cardboard, but my roommate told me that he could design a laser-cut box, so I went all out.
The hardest part is still putting it in the box while making it look good.
So far, the laser cutting machine can only make you. . . 2 Dimensions.
The 3D printer has created a new level of customization.
I love making music related electronics and they should look as good as sound.
My partner on this project is also an architect and can benefit a lot from 3D printers.
His model will be high-
High quality 3D printing from resin 3D printer.
I like fixing cars too.
In particular, the current 1980 MGB)
I think your 3D printer will allow me to make high quality reproduction plastic parts for new cars that are otherwise very expensive or not available.
My online MGB community will definitely benefit from the reproductive part that I can produce.
I can also do a lot of cool upgrades/brackets and stuff for the car.
Also, I \'ve always wanted to learn CAD and the 3D printer will give me some motivation :)
Micro-controller competition sponsored by radiowack: This project includes not only one micro-controller, but also two micro-controllers!
This is twice the number required for the micro controller!
I would also like to point out that I am using a more representative micro-controller platform (TI MSP430)
, Mainly because of its low initial cost and strong versatility.
The project really shows how to stretch the limited pins of this platform to do a lot of things.
Also, it is worth noting that the data flow used in this project allows any serial-
Make the micro-controller the brain of the MIDI instrument, not just the MCU with built-in HID/USB hardware.
Technical competition sponsored by Littlebits: This project has a common goal with littlebits: rapid prototyping.
When trying to implement a functional prototype, there is a long way to go between intelligence and the right tools, so\"
MIDI \"method I came up.
I also tried to introduce readers to the quick prototyping of one of my favorite programming tools \"processing.
Again, it is worth noting that the data stream used in this project allows any serial-
Make the micro-controller the brain of the MIDI instrument, not just the MCU with built-in HID/USB hardware.
Thank you for your consideration!
We will start by cutting all the shell parts so we know what we are dealing.
I was going to put these things on a carton, but my roommates are all architects at my university, so they can use a variety of manufacturing tools.
Available for design and laser
Cut a case for it and I will provide these designs so you can use them.
This section assumes that you can use some kind of laser cutting machine (who doesn\'t? )
But if you don\'t, you can try to make a similar front panel/case.
I won\'t go into the steps of laser cutting in detail, because it\'s very subjective depending on the way you actually cut (
I don\'t know the witchcraft of CAD programs).
Files can be downloaded and you should be able to open them in most CAD programs.
We used two different materials, plexiglass and plywood.
Our materials were bought in a college store and I think it would be a similar setup for most people who don\'t own a laser cutter.
Material: cut box. We use plywood as the base and front panel of the case.
We used plexi on both sides (
You can see the cool electronics inside! )
, Used to fill the negative space of the front rocket ship logo, also used to fill the deck selector led.
Important: some of my parts may be different (
Therefore, you should carefully check and edit the laser cutting file to fit your specific part.
Measure their dimensions carefully, or find them in the data sheet of the part and modify the dimensions you need.
You will also need to check the sides to make sure all your parts are placed inside.
I try to make this case thin.
This is beyond the scope of this manual (
Don\'t you hate it when the textbook does this? )
, But find a suitable program to edit the file and make the necessary changes.
It should not be too hard, they are just rectangles.
Students can get Autodesk\'s AutoCAD free of charge here.
You can also use the free version of Google Sketchup.
The original file was made with AutoCAD and Rhino3D.
Cut both the plywood and the plexi documents.
To all of things are keep!
Some things may look like crap, but it may be used later, so just put those things together.
Now you should have the front panel and the organic glass block, let\'s start putting it together!
Put the loose organic part of the rocket ship logo aside.
Then, pick up the front panel and put it in front.
When we are done, this will make the plexi part flush with the front.
Carefully glue the plexi logo part into the negative space of the wooden rocket ship logo and let it dry for a while.
I recommend using gel to control the Loctite so that it can fill in any small blank space.
You can also try using the organic glass glue so it becomes clear, but I find it is not strong enough.
When the glue is dry, turn the small plexi circle (
I hope you left them behind! )
Stick them in the hole next to the deck selector switch, which is under the large rectangular gap of the keyboard.
Once the glue is dry and feels strong, you should leave some very unattractive glue residue.
To solve this problem, I decided to cover the organic resin with sandpaper.
This also helps to spread the LED lights so it won\'t be so direct and retinaburning.
Take some fine sand paper (
Believe we used 600)
Before you are satisfied with the look, Polish both sides of the plexi inlays.
Protip: you can gently polish with the same fine sandpaper to remove burn marks on the wood.
Prepare control panel this step varies depending on the part and configuration, but I have to make some modifications to my case to get the part installed correctly.
First of all, if you are using the potentiometer of adafruit that I linked, you will notice that there is a small positioned nub at the top of it.
It was a surprise. . . not!
This helps with stability, but as a result we have to modify the back of the front panel.
You can also:. )
Grind/cut nub or B. )
Grind/cut small holes on the back of the front panel to accommodate nubs.
I chose option B because I don\'t want to modify the part.
To do this, I used a rotating tool with grinding bits.
As long as the hole has a proper distance from the center hole, it doesn\'t matter where the hole is.
Measure the distance twice, mark it, and grind a hole.
This is done for all 11 potentiometer.
Be careful not to go all the way.
Second, the switches are not suitable for the holes that go through them, so we have to grind them a little more.
Make sure you check fit regularly and you want it to be comfortable.
Third, the keyboard I use has a mounting bracket that we didn\'t consider.
We had to cut the wings on the side of the keyboard hole so it could be installed.
Unless you have a keyboard for a paid phone, it will make a difference for you!
This should be the end!
When you are satisfied with the installation and completion of parts and panels, continue to build hardware for this project.
Note: A schematic diagram of this project is provided in this step.
I used a program called DipTrace to do it.
This is not the best schematic, but it gives you a general idea of how to connect things.
Hardware overview the hardware of this project consists of several different boards that are connected to each other, connecting all the controls together.
The boot board itself acts as a USB host for serial communication.
To make it as modular as possible, we use some different boards and heads to connect each board.
So you can get the parts out (
If you want to use them again in different projects.
It also makes it easier for the project to be disassembled so that it can be repaired/modified in the future.
We built a \"shield\" type connector for the launch pad that plugs into the pins of the launch pad and connects them to the motherboard.
The motherboard carries most of the potentiometer and central controls, as well as the secondary micro-controller and the MCP3008 A/D converter.
Any controls that are not directly connected to the motherboard can have their own small board and then connect to the motherboard.
The last auxiliary board is the board that carries the keyboard and related components.
This then connects to the motherboard through another connector that we will build with the head.
Every step about the hardware will show how to build each board involved in this project.
Each step will also include the parts required for the board.
Make sure you have all the parts on hand before you start building!
It is best to make a circuit prototype on the bread board.
That way, you know it will work before you make it permanent!
Also, please read the data sheet for all components (
ICs in particular)
So that you don\'t do anything wrong and let the magic smoke go out/cause a fire.
This circuit is connected directly to your computer USB port and may damage your computer/component if there is a short circuit or poor connection.
I am not responsible for any loss!
Remember, this project is completely customizable.
You can select the controls you want, use my data stream, and use a completely different but equally generic MIDI-
Based on instruments! Be creative!
However, I will only cover how to build my specific configuration.
I will try to include information on how to customize it at some point.
Required material: this project requires some kind of configuration of your starter board.
Make sure you don\'t weld on the optional crystal oscillator!
We need to use these pins as input!
Remove the jumper that connects the led to pin p1. 0 and P1. 6.
For starting board Rev 1.
4 and above: you may notice the old version of the TI boot board, as I am using, pin 3 is marked as TXD (
And Pin 4 is marked as RXD (receiving data).
The problem with this is that these pins are switched on the bugg2553!
Pin 3 is actually the function of RXD and pin 4 is the function of TXD.
This means that in order for our circuits to work properly, we need to cross
Wire the jumper located in the upper right corner of the board so that the pin marked as TXD on the board is connected to the RXD and the RXD on the board is connected to the TXD.
In this step, I also detail how to build a cross board.
This will only affect the launch shelf Revision 1. 4 and older.
For starting board Rev 1.
5 and updated version: start with Rev 1.
5, they do this so that you can enable asynchronous on the bugg2553 using the attached jumper.
This blog post has a section detailing how to do this.
You need to flip the jumper sideways.
How to make a cross board: Material: take a small piece of prototype board, some female head and some connecting lines.
Cut two 1x2 female heads using your rotary tool.
Weld the female heads to the board so that they are mounted on the pins of the TXD/RXD heads.
Weld the wires so the connection is crossed and you\'re done!
For more instructions, please see the pictures I included.
You can now reliably communicate with your computer using the hardware serial port on the main microprocessor!
The shield connector allows us to easily connect the launch board to the circuit without being permanent.
It connects the pins of the main micro-controller to the motherboard that carries all the control and auxiliary integrated circuits.
Material: take the board and break two sets of 10 heads (my two/three-
One year old starter board has both female and male so I just used these).
Then take out the prototype plate, use the rotary tool to cut it into size, and Weld 10 male heads on each side, which are spaced between the female heads of the launch plate.
I chose the welding wire to connect the 17 pins that we will connect to the motherboard horizontally to the shield edge.
This is very tedious and may not be necessary, be very careful if you do!
In addition to pin 4, we need to connect each pin to the motherboard (TXD), 16 (RST), and 17 (TEST).
You may want to wait until your enclosure design is all ready to weld the shield directly to the motherboard so you know it will arrive.
I will introduce this section in the Motherboard section.
Please note that for several reasons I decided not to install the boot board directly on the motherboard.
On the one hand, it saves board space.
Second, because throughout the life cycle of this controller, we will insert the cable into the launch pad very frequently, so installing the launch pad in other ways can prevent us from directly emphasizing the welding connection of the male head
Keyboard board will be hosted-
The keyboard itself and the mode switch, the deck switch and the deck LEDs.
I decided to weld the components to a separate mini board and weld them all to the keyboard board so I could customize the holes that fit them.
The keyboard board provides a central position to connect the circuit together and provides connectors to connect the circuit to the motherboard.
You need something to build this board.
Material: Building Board 2-
Can hold 2 by cutting a small piece-
Switch and a few wires, make sure to leave enough room for the connections we have to build! Take the 2-
Switch and weld it as shown in the figure.
Then weld the wire so it can reach the keyboard board (
Check your layout frequently)
So that it can reach the LED board.
Welding wires for power supply (+)
In the corner of the circuit board, weld the wire used for grounding (-)
To the middle pin of the switch, then weld the wire of the switch signal to one of the other pins of the switch.
Because we use pull-up-
To read the switch input, we just need to know when the pin is pulled low to detect the group.
Another switch pin is only used to switch LEDs.
Solder the wires from the left and right pins of the switch and place them on both sides of the board.
Then weld the two wires to the power supply (+)
When the switch pulls the wire to the ground, the wire that supplies the power to the led.
Make sure the wires are long enough so that when we put the items in the box you can be sure they will arrive!
It\'s better to make them too long and cut them than to make them too short!
Put it aside and cut three more original plates (about 3X8)
For LED board.
Layout LED and resistance as shown in the figure, pay attention to the anode of the LED (+, longer lead)
Weld to the resistance.
As shown in the figure, solder the LEDs and their resistors on a separate plate.
You should have three LED boards: red, blue and RGB.
RGB LEDs are not associated with the keyboard, but it is easier to build them at once. Three-
Toggle the way to put the LED board on one side and cut another small piece of Motherboard to turn on the mode switch.
I took my 3-
Switch over from the alarm clock, so it is likely to be different from yours.
Because of this, you should figure out your specific 3-
Switch working mode.
There are only two pins and you should be able to read it.
Anyway, weld it to the small board and put it on one side.
The way my switch works: there is 1 input pin and then the rest of the pins are connected to the input pin when the switch is in a certain position.
Because we configured the input using the internal pull-
Upper resistance, the default input value is high in numbers (1).
The way I read the switch position is: When pin 1 is low and pin 2 is high, that means the switch is in the first position.
The switch is in the second position when pin 2 is low and pin 1 is high.
The switch is in the third position when both pin 1 and pin 2 are high (
In this case, the output pin 3 of the switch remains disconnected).
My configuration is shown in the figure.
The keyboard plate cuts another prototype plate of medium size and welds a 7-
Pin head on the board for keyboard connector installation.
If your keyboard doesn\'t have my connector, design another way to connect the keyboard.
I like to be modular so that if you want to use parts in another project, you can easily remove the parts.
The keyboard board will have 12-pin connector (
7 keyboards, 2 power/ground, 3 switches)
So in 12-
In the final project, fix the row of the female title to the position closest to the motherboard.
The title layout is displayed in the picture.
The first pin is the positive voltage (Vcc)
, The second and third pins are the mode switch, the fourth pin is the deck switch, and the next seven pins are the keyboard (
I welded them directly for simplicity)
The last pin is ground.
The keyboard connector inserts the keyboard board into the motherboard.
At this point it\'s just a 12x2 board with 12 male titles on a row.
We will weld the wire to the motherboard later.
Therefore, it is only necessary to cut the 12x2 part of the original plate and then weld 12 male heads in a row.
See pictures for more details.
Put it together and we now have all the parts of the keyboard part of this project.
I suggest waiting until your enclosure design is all ready to weld the parts together so you can get the best possible spacing.
The 12-pin connectors need to have these connections: weld the wires to the main keyboard board in order to make all of them, take a look at the pictures and see how I did that.
You want to connect the LEDs so that two-
Way switch connects one of them to the ground in either position.
I would suggest to cover this with your specific section before welding a permanent connection.
My switch has 3 pins, the center pin is the input pin, the left and right pins will be connected to the center pin according to the position of the switch.
All I need to do is connect the cathode (-)
Left or right pin and anode of LED board (+)
To the supply voltage.
You should all be ready!
Glue the keyboard board to the appropriate position on the panel, except for the LED board.
These will be installed on the bottom panel later.
This section is almost a problem.
All of the various boards for host control and show you how to weld the lead to the potentiometer.
The button is welded to its own small board mounted on a wooden gasket and the external button is glued to it.
See the picture for a better explanation.
The rotary encoder is also mounted on its own small board and then glued to the front panel.
The sliders and potentiometer simply weld the leads to their pins and then contract on them to prevent shorts.
Material: make the press plate in order to make the press plate you need to cut three prototype plates.
Measure before cutting to see how much you need to hold buttons and wires and the brackets we will use to connect them to the front panel.
Also consider the spacing of the buttons and try to center them as much as possible under the panel buttons.
There should be a board with two buttons and a board with one button (
Or a long board with all the buttons on it, but I don\'t have the original board big enough).
My work came out to measure 2 1/4 \"11/16 \"(for 2-button boards)
1/4 \"by 5/8 \"(for single-button board).
Weld the button, make sure you know which pins are connected when pressed and not pressed!
Then weld three wires to two.
A button plate and two wiresbutton board.
Make sure these are long enough for the final installation! The two-
The wires of the press panel are grounded, buttons 1 and buttons 2.
Weld the ground connection to one side of each button, then weld the other two wires, one to the side of each button opposite the ground connection.
See pictures for more details.
Make sure there is room left on both sides and center so that we connect the board to the front panel.
To build a rotary encoder board, you need to cut a prototype board that can hold the encoder itself (
I just cut out the part where the installation pin is)
, The five wires we need to weld, and the two brackets we will use to mount the encoder to both sides of the front panel.
Weld the encoder and simply connect the wire to each pin.
Make sure they are long enough to reach the motherboard during the final assembly!
In this step we will weld the wires to the potentiometer as they will be mounted on the panel.
This can get very tedious, so be prepared!
The preferred way I do this is to twist the wire, then put it on the pin of the potentiometer for physical support, then weld it, and finally, slide some shrink pipe on the connection, make it look tidy and prevent possible short circuit.
This process is described in detail in the picture.
Just heat the Shrink tube to make it shrink. I used a super-high-
Tech space heater, just find something that works!
Please note that when I weld the wire to the potentiometer, I use the front panel to fix all the potentiometer in the appropriate position.
Repeat this process for the sliding potentiometer.
Make sure the wires are long enough to arrive during final assembly!
Now we will install everything on the front panel.
For the press-button plate, cut a few small pieces of plywood as spacers and stick them to the button plate on both sides of the button, one in the middle.
Then, stick these plates under the tip of the button and make sure to center the button as much as possible.
Look at the pictures and see how I position everything.
When you are satisfied with their positioning, you can glue the top of the wooden button directly to the button.
Use a very small amount of glue so it doesn\'t affect the operation of the button!
The rotary encoder can simply stick directly to the front panel without any spacing.
Make sure the knob has enough clearance to press the button function!
Install the rotary potentiometer using the supplied nuts and washers, tighten them so that they do not rotate when you turn them.
The sliding potentiometer has screw mounting holes, but I chose to simply glue them in place.
Carefully arrange them so that the slider can perform a full range of motion.
Make sure to take the felt shield from x-
Large sliding pan where you will stick to it or elsewhere that will not stick together effectively (believe me).
Use a few wooden spacers so that the slider does not stretch out so much from the front panel.
See the picture for more details.
You should now have most (if not all) controls installed on the front panel!
It\'s finally starting to look like a DJ controller!
Next, we will transition to the firmware section of this project before we finish the hardware build.
In this way, we don\'t have to be a soft artist in the future to insert ICs into the motherboard.
So put the soldering iron down a bit, take some fresh air and start coding!
Note: At this step, I have attached the independent demo code for rotary encoder and MCP3008 SPI communication for reference.
This is the quasi-system code entered for each type.
Surprisingly, there is no MCP3008 tutorial using Arduino or launch pad!
I might make a note to explain this. . .
As mentioned earlier, this project has two different micro-controllers to manage different controls in the circuit.
The main micro-controller is responsible for reading input from 6 analog controllers, reading 5 buttons, explaining the rotary encoder and its integrated buttons, and passing the serial data of the secondary micro-controller to the computer.
The auxiliary micro-controller is responsible for SPI communication with MCP3008 analog-to-
Digital converter and explain input from keyboard circuit (
Composed of keyboard, deck switch and mode switch).
These ICs work together to provide us with a wide range of controls!
You need something to program the micro controller.
Material: If you do not use/install the default IDE (
Code Composer Studio for TI)
To program the board before you start it, you need to get the driver for the startup board before the computer \"view\" the startup board.
To make the initial setup using Energia, follow this guide.
If this is your first time using Energia, I would suggest you upload a few of their super simple demo programs first and then try them out.
It\'s easy, it doesn\'t take much time, I\'ll wait!
We need to install the keyboard Library when you come back from there.
It was written for Arduino but also for Energia.
To install the library, find your Energia folder (
Usually in files)
, And extract the keyboard Library zip into the folder Energia \\ libraries.
Make sure that Energia is set to program bugg2553 on the startup board and that you have the correct COM port selection.
Follow the guidelines above to set up and upload the demo program so you know it works!
Energia should be programming now!
Understand the protocol micro controller to communicate with the computer using the custom protocol I made.
It only used two. byte (16-bit)
Tell the computer about the information about all the controls.
This is to reduce any possible delay, just to practice my bit math skills.
Note that the original serial data is not human readable in the lightest Range!
This section contains an explanation of the protocol so that you can better understand how all the code works.
You don\'t have to read this section, but it may help you if you want to modify the project.
The general format of all messages is as follows :| | 
ID Num | Type | value ID number tells us which control sent the message.
Type tells us if it\'s digital (0)or analog (1)control.
This value is just a space where the control can place any message it needs to send.
The simulation information is very simple.
Their format is as follows :| | 
ID Num | type | 10-
Familiar with bit ADC?
This is because it is exactly the same as the general message, only the type bit is always 1 for the analog control.
We happen to be using output 10-
Bit value, how convenient!
In addition to the fact that the type bit of the digital control is always 0, the digital control is in exactly the same format as the analog control.
The value is just a Boolean and the last bit will be 1 (
High for numbers)or a 0 (Low number).
KeypadThis is where it starts to get more complicated.
To work properly, the keyboard needs to convey several different values.
Because of this, its message format is as follows :| | | | | 
ID number | type | key ID | on/off | mode | deck | don\'t be careful the keyboard is always digitally controlled (type = 0).
The ID number of 0 is reserved for keyboard input, so the first 6 bits will always be 
The next four digits are the key ID number.
Because we have a 12-
Button keyboard, we use the ID number 0 to 11.
However, since the hardware will never receive them as input, the remaining numbers can be used for other things.
I decided to use key ID number 15 to indicate the deck change command (
Send when deck switch flip).
This allows us to set up the active deck and PFL using the deck selector switch.
The next one just tells us if the button is pressed (on)or released (off).
The next two represent the pattern of choice.
From 0 to 2 (
So we need two bits to represent the pattern).
The next one represents the selected deck, deck 0 or deck 1.
The last two parts that we don\'t care about will not be explained either.
The rotary encoder is not complicated, but note that it also has a reserved ID number 1 for digital control.
The format of the rotary encoder message is as follows :| | | | 
ID Number | Type | Value | Super Speed | don\'t care if the ID Number of the rotary encoder is always 1 and the Type is always 0.
The value has three different meanings, 0 means clockwise rotation, 1 means counter-clockwise rotation, 2 means double-click, and 3 is not used.
The last 7 digits we don\'t care about will not be explained.
This is all about it!
This agreement is really not difficult to understand.
This is a great way to practice bit-by-bit math skills and extend the limit on the number of packets.
I decided to use 5 bits for the ID number so that the protocol can support up to 32 digital inputs and 32 analog inputs (5^2 = 32).
Place one of them in the boot board and insert it into the computer.
Download the code provided and open it in Energia.
Below I provide a general overview of the code functionality.
I will not introduce the operation of the keyboard library, as there is a fairly detailed record here. The secondary micro-controller is responsible for communicating with the MCP3008 through the SPI and explaining the keyboard input.
I have included the second micro controller code for this project and the demo I did for communication with MCP3008 (
The only tutorial I found was forRaspberry Pi).
I think this should work on the boot board and Arduino.
Whenever a key is pressed, released, or held down, a function called keypadEvent is called to understand the code.
This function is responsible for sending messages to the main micro-controller when the keyboard status changes.
In any case, for example, when a key is pressed, SendKeypadEvent (
Key pressed), a true (
1. the meaning is to press the key)
Digital reading of P1. 7 (which is the 2-
Identify the way switch of the deck affected by the keys)
, And current mode (
Determined in the main loop of the program).
SendKeypadEvent formats the message so it can be understood later.
For more information on how to format the protocol for each control, see the previous step.
It sends two bytes telling the program what key is pressed (
Or if it\'s released)
, Current deck and current mode.
Now, if we look at the main program loop, we see some code blocks.
The first point of the code reads the keyboard and sends any new keys from there.
The second part reads all the analog controls.
Section 3 sends out a change of deck.
This is done using the flag set by the interrupt service routine in the main loop, because sending serial data in the ISR is inefficient.
The knobs are SPI_Control classes.
This localizes all variables and methods and allows you to register any number of knobs.
The main loop just checks if the class is sure that there is a new one (enough)
If so, it sends out a message detailing what the knob is and what the new value is. My in-
Code notes fairly well summarize communication with MCP3008 through SPI: When reading data from MCP3008 adc ic: note that SPI is in mode 0,0, this means SCLK idles in \"low\" state is a bit confusing, but all you need to know is that the function readADC gets 10-
Bit value of MCP3008 for any channel.
If we look at the SendDeckChange feature, you will notice that it was sent as a keyboard key.
Since we only have 12 keys, but we use 4 bits to indicate the key pressed, we can use 12-
In any case, because they will never be received as input by the hardware.
So we use key ID 15 to represent the deck change.
The micro-controller scans each clock cycle to see if the keyboard button is pressed, queries all the knob values of the MCP3008, and checks if they have changed within a certain sensitivity range, and check if the deck switch is flipped.
See the code for more explanations, and its comments are pretty good.
Upload CodeNow you should understand how the second micro controller firmware works, so let\'s keep uploading it!
Get the code I posted to your Energia code window and click the check mark in the corner to verify/compile it.
Should have checked out.
Once done, upload the code to the micro controller by clicking the arrow next to the check mark.
Upon completion, unplug the boot board, remove the micro-controller and put it on hold for the time being.
Now we can program the main controller.
Put another bugg2553 in the boot board and connect it to the computer.
Energia should have all been installed.
The main micro-controller is responsible for reading various buttons and the rest of the simulation control (6 in total)
, Explain the input of the rotary encoder and pass the serial data from the secondary micro-controller to the connected computer.
Understanding CodeI will first discuss how the primary micro-controller handles the messages of the secondary micro-controller, as this is the simplest message.
The message for the second micro-controller is already entered on the pre-formatted RXD pin, so the main micro-controller simply resends the received message to the computer via its own TXD pin.
The code for this is found in the main loop at the bottom.
This is the entire content of the current keyboard information.
Now, if we look at the top of the program, you will notice that I have defined a class called AnalogControl.
This class is almost the same as the SPI_Control in the secondary micro controller firmware, but it reads
The board ADC is not evaluated to MCP3008. It has built-
Code in average and smooth.
As a class, you can easily configure as many simulation controls as you want.
You can set the control ID, the pins sampled by the ADC value, and the sensitivity of the control.
The following is the rotary encoder class.
This also allows you to easily configure any number of rotary encoders, but for me, one is enough in this project.
The rotary encoder class only needs to know what pins to use.
The first two are the actual rotary encoder, and the third is the integrated button input.
In the Loop, we call isNew for each control and use its return value to determine if the control changes should be sent.
The IsNew function contains the built-in-
In the smoothing of the simulation control so that each loop does not send a new value (
The measured resistance may be slightly unstable due to various reasons such as temperature and vibration)
This can prevent the jitter from being controlled.
We also check an array of Boolean values that indicate if the numeric control has changed its state.
This flag is set in the interrupt service routine of a button.
Again, this is because sending serial data in the ISR is inefficient.
For an explanation of how the rotary encoder code works, check out this tutorial.
Thanks for the bildr tutorial above, which I wrote based on the rotary encoder code!
Upload the code of the main micro controller code you know and we can upload it to the micro controller!
Copy my code into the Energia window and click the verify button.
When the build process is complete and there is no error, you can upload the code to the micro controller.
This micro-controller stays in the startup board of the completed project so that once you have finished programming, you can put it in place.
Now, we will finally build the motherboard!
This is where most hardware magic happens.
Secondary micro controller of main board host (
Hereinafter referred to as \'smcu \')
And the MCP3008 ADC chip, as well as all the controls.
It also welds connectors for keyboard boards and launch boards.
Material: build the board before we start: for details on how to make all the necessary connections, see attached circuit schematic!
For help reading this schematic, see this tutorial for Sparkfun.
Try to follow it as we move forward.
Also, keep in mind to keep the data sheets of the rwg2553 and MCP3008 open while welding to ensure the correct connection is made!
Explain how to do it in SPI (
Serial Peripheral Interface)
The protocol is valid, please see this tutorial for Sparkfun.
The IC socket and emitter connector most of the boards are wired to all the other controls of the DJ controller, but the few components that actually fill the board are the IC/socket and a single resistor.
The rest is the wires!
I put 20-
Insert an IC socket at the center top of the board and then weld 16-
The pin IC socket under it, leaving a gap in the center of the rotary encoder board to clear.
Do not insert the actual IC and the welding heat will damage them!
I then welded 17 wires for the launch pad shield and started welding some of these connections.
Make sure you write down what wires will be available when connected to the launch pad!
Weld the other end of these wires to our previously made Launch Pad shield.
Make sure they arrive!
From the power connection of these pins, we need to weld the power supply and ground to the SMCU and mcp3008.
To do this, select from the launch pad which wires are power and ground, and weld the wires from the power supply to the SMCU of the mcp3008 and pin 1 of pin 16.
Self-reference voltage (Vref)
Will be the same as our supply voltage, bridge pins 16 and 15 for mcp3008.
To connect the ground to two chips, connect the ground to pin 20 of the SMCU, and connect the ground to pin 14 (AGND)of the MCP3008.
Since our AGND and DGND are the same, solder the connection of the pins 14 to pin 9 of the mcp3008. That\'s it!
Now both chips should be powered on.
At this point, we will also weld on the tension
The upper resistance of the SMCU reset pin.
This is necessary for the micro controller to work independently.
For this, please use the 10 kOhm resistor and at pin 1 (supply voltage)and pin 16 (RST)of the SMCU.
I used some extra shrink tubes to prevent short circuit.
See pictures for help.
SPI interface, welding connection of SPI interface from MCP3008 to secondary micro controller.
Pins 7, 8, 14 and 15 on the secondary micro-controller are connected to pins 13, 10, 12 and 11 on the MCP3008, respectively.
Control shere is where other fun happens: weld all the controls to the motherboard.
First of all, cut off all the wires of the controller so they can arrive without a lot of extra wires (
Leave a little slack)
, Especially the potentiometer near the installation location of the motherboard.
Peel them properly and start positioning their wires on the board so they don\'t conflict.
You can try to connect the control directly to the desired location, but you can also use a little jumper.
Note: I found it very difficult to install the Motherboard later due to the wire placement of the control.
Consider making the wires a little longer and wiring them to the edge of the board instead of wiring them directly.
The potentiometer requires a ground connection on the top pin and a power connection on the bottom pin.
The pin in the middle is the output of the potentiometer.
I connect the trebel, mid, and bass potentiometer to the main micro controller.
Weld the output of these six pins to pins 2, 5, 6, 7, 14, and 15.
The other 5 potentiometer needs to be connected to the mcp3008.
The pins on the left are channel inputs, so any 5 of them are OK.
The pins are a bit different on the sliding potentiometer. On the extra-
Large sliding tank, pin 1, 2, 3.
Pin 1 should be connected to the ground, pin 3 should be connected to the positive voltage, pin 2 is the output, should be connected to the left side of the mcp3008.
On the medium slide pot, the two pins on the top are ground, output from left to right, and the individual pins on the bottom are positive power.
The rotary encoder has 5 wires falling off.
These are: 2 ground connections for the output of the rotary encoder, 1 button connection and 2 connections. On the three-
On the pin side, the intermediate pin needs to be connected to the ground.
The left pin goes to pin 8 of the main micro-controller and the right pin goes to pin 9. On the two-
On the pin side, one pin is grounded and the other is grounded to pin 10.
Which pin is which is not important.
For more help connecting to this page, see the picture or view this page.
Recall the connection you decided to ground on the button board.
This needs to be welded to the ground, and then their output is welded to the appropriate pin that causes the emitter wire of the main micro-controller.
The button inputs on the main micro-controller are pins 11, 12, 13, 18, and 19.
The keyboard circuit finds the small 12x2 joint you made for the keyboard connector A while ago and solder the wires on it so that they can reach the motherboard.
Remember which wire is which!
Then make the appropriate connection.
The power supply and ground pins need to be connected accordingly.
The deck switch pin on the secondary micro-controller changes to pin 5.
The two mode pins are pin 18 and pin 19, respectively.
Keyboard pin 1-
7 to pins 12, 2, 11, 10, 13, 9 and 6, respectively.
See schematic for better ideas.
The shield connector uses the layout you have previously determined to weld the shield connector to the motherboard.
I wrote mine on one side of the blackboard.
Check them carefully before you make the connection permanent!
If the wires go wrong here, you will really mess up everything!
Now that it\'s done, we should connect all the hardware to where we need to use electricity.
The only thing left to do is locate LEDs and connect them to where they need to go.
In the next step that we complete the case build, we will do so.
Insert the bugg2553 programmed with the secondary micro-controller code into 20-
Pin IC socket then insert MCP3008 into 16-pin IC socket.
Make sure to insert the correct micro controller, the main micro controller will not be too happy in this circuit.
Now, stick the motherboard to the center of the front panel.
Use some more wooden spacers to make it fit.
Make sure there is no gap problem or possible short circuit.
Keep in mind that throughout the life of this controller the wires may move a bit inside, so you may want to secure the wires with tape or wire tie.
Insert the launch board into the shield and let it hang for the time being.
Look at the gaps you have to use in order to insert ICs now.
We waited for a while. are you not happy?
Now we will close the case.
You need some material to do this: Material: install SidesTo install the side, I just used super glue on the bottom panel.
Note that there is a hole in which side panel of the USB connector.
This will be the front side plate.
Stick the pieces to the correct position on the edge of the base.
Did you see those little pieces?
These are to keep the launch board in place so you can remove it and use it in other projects if you need it!
Stick those on it.
The left side of the base, so they align with the side of the plexiglass.
In doing so, make sure you use the launch board as a guide so you know it\'s right!
The USB connector for the launch pad should be aligned with the laser cut hole on the plexiglass.
Next, we will install the led.
The blue LED is under the left deck indicator and the red LED is under the right deck indicator and you may want to try to make the tube so that the light does not spread throughout the case.
I suggest wrapping some shrink on it with a plastic straw.
Rgb led under the rocket ship logo.
You may want to polish the outside of the LEDs to help spread more light.
Try positioning the rgb led so its center will hit the wood part of the logo and even if you do, the lighting will look more.
When you are satisfied with the positioning, stick them in the appropriate position.
Take out the soldering iron for the last time and weld the deck indicator to the deck switch (
You should have hung the wire for this).
The rgb led is always on when the controller is plugged in, so just weld the power and ground.
Make sure the polarity is correct and the led does not work backwards (
This is what the diode means).
Install the front panel and you can use super glue (
Seal the contents permanently. . . )
Glue on top with some plexiglass or find some suitable brackets.
It is not a good idea to drill in/screw into the plexiglass as it will crack.
Be careful not to damage the side of the plexiglass or the front panel when doing this!
Note: The finished product in these pictures is just a rough prototype.
The laser cutter couldn\'t cut the sides, so we just scored them with a razor and then broke them with some chicken legs, making them roughly.
There are some errors with the hardware, so I don\'t want to seal the parts completely.
It still looks cool but not as smooth as I want it to be.
Also, I haven\'t welded the pad shield yet and I plugged in the wires.
Try different ways to install the starter board!
Put the launch pad in the small corner we made for it earlier in this step.
The USB holes should be aligned and the boards should be effectively fixed in place.
This is the end!
The hardware/physical build aspect of this project should be all done.
Our hardware is finally finished.
Pour yourself a hot and cold drink (
Coffee or refreshing drinks)
Sit at your desk
Now we start the software side of this project.
The software aspects of this project include a custom program written using Processing, an IDE/language that is very similar to Arduino/Java, some kind of virtual MIDI driver, and your personal favorite DJing software.
In the next few steps, we\'ll cover the configuration of each program, but now you need something!
Material: We will use several libraries with processing functions. proMIDI 1.
0 allows us to send/receive MIDI commands in the program, very useful!
Control p5 is a great processing library.
It allows us to quickly create a beautiful look and functionality UI for our program.
The virtual MIDI driver delivers the MIDI messages we create in the program directly to the DJing program without the need for a physical cable/real MIDI connection.
For Windows, we have to use loopMIDI.
There is a local solution for Mac and Linux.
I will show you how to set up this virtual connection in the next steps.
For DJing software, I only tested it using the virtual DJ Pro as this is the software I chose.
But the method we use (
Custom MIDI command drawing)
Supported by many top djing shows such as: Traktor Pro, Ableton Live, Serato DJ, Image-
Line deckadvance, even the Mac of DJay of Algoriddim (
Not sure about this, but try it).
These links are MIDI controller mapping tutorials for respective programs.
Any DJ software that can map custom MIDIcommands should work.
I will only introduce setting up this controller in this Instructure to use with the virtual DJ Pro.
Note: I don\'t know about other DJing programs, but the virtual DJ allows you to export and import custom mappings.
If the instructures community actually builds this, then you can swap the mapping of other programs in the comments.
I haven\'t mapped everything on my controller yet, but I will upload what I have done.
Since processing is cross-platform, you should theoretically be able to use this project in most operating systems.
However, I have only tested it on Windows.
Before we start doing something else, we need a way to virtually connect our interpreter to the DJing software.
To do this, we need a virtual MIDI driver.
On Windows, you can download and install loopMIDI, which is built in on Mac or Linux.
Follow the instructions for Mac and Linux.
Note that I haven\'t tested this setting on Mac or Linux yet, but it should be possible.
You might have to play around.
This should all be set up and we can see if the next step works!
To set up loopMIDI, just open the program, type the name in the new port name box, and click the button.
Then you should be able to find a MIDI port called \"anything you put in the box!
Edit: So after wrestling with loopbe1\'s \"convenient\" feedback prevention feature, I decided to switch to a different virtual MIDI driver for Windows.
If a large number of messages are sent in a short period of time, feedback prevention is almost just monitored.
See that we often modify multiple sliders at the same time on the DJ controller, which causes LoopBe1 to mute the MIDI channel and cut off the control.
I am very inconvenient if you ask me.
It should at least be configurable.
Anyway, the new software I started using was called loopMIDI by Tobias Erichsen.
Good software, simple, no extra software MIDI through.
This program is connected to the serial port of the startup board so that we can receive the input.
It gets the message, decodes it, and formats the MIDI message and sends it out.
It also includes a user interface that allows you to select the right serial port and MIDI connection.
If you connect to Microsoft MIDI Synth, you can play some very weird piano with a keyboard!
In any case, I will outline how the software works and then tell you how to configure it.
We need something first.
Material: See the previous step to get setupStart by installing the library.
Find your processing folder (
Usually in files)
And to process the \\ Library.
Extract the library into this folder and you should set it all (
This is the same as installing the library for Energia or Arduino).
Understanding that there are parts of the code that are not related to processing the input of the DJ controller.
These include managing serial ports and MIDI connections and creating a user interface.
I won\'t talk about these parts of the code.
If you would like to explain how everything works, see the page of the relevant library.
Data from the controller enters our program in a function called \"serialevent.
In this function, the two independent bytes of the message are combined into a 16-bit char (not integer. . .
For more information and rant because processing data types that are not signed, see code comments).
It then calls the function \"parsemessage \". . .
ParseMessage is the starting point for processing the bits we receive from the controller.
It uses digit learning to decode the ID number and type of the control that sent the message.
It can then send the message to the appropriate function to process based on these properties.
If the control is an analog control, it will call \"process dialog \".
This function is for 10-
The bit value of the control and convert it to a MIDI value between 0 and 127.
It then sends a control change MIDI message by calling send control change.
A control change is a MIDI control that has a variable input instead of a note that has an on-off state.
If the control is a digital control, it has 3 options on how to handle it: if the ID number is 0, the number is reserved for the keyboard, so it will send it to the \"process keyboard\"
If the ID number is 1, the number will be reserved for the rotary encoder in order to send it to \"process rotary \".
If the ID number is neither of these reserved values, it will process it as a generic numeric input (aka button)
By sending the message to \"process digital \".
What key is pressed by the Process keypad decoding, its on/off status, the mode selected at that time, and the deck selected at that time.
It then sends MIDI notes based on this information.
MIDI note numbers are calculated using a special algorithm that provides unique note values for each combination.
What is the value of the Process rotary decoding message, and whether the integration button is pressed when the rotary encoder turns.
The range of values from 0 to 2, 0 indicates clockwise rotation, 1 indicates counter-clockwise rotation, and 2 indicates double-click (
Used to load the track onto the selected deck).
If the integration button is pressed while rotating, the SuperSpeed bit is set to 1, and if pressed, the program sends 10 MIDI messages.
Since the rotary encoder is intended for browsing the library, you can scroll the songs faster.
Process digital simply decodes the last bit in the message and tells if an on or off MIDI message is sent for a specific comment associated with the control.
For more information about the protocol used by this VPs, see the first step in the firmware section.
Run the code and configure the software you understand the code and let\'s start running it!
When you open the processing for the first time, you will notice that it is almost the same as Energia.
They are based on the same thing (
I believe it\'s wiring. .
This makes the start very intuitive!
Copy and paste my code into the editor window and click the Play button in the top left corner-hand corner (\"Run\").
A small window with two drops should pop up.
Menu and three buttons.
These controls allow you to select the MIDI output you want to connect to and the serial port input you want to listen.
If you unplug/insert a boot board or MIDI connection, the refresh button allows you to refresh the list.
Connect the MIDI output line to the loopMIDI for our purposes (Windows)
Or the virtual MIDI port you created earlier (Mac/Linux).
Insert the controller and connect the material port to the serial port where the controller is located.
It should be the one you used with Energia.
MIDI input from the controller should now be able to reach anything connected to the other end of the virtual MIDI port.
Note: the file that comes with this step is Mine (incomplete)
The mapping of the DJ controller I built.
It will work with the virtual DJ Pro 8.
Just find your VirtualDJ folder (
Usually in files)
, Then paste this file into the VirtualDJ \\ Mappers folder.
This should be the trick!
This is the last step in setting up!
It varies depending on the DJ software you use, but I use the virtual DJ Pro 8.
It has a handy script system called VDJScript that allows you to map complex commands to MIDI messages and make this controller very powerful.
Other DJing software may have similar systems, please check your user manual or the website of the software company.
I won\'t go into details on how to map the Command as it can get very complicated, but I will include mine (incomplete)
Mapping of virtual DJ.
Note that the ID number may vary depending on how you connect the control, so the control may change.
So if you\'re just learning how to map commands for your particular DJing software, this is the best.
This way you can customize the operation of this controller more!
Here is a good tutorial for virtual DJ Pro.
I link to more tutorials fo