Monthly Archives: October 2012

Reversing a RC toy!!

I was in despair shock when I read that in China, there are greater number of hardware incubators than software ones.  But yes, it appears accordingly too.  We see the whole fucking market covered with the chinese toys.  Those RC controlled cars and even flying helicopter toys.!!!!
Mannn, I get so frustrated.

How on Earth they are making the stuff so cheap!!!
Again, its all a matter of production and playing dirty on quantity.

Nevertheless, recently the kids in our house bought a RC toy and yes I got a look of it.  You know how a hardware engineer looks the objects…the Nerdy  dirty way..  but since it was working so I am not supposed to touch it.  In my home, it is official that I cannot touch any working piece of electronic Object.

Anyways, the day came and it finally got damaged, obviously children damage every other toy of theirs!!! YEAHHHHHHHHHHHHH! i am getting a chance to get my hands with that.

So, now the ball was in my court.   Without any delay, the children come to me and asked their electronic shop wala bhaiya to repair the car.  I was not at all in mood to actually repair that shit because Chinese technology is not easy to debug or Reverse, this is what I have already assumed because of my past experiences.  Anyways, I accepted it and added to the crap collection.

Last morning, I wake up, was in a bad mood, because I had a bad dream, that reminded me of someone 😛    So, I autonomously picked that toy out of the collection and started Reversing it.

Reversing the toy Car:

Read the rest of this entry

RF communication

During early days of mine as an electronic hobbyist, the wireless communication had always

Wired bot

got me excited . Afterall, who wouldnot grow tired of those tangling wires of wired bot. 😛 So i got the cheapest rf module available in the market, without knowing much about it. 😛

So this is a simple project for the beginners who are going to use rf modules for the first time. Here, the signals are generated by the user via push buttons and is sent to the receiver module kept at a distance.

Let us grasp some basic information on the working of a RF- module.

Rf modules

These RF modules work between 30Khz-300 Ghz. In our case, it’s frequency is around 400Mhz-500Mhz (434 MHz approaximately).  The digital data is represented as the variations in the amplitude of the carrier signal according to the message signal (known as ASK).It receives serial data and transmits it wirelessly through RF through its antenna. The transmission occurs at the rate of 1Kbps – 10Kbps.The transmitted data is received by an RF receiver operating at the same frequency as that of the transmitter.

Qt: Hello World

So here is the most basic application of Qt: Printing HELLO WORLD !!!!!!

There are two ways of accomplishing that:

  • using Qt- Creator IDE
  • using terminal and creating our generating makefile

First the easy one 😛

  1. Using GUI method:-

First create new QT-console project. (console simply means the output will be in form of a console).

name the project as HELLO.and just click next buttons with the default setting of version control and all those stuffs.. Finally you endup with a screen like this: Read the rest of this entry

Programming AVR chips-“Open” way!

Phew!!!!! Because quite a few people asked me how to do programming in AVR microcontrollers.  There may be the case that they are starting up all this or they are switching from another microcontroller to AVR now [though it is old too 😦  or you may say obselete…]  So, here I am going to explain in short and working way to “make” the things up.

Obviously this tutorial is for linux users, OPEN SOURCE advocates, so we will be learning how to program AVR chips in linux environment open source way.  We will be using Open source tools/techniques and softwares.  The programmer AVRDUDE, the toolchain, VIM editor, usbasp programmer; All are Open Source.  One can use Windows being loyal to Microsoft, (Ughhhh,, I am not going to get a job there if I praise them or boast about them…ooopss…is  there is anything to boast upon for them… 😉 lolzzz..)  Really, In case of windows things works `I DONT KNOW HOW & WHY` and one actually needs to do nothing to make the program compile and burn and thus getting no knowledge about the things being done, what all is involved, who is doing what, etc. etc. etc. So, in case of linux systems, programming AVR is really easy NOW because of some lazy linux users.  People want that they can program in linux without getting much of the pain.  (Yeah, you are thinking right, I am saying for the scary compilation of the toolchains).

One has to make the binary utilities ready for cross compilation, gcc for AVR architecture, avrdude, avrlibc, simulAVR, gdb for avr before starting to think to program AVR in linux.  Frankly saying, I was screwed up when I compiled the  toolchain for the first time.  I referenced 4-5 tutorials for it even then it took a lot of time.  Thanks to Atmel AVR because they provide toolchain for AVR architecture both 8 bit and 32bit.

One can simply download the toolchain, and start working out.  For very obvious reasons, things are not as easy as they appear to be.  Toolchain contains essential binutils and avr-gcc, avr-objcopy etc. but the two most important things are still left.

  • avrlibc
  • avrdude

So, download avrlibc from here :

Avrdude from here:

Go for our favorite method of building program from source code, (obviously iff you like it, you may opt for direct use of it, but I just like to make things work from as low level as I can do).Download the avr-libc from the link provided, and just unzip it, then go for compiling 1.AVRLIBC:

  • $ cd avr-libc-<version>
  • $ ./configure –build=`./config.guess` –host=avr
  • $ make
  • $ sudo make install

now here, config.guess is intelligent script that checks for your systems and configures itself.  Rest is self-explanatory. Or download directly in case of package managers. Ubuntu/debian:

sudo apt-get install gcc-avr binutils-avr gdb-avr avr-libc avrdude

Read the rest of this entry