Let's Make Robots!

PC Control using an ATMega32u4

I am in the process of putting together a project for another hobby of mine; music. I am a trombone player, who dabbles with many many other instruments, playing in many types of bands. I play in a Band called Dennis, in addition to  a Brass Bsnd, and also play for many others as and when duty calls or opportunity knocks.

Recently, along with a like minded friend, I have started to conjure up a nice little portable recording rig to allow us to record whenever and wherever we like, whether it be on lunch breaks at work, at home etc. Essentially freedom to record without the studio constraints is the aim of the game.

 

Concept - one briefcase-like case (flightcase, pellican case etc, all dependent on what i can acquire) with one IEC socket will be plugged in to provide power to the rig (one laptop and two fire wire interfaces).

Control Box - Bearing in mind most brass instruments takes two hands to wield and we may be recording on our own, i wante to add some kind of foot control system to the build, to enable ease of use. Having read about the ability of the ATMega32u4 to appear and function like a HID such as a keyboard my mind set to work; why not use one to send keystrokes to the Laptop with footswitches?

Keyboard shortcuts could be configured using something like AutoHotKeys, allowing full control of the laptop and the recording software's features while being able to concentrate on the task at hand.

***Pro Micro 32u4 ORDERED - AND RECEIVED!***

I'm thinking that it will be quite a simple circuit for the box; all the switches will be wired up to ground, and the positive side of the switches will be wired to pins on my new pro mini.

Unsure of how yet but when the Pro Mini detects a change in state a void for that button will send the keystrokes to the laptop.

 

***24/07/2014 UPDATE***

Managed to get my little Micro firing some "IT'S ALIVE!!!!!!!" text to an open text document. I don't have any switches purchased for the build yet, so just using a jumper to bridge 5v to my data pin/ground.  Some switches would be lovely!

Next step is to add more buttons to my rudimentary code and also increase functions it carries out.

I'm also looking to add a little 16x2 display (using the I2C converter board to save pins), and also a selector switch to allow multiple layers to be assigned to the buttons.

 

***07/08/2014***

It has been a very long time since I've been able to do anything remotely fun with any of my projects to  family, work and band commitments over the last month or two. While work has not let up i am hoping to get some more of this project done!

I have purchased 5 momentary footswitches and have been given a 6-position selector switch; if I cen these working I'll be able to have 30 commands at my disposal. I have my pro micro breadboarded and 4 'switches' set up, plus have decided to try and incorporate 2 16x2 lcd displays to give me more room to display button functions etc.

In order to save pins with the selector switch i am going to use a series of resistors in conjunction with the selector switch to return different values to one analog pin based on which pin is selected.

Coding work is underway too - I'm looking to use some arrays to map out what void should be triggered based on the current selector position and what button has been pressed.

If successful my main loop would check the selector position, check for what button has been pressed, check the array for the name of the void that the button should be running at that selecor position, then trigger it.

The use of arrays,, i2c screens and buttons etc is something  completely new to me, so it's a long journey to get in functional!

 

More work to follow hopefully!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Adafruit has a small Bluetooth board that acts as a HID device. It has, I believe 14 keys easily definable.

What a great little thing - I hadn't seen that before!

That's definitely the kind of functionality I am trying to replicate; nice, easy keyboard-style control.

I hadn't really considered using bluetooth; I was just going to use a straight USB connection to provide power to the controller, but looking into a rechargable battery may not be such a bad idea - it will increase the range at which I'll be able to record from the base-case. Not a great advantage at the moment but I am considering adding a router to the setup so I'd be able to use a tablet as a remote desktop. Then I'd be able to record in another room with visual and foot control :-)

You don't say what software you're trying to control-one would guess Abelton or Logic or something. If that's the case, chances are a lot of the work has been done for you in the form of Arduino midi control. See this instructable Or anything by amanda gassei there.

Apologies Maxi; never thought of including the programs, ha ha!

I am currently using Presonus Studio One 2, however I am keeping my options open on that front.

There are a handful of 'universal' keyboard shortcuts (Spacebar = play/stop, R = arm recording etc) that are shared by most, if not all DAW software. Using the arduino with the ATMega32u4 and the Keyboard library I would be able to directly control the core functions of the programs by sending these keystrokes, plus using other shortcuts automate other processes (things like logging in/out of Windows, triggering shortcuts defined in AutoHotKey, etc.

That instructable is a cracker though, a fantastic build!

You should have a look here:

http://www.atmel.com/tools/ATMELSTUDIO.aspx

that is Atmel's Development software with Framework.  It likely already has most if not all you need to build your interface.  The framework has a LOT of prebuilt stuff and examples.  It's not arduino, but it is standard C. 

Thanks for the link - I will definitely give it a good look :-)