Introduction: Control of a DC Motor With Arduino and Visual Basic

Picture of Control of a DC Motor With Arduino and Visual Basic

Hello friends this is my first post in instructables.com where I will try to bring more Novelty des often.

Today theme is with Arduino and Visual Basic.

The project that we see today is controller one dc motor with Arduino and Visual Basic.

To control a dc motor is not enough voltage of 5 v arduino I used a BC547C NPN transistor because as you know allows us to control a great power with a small.

Here I present the assembly drawings

Step 1:

Picture of

I did not put resistance to connect the pin of arduino to the base of transistor because the values of the resistors that I have not allowed to circulate much voltage the motor you need in my case a lot of power so I tried without resistance and works but recommend the use of a 220 ohm resistor.

Materials:

· A one Arduino

· A DC motor

· An NPN transistor BC547C

· Cables to connect

· A breadboard

· A resistor of 220 ohms

Step 2: Understanding Visual Basic Program

Picture of Understanding Visual Basic Program

I will
explain a little Visual Basic program design:

Here you see the serial port and changing its name in the properties.

It is the most important thing of the program and where friends found more problems is to put the name of the serial port on the properties, in my case is COM21.
To find yours have two ways:

  1. Entering the Arduino IDE and connect the USB cable to your Arduino. On the Tools> Serial Port menu, you may see the name of the port
  2. Go to Windows Control Panel - Hardware and Sound - view devices and printers. If the cable is connected you will on the screen.

Step 3: Arduino and Visual Basic Programs

Here you have the Arduino and visual basic programs:

Step 4: Conclusion

Hope you like this post and if there is any doubt may be able leave your comments here and be in your disposal to clear them. And for people who are new to the world of programming and Arduino not be afraid to ask and try because you learn so. I leave my friends and the next. Thanks and regards.

Comments

makeosaurus (author)2015-07-06

Are you able to use bc548 instead??

bouchy (author)makeosaurus2015-07-08

You can try.

NavdeepK2 (author)2015-05-26

akruti2 (author)2015-05-15

here book is available to make some basic cool project with arduino + visual basic 6.0

http://www.amazon.com/Arduino-Visual-Basic-6-0-software/dp/1511667753

Dinar sanjaya (author)2015-05-13

source code arduino error?

GizmoMakingDude (author)2014-08-08

Hey, keep in mind that the Arduino can only supply up to 200 mA from its 5 volt pin. I don't believe that provides enough power to do anything too useful with your motor, unless you're working on building a very small machine.

Furthermore, if you decide to use an alkaline 9 volt battery to power the Arduino, it will not be able to power the motor (that is gets power from the Arduino) for long because this type of battery holds very little charge.

I understand this is a demonstration of the software and not the hardware, but I wanted to point this out.

bouchy (author)GizmoMakingDude2014-08-15

Thank you.

Gabse (author)2014-07-28

The next time da a diode parallel to the motor, that will protect your transistor from the inductive current of the motor

bouchy (author)Gabse2014-07-29

Thank you Gabse.

About This Instructable

20,590views

52favorites

License:

More by bouchy:Tic Tac USB 2 transistors Sound AmplifierControl of a DC motor with Arduino and Visual Basic
Add instructable to: