Sunday, 11 December 2016

Weekend project- DIY TV remote controlled car

Its pretty cool that we can control many appliances in our home wirelessly through IR systems. Perhaps is that all ? In this blog, ill be sharing an interesting use of the TV remote other than its conventional use of controlling the TV. 
So, you can make your own TV remote controlled car by following the video and the resources.
1.The video
https://www.youtube.com/watch?v=qHyx9VvhnWQ&feature=youtu.be
2. The circuit diagram


DON'T FORGET TO POWER THE ARDUINO!!
3. Link for the IR remote library.

https://github.com/z3t0/Arduino-IRremote

4. List of main parts

  • An Arduino Uno,
  • DC motor shafts,
  • L293x motor driver,
  • TSOP 1738 IR receiver,
  • 9V battery,
  • Jumper wires( of-course)



5. And of-course the code for the arduino

// Written and debugged by Siddharth Kothari, monacrylic.blogspot.in
#include <IRremote.h>
int leftmotora=8;
int leftmotorb=9;
int rightmotora=10;
int rightmotorb=12;


int RECV_PIN = 11;

IRrecv irrecv(RECV_PIN);

decode_results results;

void setup(){
  irrecv.enableIRIn(); // start the receiver


  pinMode (11, INPUT); //pin 11 connects to the IR receiver (tsop1738)
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);
  pinMode(10, OUTPUT);
  pinMode(12, OUTPUT);
}

void loop() {
  if (irrecv.decode(&results)) {

  if (results.value==0xE0E08679){ // When the forward button is pressed
   digitalWrite(leftmotora, LOW);
   digitalWrite(leftmotorb, HIGH);
   digitalWrite(rightmotora, LOW);
   digitalWrite(rightmotorb, HIGH);
    }
   if (results.value==0xE0E006F9){ //when the backward direction, button is pressed
   digitalWrite(leftmotora, HIGH);
   digitalWrite(leftmotorb, LOW);
   digitalWrite(rightmotora, HIGH);
   digitalWrite(rightmotorb, LOW);
    }
   if (results.value==0xE0E0A659){ //to turn left
   digitalWrite(leftmotora, HIGH);
   digitalWrite(leftmotorb, LOW);
   digitalWrite(rightmotora, LOW);
   digitalWrite(rightmotorb, HIGH);
    }

    if (results.value==0xE0E046B9){//to turn right
   digitalWrite(leftmotora, LOW);
   digitalWrite(leftmotorb, HIGH);
   digitalWrite(rightmotora, HIGH);
   digitalWrite(rightmotorb, LOW);
    }
   if (results.value==0xE0E016E9){//THE STOP BUTTON !!
   digitalWrite(leftmotora, LOW);
   digitalWrite(leftmotorb, LOW);
   digitalWrite(rightmotora, LOW);
   digitalWrite(rightmotorb, LOW);
    }


  irrecv.resume(); // get ready to receive the next signal
}}

Simply copy-paste this in your arduino IDE and upload it, ensure that you've change the hexadecimal values for the remote buttons as per your remote.
If your receiver doesn't read the value correctly (doesn't give the same value every time you press the button) try using a different remote.
Let the 0x in every if statement remain as it is, it is to declare that the datatype of the value ahead is hexadecimal. 
changes made in the hexadecimal value should follow this syntax-
if(results.value==0x<hexadecimal>)

If you're done with making this, and everything's working perfectly fine, you might want to add some more features, you can do that by simply adding more if statements following the syntax-


if (results.value==0xE0E016E9){
  //add whatever you want to, for example ,switch on an led
digitalWrite(13, HIGH);
    }

I'll leave the rest to you, let your creativity overwrite my code :)

Cheers 
Siddharth






Monday, 25 January 2016

Born to Compete?

" As soon as you're born, they make you feel small,
   By giving you no time, instead of it all,
   and the pain is so deep that you feel nothing at all" 
No kiddo, it's not your fault, it's in the atmosphere.
The race is unidirectional aimed at engineering. India has been successful in breaking previous records of rat races. The concept now targets traditional mindsets having the philosophy of science being superior to arts related subjects. Globally the equality of subjects is understood perhaps, not in all parts of India. With the increase in the no. of applicants giving JEE, an exam common for all Indian engineering institutes, coaching classes for the same have come up. The story doesn't end here, the coaching classes have their own entrance exams. Now the animal has a tail as well, there are separate tuitions to crack the exams of the coaching classes that help you crack, the Joint Entrance Examination. This makes climbing the ladder, even harder. But thats not the problem, is it?
The problem is that many students are often forced to climb this ladder. Students forget their potentials and abilities when they make ATTEMPTS to enter the rat race. IIT is moksha. 
Now, taking a panoramal view. India's population- Incredible India. With 12 lakh people having a common dream of engineering applying for the same exam and ironically for the same college/s that can accommodate 10,000 students at max, is it technically impossible for 12 lakh people to accomplish their dreams at the same go. Out of which many are giving the exam halfheartedly. Its rather an obvious fact that there are going to be many falls from the ladder, some at the beginning and some all the way from the top. Failure often leads to mental depression and psychological disturbance. 
"HEY MAN, ARE YOU CRAZY? YOU TOOK ARTS IN 11th GRADE?????????"
Dear parents and students - Explore and let explore. Today's world has amazing courses to offer that one would have ever dream't of, and the best part is whatever you learn, there are people looking forward to employ you. There are often stories with people having combinations like - Psychology and Buddhist philosophy and economics. They have proved conventional thinking wrong. We all begin with these thoughts, the risk of falling seems to be considerably high. These days those angels don't seen to appear before us and say- 'Ask for a wish'.
http://engg.entrancecorner.com/
Children grow up being successful engineers but end up missing a very a beautiful age of childhood. Which isn't very much worth missing. 


With all due respect and regard I do not mean to express hatred for any institute or subject. All I want to say is that eye-patches need to be removed the world is way broader and non linear enough. All one can conclude is that the education system needs to be RE-ENGINEERED :)
 Cheers,
 Siddharth

Design Thinking for Banzzzzzas you're born, they On thenhheiIts