ARDUINO FOUR LINE DOLLY // HARDWARE UPDATE

I started to finish some old projects, first in the row will be a 3D cablecam.

/home/wpcom/public_html/wp-content/blogs.dir/903/55610033/files/2014/12/img_2641.jpg

Based on four Arduino controlled winches and a MIDI interface, its meant to be driven by a midi sequencer or a touchOSC device, like an iPad.

I started by buying motorshields.
You can only drive two DC-motors per shield so i had to buy two.

/home/wpcom/public_html/wp-content/blogs.dir/903/55610033/files/2014/12/img_2642.jpg

for more information on the used midi shield visit this page

As i discovered at home, they are not meant to be stacked, opposed to the adafruit ones, so i had to clip off some headers and reroute the second shield to (sadly) all the remaining digital IO pins.

/home/wpcom/public_html/wp-content/blogs.dir/903/55610033/files/2014/12/img_2627.jpg

All thats left are the 8 analog inputs.

This is the original routing, which stays intact on the first shield:

A (first shield)

DIR 12 (default pin layout)
BRAKE 9 (default pin layout)
PWM 3 (default pin layout)

B (first shield)

DIR 13 (default pin layout)
BRAKE 8 (default pin layout)
PWM 11 (default pin layout)

On the second shield, i clipped all contacts above, so that the second shield isn’t connected to the first one, and therfore doesn’t copy the first one.

Then i clipped the contacts below too, and connected the original inputs (3,8,9,11,12,13) of the second shield to the following inputs on the first shield with short jumper-wires.

So the scond one looks like this:

C (gets jumper from A)

DIR 6 (A=12)
BRAKE 4(A=9)
PWM 10(A=3)

D (gets jumper from B)

DIR 7(B=13)
BRAKE 2(B=8)
PWM 5(B=11)

For clean IO management i made a small shield that puts the midi-in circuit and motor lines on a clean and easy to use 16×2 plug.

photo one
On the right side you can see the midi interface on a breadboard.
On the left side its on the shield.

The red/white wires are the powerlines of the four motors, that are beeing distributed to the 16×2 socket.

/home/wpcom/public_html/wp-content/blogs.dir/903/55610033/files/2014/12/img_2635.jpg

The MIDI-interface itself is a simple design based on an optocoupler for obvious reasons and is taken off the original midi specifications.

/home/wpcom/public_html/wp-content/blogs.dir/903/55610033/files/2014/12/img_2643.png

for more information visit their page

photo two

From top to bottom:

-My MIDI shield
-Motorshield R3
-Motorshield R3
-Arduino UNO

/home/wpcom/public_html/wp-content/blogs.dir/903/55610033/files/2014/12/img_2636.jpg

/home/wpcom/public_html/wp-content/blogs.dir/903/55610033/files/2014/12/img_2637.jpg

photo four

A view of the 16×2 connector

/home/wpcom/public_html/wp-content/blogs.dir/903/55610033/files/2014/12/img_2638.jpg

It hosts:

-All four motor power lines
-A jumper to temporarily unplug MIDI from Tx
-MIDI – in
-5v
-3.3V
-V In
-Ground
-All eight analog ins

TOUCH OSC

I made a touch OSC interface for my iPad that hosts a midi fader that sends PitchBend messages. The arduino listens to PitchBend messages on all (OMNI-MIDI) channels.

/home/wpcom/public_html/wp-content/blogs.dir/903/55610033/files/2014/12/img_2639.png

I start by defining the pitchbend values with:

void HandlePitchBend(byte channel , int bend) {

Writing the value itself to a variable called blend

Next i call a simple mapping function that maps the PitchBend value (-8192 to +8191) to a value between 0 and 255 and sends it to the H-bridge thats in the motor shield via PWM at a baud-rate of 31250 (MIDI)

bend = map(bend, -8192, 8191, 0, 255);
analogWrite(11, bend);

To decide if its a forward or backwards movement i check the value of the Pitchbend value and set the according bit depending on if its higher or lower than zero.

Zero stops the motor.

What i tried next is the iPad app StepPolyArp

/home/wpcom/public_html/wp-content/blogs.dir/903/55610033/files/2014/12/img_2644.png

The sequence in the screenshot sets the motorspeed according to positive or negative PitchBendValue.
Tempo is Set to 90bpm.

I will add a video asap.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s