Introduction: Transistor Controlled Motor With Remote Control;Circuit Overview

About: I have an Associate degree in Electronics Technology from Joliet Junior College . I have worked as an electronic technician in telecommunications and at Commonwealth Edison .Presently ,I enjoy electronics as …

This circuit is a transistor controlled motor with a remote.The remote control turns the power on .

The transistor will turn on the motor .The Code of the program will increase the speed of the motor (remote button 1) .Then the motor will turn off(remote button2)


This is the update Code for the Remote Tinkercad

#define DECODE_NEC

#define IR_RECEIVE_PIN   3


#if !defined(RAW_BUFFER_LENGTH)

// Maximum length of raw duration buffer. Must be even. 100 supports up to 48 bit codings inclusive 1 start and

// 1 stop bit.

#define RAW_BUFFER_LENGTH 100                                               \

// #define RAW_BUFFER_LENGTH 112  // MagiQuest requires 112 bytes.

#endif


#define EXCLUDE_UNIVERSAL_PROTOCOLS  // Saves up to 1000 bytes program space.

#define EXCLUDE_EXOTIC_PROTOCOLS   // saves around 650 bytes program space if all other protocols are active


#include <IRremote.hpp>



void setup()

 Serial.begin(115200);

#if defined(__AVR_ATmega32U4__) || defined(SERIAL_PORT_USBVIRTUAL) || defined(SERIAL_USB) || defined(ARDUINO_attiny3217)

 delay(1000);

#endif

 Serial.println(F("START " __FILE__ " from " __DATE__ "\r\nUsing library version " VERSION_IRREMOTE));

 Serial.println(F("Enabling IRin..."));

 IrReceiver.begin(IR_RECEIVE_PIN, ENABLE_LED_FEEDBACK);

 Serial.print(F("Ready to receive IR signals of protocols: "));

 printActiveIRProtocols(&Serial);

 Serial.print(F("at pin "));

 Serial.println(IR_RECEIVE_PIN);






  

  

  

 


//Motor A

const int motorPin1 = 5; 




 

  //Set pins as outputs

  pinMode(5, OUTPUT);

  

  

  





}  

void loop(){ 

  

  

 if (IrReceiver.decode()) {

  //IrReceiver.printIRResultShort(&Serial);

  switch(IrReceiver.decodedIRData.command) {     

    case 0x10: Serial.println("1"); // Button 1

  digitalWrite(5, HIGH);

   

   break;   

  


    

  

 

  

  

  

  case 0x11: Serial.println("2"); // Button 2  

  digitalWrite(5, LOW);

   

   break;   

  

   

   

  

    default: Serial.println(IrReceiver.decodedIRData.command);   

  }   

  IrReceiver.resume(); // Receive the next value

 }  


}



Step 1: Electric Components Used in the Circuit

Materials used in the circuit are ;1 IR remote (Tinkercad)

1 IR remote receiver ( Tinkercad)

! transistor ;NPN ;

2 resistors 1k (brown ,black ,red)

1 diode

1 hobby geared motor ( Tinkercad)

Arduino Uno

wires

Step 2: How the Transistor Works .

The transistor used in the circuit is a NPN .

The transistor has 3 parts

They are ;an emitter ,base and collector .

The current flows from the collector to the base and then emitter .

The voltages are applied to the collector (5volts) an base (in this circuit a pulsed voltages form the arduino pin)

The transistor will run the motor .


This is the updated Code for the remote .It will turn the motor on(button1) and off (button 2)

Step 3: The Diode

The diode in this circuit protects the power supply from reverse voltage from the motor.

Step 4:

This shows the decreasing motor speed.

Step 5: The Arduino Code

#define DECODE_NEC

#define IR_RECEIVE_PIN   3


#if !defined(RAW_BUFFER_LENGTH)

// Maximum length of raw duration buffer. Must be even. 100 supports up to 48 bit codings inclusive 1 start and

// 1 stop bit.

#define RAW_BUFFER_LENGTH 100                                               \

// #define RAW_BUFFER_LENGTH 112  // MagiQuest requires 112 bytes.

#endif


#define EXCLUDE_UNIVERSAL_PROTOCOLS  // Saves up to 1000 bytes program space.

#define EXCLUDE_EXOTIC_PROTOCOLS   // saves around 650 bytes program space if all other protocols are active


#include <IRremote.hpp>



void setup()

 Serial.begin(115200);

#if defined(__AVR_ATmega32U4__) || defined(SERIAL_PORT_USBVIRTUAL) || defined(SERIAL_USB) || defined(ARDUINO_attiny3217)

 delay(1000);

#endif

 Serial.println(F("START " __FILE__ " from " __DATE__ "\r\nUsing library version " VERSION_IRREMOTE));

 Serial.println(F("Enabling IRin..."));

 IrReceiver.begin(IR_RECEIVE_PIN, ENABLE_LED_FEEDBACK);

 Serial.print(F("Ready to receive IR signals of protocols: "));

 printActiveIRProtocols(&Serial);

 Serial.print(F("at pin "));

 Serial.println(IR_RECEIVE_PIN);






  

  

  

 /


//Motor A

const int motorPin1 = 5; 




 

  //Set pins as outputs

  pinMode(5, OUTPUT);

  

  

  





}  

void loop(){ 

  

  

 if (IrReceiver.decode()) {

  //IrReceiver.printIRResultShort(&Serial);

   switch(IrReceiver.decodedIRData.command) {     

    case 0x10: Serial.println("1"); // Button 1

  digitalWrite(5, HIGH);

   

   break;   

  


    

  

 

  

  

  

  case 0x11: Serial.println("2"); // Button 2  

  digitalWrite(5, LOW);

   

   break;   

  

   

   

  

    default: Serial.println(IrReceiver.decodedIRData.command);   

  }   

  IrReceiver.resume(); // Receive the next value

 }  


}



Step 6: About the Circuit

This project show how you can use a transistor controlled circuit to drive a motor .

The remote will turn on the power .

The Arduino Code will increase the motor speed until maximum and them decrease the speed of the motor .

It was made on Tinkercad ,It was tested on Tinker cad and works

It was an interesting project for me

I hope it helps you understand transistors remotes and motors and how they can be used for circuits .

Thank you

https://www.tinkercad.com/things/7pt9ikrPT2f-copy-of-terrific-wluff/editel?tenant=circuits

Step 7: The Decreasing Motor Speed

The remote was turn on and the motor is running(168 rpm)

Step 8: The Motor Is Decreasing Speed

Step 9: Conclusion

This project shows how a transistor controlled circuit (with remote and Arduino Code) can control the speed of a motor .

It was made on Tinkercad .It was tested and works .

I enjoyed this project .

Hope you understand transistor controlled motor circuits.

The link from Tinkercad you can try .You may have to sign in to Tinkercad to use it though.