TIMELAPSE SLIDER /4 ARDUINO ENVIROMENT

I finished my interface for the arduino.

The design is a bit different, to save space.

I made a wip sketch in fritzing to visualize whats going on.

A few words to the fritzing sketch:

First you can download the free fritzing app at fritzing.org
Its a sketch-app for designing interactive electronics. It has a huge-built in library with different symbols and electric parts to sketch prototypes.

ON MY SKETCH

There is no ESC symbol, so i used the 2×5 plug to simulate it.
It deliveres power and ground to the arduino and the servos via the black/red wires.

Also on the photos, its the black/red/white cable that is plugged into the arduino board.

The third line that comes from the ESC (orange in the sketch, white in real life) is the data line that goes TO the ESC for controlling the motor with the ESC.

Next to the orange cable in the sketch are the three data outputs for the three servos for controlling up to three axis.

The servos also get power via red and black from the ESC.

Four pushbuttons (A0-A3) and one pot (A5) use the analog-INs on the arduino to save digital I/Os for the multiplexer.
The multiplexer gets three data lines and on clock, and controls eight leds of the 10LED bargraph. It gets power via 5V and ground of the arduino

The other two LEDs are used by the statusLEDs of the ESC, which i plan to desolder.

The buttons got pulldown resistors underneath the arduino board to save space. Also the multiplexer for the ledstrip is based under the arduino.

20140713-123411-45251493.jpg

Its all mounted on a stripboard, and very thin cables, so i used shrinking-tube to make tiny cabletrees.

20140713-123518-45318206.jpg

A few thoughts on using the servo library for controlling an ESC:

A speed controller is controlled via the same servo signal like a servo, with one difference:

You have to program the speed controller on every startup. Normally thats done by the remote, when you use it in an RC car. Basically its telling the ESC whats minimum, whats maximum and whats brake.

Because it should only be done when powering up the ESC, thats powering the arduino, i put it in the void setup ()

I tried for about 2hours to find the right sequence, because you never know if the ESC needs full forward/brake/full backward, or vice versa, or any othe combination.

Some ESC dont need the brake, or middle position at all.

i ended up with:

void setup ()
{
servo write (0); // full backwards
delay(1000); // wait one second
servo write (180); full forwards
delay(1000); wait one second
}

That sequence made my ESC play a sound and controllable via servowrite function.

Anyway, the problem i got, was that, when my ESC sensors a revers, while on forward, it asumes that you want to hit the brake on an R/C car.

So what it does is, it waits until you release the trigger on the remote, and then lets you go backwards.

In reality, for me it means that it gets only every second backwards cycle because the first one is a full cycle wasted in brake position.

So if you wanna use a system like that, get the absolute cheapest cars ESC with no brake no ABS no traction control. Just forgard backward.

Thats what iam getting on monday 🙂

This is a testdrive with 300ms of 70degree and a pause of 4700ms to get 5sec total time.

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