Arduino – Control DC Motor via Bluetooth

Hi guys,

Control DC motor via Bluetooth

Control DC motor via Bluetooth

In this project we will control a DC motor with a smartphone via bluetooth. This project is great to learn more about:

  • DC motors
  • Interfacing Arduino with your smartphone
  • Bluetooth
  • L293D IC

L293D

If you don’t have the L293 IC you can make the same circuit using the H bridge, anyway I really recommend you to read more about that and the IC datasheet. There’s plenty of tutorials about that. So Let’s start…

Parts required:

  • 1x Arduino UnoIMG_0244
  • 1x Bluetooth Module (for example: HC-05)
  • 1x Smartphone (any Android will work)
  • BlueTerm application
  • 1x L293D IC
  • 1x DC motor
  • 1x Breadboard
  • Jumper Cables

You just need to follow this schematics (I recommend you to wire the TX and RX only in the last step) :

Screenshot from 2013-02-23 17:15:28

Two common mistakes:

  • You need to remove the RX and TX cables when you’re uploading the sketch to your Arduino.
  • Sometimes people connect the TX from the bluetooth module to the TX of the Arduino… that’s wrong and it won’t work. Make sure you connect it properly, the TX into RX and the RX into the TX.

Note:
If the HC-05 Bluetooth Module asks for a password, It’s ‘1234’.

The Arduino code can be download here. Upload this sketch! Make sure you remove the wires from RX and TX otherwise the code won’t upload properly!

For the android communication with our bluetooth module I’ve used the BlueTerm app, It’s completely free, so you just need to go to “Play store” and download it. Then you just need to connect your smarthphone with the bluetooth module. Remember to remove the TX and RX cables. (you can see in youtube video below how that’s done).

I’ve only set 3 commands to control the DC motor:

  • ‘0’ – Turns off the DC motor
  • ‘1’ – DC motor rotates to right
  • ‘2’ – DC motor rotates to left

Check this video to see the circuit in action!

I hope this tutorial had helped you in anyway, you can apply this method to control anything through bluetooth! Thanks for reading, if you tried my code leave a comment or send me an email. If you like this project probably you might like my next ones, so please support me by subscribing my blog and my Facebook page (you can find everything right column )

Posted in Arduino, Arduino Tutorials | Tagged , , , , , , , , , | 40 Comments

Tools – CircuitLab

Hi,

Today I’ve decided to talk about the CircuitLab. This an electronics simulator which you can run in a browser, you can build your schematic in the editor mode and simulate your circuit. You have access to lot of circuit examples and you can edit them. Another cool feature about this program is that you can save all the circuits you made on your account, so if you log in in another computer with your account all your work can be accessed easily. You can check this video to see this working!

you can also run this on your iPad, this feature has been really handy for me

Thanks for reading, I hope you guys try this software, leave a comment or send me an email. If you like this post probably you might like my next ones, so please support me by subscribing my blog and my Facebook page (you can find everything right column )

Posted in Tools | Leave a comment

Arduino – Shrink your Arduino project

Hi,

Sometimes when we’re making some projects with our Arduino and we want to make them permanent It would be a waste to use an Atmega328 chip with so many pins if we’re just using a few. This can be a solution for you to save some money and shrink your Arduino projects to a 8-pin ATtiny chip. You can see the video of this project, but I really recommend to read this article for more information.

I’ve never tried this method before, some people say that this don’t work or they can be just making some mistake without noticing. I’ve already read lots of complains. But anyway I just ordered some ATtiny IC’s so when they arrive I’ll try them and see by myself if this works.

Thanks for reading, leave a comment or send me an email. If you like this post probably you might like my next ones, so please support me by subscribing my blog and my Facebook page (you can find everything right column )

Posted in Arduino, Arduino Tips | Tagged , , , , | 2 Comments

Circuits – 5$ Fan for Soldering Station

Hi guys,

Today I’ll show how you can control a PC fan with a simple circuit that I’ve created this is the easiest way I’ve thought that this could be done.IMG_0209

The goal of this project is to create a Fan that will be used when we’re working with the soldering iron station to remove all the fumes.
(you’ll see the difference in the video)

It’s my very first circuit so if anyone finds any mistake in my circuit please leave a comment here and help me improve it!

Before this circuit I’ve tried 2/3 different circuits but they all failed so let’s start with this one.

Parts Required:

  • 1x Stripboard
  • 1x 12V Power Supply (It will probably give something around 14V if you measure)
  • 1x Project Box
  • 1x PC Fan
  • 1x 100uF Electrolytic Capacitor
  • 1x 10uF Electrolytic Capacitor
  • 1x 12V Voltage Regulator (part number 7812)
  • 1x 5k Potentiometer
  • 1x Diode (1N4007 or 1N4004 for example)
  • Wires

Note: you need to cut the wires from your transformer and measure with a multimeter the volts, you just need 13V/14V if your transformer is giving more than that you need to had a heat sink to your voltage regulator otherwise your breadboard/stripboard will melt!

Here is the circuit diagram:

PC fan control

Here is the circuit on a breadboard:

fanc

Check the Circuit working

Here are some pictures of the assembly process of the circuit:

This slideshow requires JavaScript.

Another idea for this project, you can do something like this

62692_495626040497755_842078_n

Thanks for reading, leave a comment or send me an email. If you like this post probably you might like my next ones, so please support me by subscribing my blog and my Facebook page (you can find everything right column )

Posted in Circuits, Circuits Tutorials | Tagged , , , , , , | 7 Comments

Arduino – Control Servo with Visual Basic

Hi guys,site

Today I’ll show how you can control a servo with Visual basic. Before this project I’ve never used Visual basic so if anyone finds any mistake in my code please leave a comment here and help me improve it.

I’ve always used the Serial Monitor of the Arduino IDE to communicate with the Arduino, but today we will use a visual basic program that I’ve created. Basically in the VB program we have 4 buttons that will interact with the Arduino when we press them.

I’ll be showing program in Visual Basic that allows the user to rotate a servo attached to the Arduino. You need to make 3 connections from the servo to your arduino:

  • Red: 3.3V (depends on your Servo motor)
  • Brown: Ground
  • Orange: Digital Pin 9

NOTE:

  • When you’re using the Visual Basic Program the Serial monitor on the Arduino IDE must be closed
  • You need to match the com port on your Visual Basic Code to the right com port you’re Arduino is using

I don’t know why but youtube cropped my video, the Last two buttons are “Rotate 180º Left” and “Rotate 180º right” .

Thanks for reading, leave a comment or send me an email. If you like this post probably you might like my next ones, so please support me by subscribing my blog and my Facebook page (you can find everything right column )

Posted in Arduino, Arduino Tutorials | Tagged , , , , , , , , | 8 Comments

Circuits – Homemade PCB’s

Hi guys,

Today I’ll share with you two ways for making homemade PCB’s! I’ll just show two of the methods I’ve found easier and cheaper:

  • Photo Resist Method

  • Toner Transfer Method

I’ve never tried any of this methods before, but I’ll make the toner transfer method soon and when I finish my project I’ll share with you !

Thanks for reading, leave a comment or send me an email. If you like this post probably you might like my next ones, so please support me by subscribing my blog and my Facebook page (you can find everything right column )

Posted in Circuits, Circuits Tips | Leave a comment

Arduino – Control LED’s with IR Remote Control

Hi guys,

Today I will talk about how you can control any device using a remote control and your Arduino. First I really recommend you to go to this page and download the IR library. You just need to follow the read me file to install. I think that any IR remote control can do this, I’ll be using a Philips Universal one.

Parts list:

  • 1x Arduino
  • 1x Breadboard
  • 1x Remote control
  • 1x IR receiver ( I’ll be using TSOP4838)
  • 4x LED’s
  • 4x 220ohm resistors
  • Jumper cables

The infrared receiver has 3 pins:

IR receiver labels

  • First pin: Vout, outputs HIGH when no signal is present and LOW when a mark is received.
  • Second pin: GND.
  • Third pin: Vcc.

First I’ve started to wire my circuit like this

LED's IR

 

And then I went to the arduino IDE > file>examples>IRremote> IRrecvDemo. You need to upload the sketch to your arduino, open the serial monitor and start using your remote control and see which values the arduino is receiving.

After a while I’ve wrote down which values appear in the serial monitor when you press the volume up key or any other key, and write it down for all the keys you want to use. And they were:

  • Power:  E240IMG_0177
  • Forward: E250
  • Reverse: E248
  • Volume+: E244
  • Volume-: E254
  • Mute: E24C7

You will need to convert these hexadecimal numbers to decimal, you can use this tool for that. Then just need to change your remote control values from my arduino code (click here to download my code). And upload the code!

Here is the demonstration:

Thanks for reading, leave a comment or send me an email. If you like this post probably you might like my next ones, so please support me by subscribing my blog and my Facebook page (you can find everything right column )

Posted in Arduino, Arduino Tutorials | Tagged , , , , , , , , , | 6 Comments