Recommended Posts

Hello!

My Rescue Helicopter (9396) is about to be delivered ( :wub: ) and I have this idea to put enormous amount of LEDs in it. I have a plan to use Arduino to program proper blinking sequence. I was thinking about mounting also 2 M-motors to motorize rotor and functions. I would love to control them via Arduino but I do not have an idea how to connect motors in a proper way. Has anyone ever done it?

Thanks in advance for any tips!

Share this post


Link to post
Share on other sites

I have cut PF extension cable :devil:.

Hmmm http://www.eurobricks.com/forum/index.php?showtopic=44711 <- here I found a solution how to add custom battery to cable cut in such way. But still I do not know how to connect C1 and C2 to Arduino and how will I be able to drive the motor from Arduino while it outputs only 3.3V and 5V?

Shame I have never been into electronics before... :sadnew:

Still - any help / tips will be much appreciated!

Share this post


Link to post
Share on other sites

@ peter_m: Scroll two-thirds of the way down this webpage on Philo's website to see the "Power Functions Working" wiring diagrams, like this one:

diagram.gif

Share this post


Link to post
Share on other sites

The C1 and C2 lines use 9V PWM. To control them with an Arduino, you will need to use two PWM output pins to drive a transistor that will switch the 9V from the LEGO connector.

Have a look at this http://www.w9xt.com/..._switching.html article which explains the principle.

Edited by reibuehl

Share this post


Link to post
Share on other sites

As reibuehl already said you need to use a transistor. However, if you want bi directional motor control, the simplest and cheapest way (though bulky) is to use a DPDT relay and 2 transistors. This is a good schematic and some explanation http://www.me.umn.edu/courses/me2011/arduino/technotes/dcmotors/bidirectional/bidirMotor.html. To control the speed of the motor you need to use PWM (pulse width modulation) which essentially pulses the voltage which results in a lower average voltage and thus a lower speed. The pins that can be used for this depend on the model of Arduino. The code to do this looks something like this: analogWrite(motorpin,88); // the number can be anything from 0 to 255 with 255 being continuously on and 0 being off. This describes it in more detail http://arduino.cc/en/Tutorial/SecretsOfArduinoPWM. I hope this helps some. Also, keep in mind that Arduinos can only provide a limited amount of current (an Uno can give 40 mA per pin and not much more than that total) and many LEDs going will max this out. Which would require you to use more transistors. Here is a good all around Arduino resource with everything from programming to wiring https://docs.google.com/viewer?a=v&pid=sites&srcid=dW1uLmVkdXxtZTIwMTF8Z3g6NWMwYTgxZTVjYjIxZThjNg

Share this post


Link to post
Share on other sites

Thank you everyone for great tips and resources! If I manage to accomplish what I have planned for my 9396 I will prepare a separate thread with pictures and description :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.