Hacking the Rock Crawler – Part 2

After soldering the wires this is what we get – DSC02005

DSC02005edNow we have to take care of a big issue –

The High logic level for arduino is 5V but the High logic for our chip-on-board is 3.3V, so if we directly connect the wires that we just soldered to arduino, chances are that we will fry the chip-on-board, something that we just cannot afford to do. (It is possible that the pins on chip-on-board are 5v tolerant, but due to lack of any literature we will avoid taking risks.) So how to tackle this problem ??

Now when we think about this then we might come up with these solutions –

  1. Use the analog pins instead of digital and in the analogWrite function use the integer 168 to get 3.3 volts.
  2. Voltage divider circuit.
  3. Use Level Shifter ICs.

Now the first solution is WRONG  and will most probably damage the chip-on-board.

The correct solution is using level shifter ICs or a voltage divider.

Now lets discuss why the first solution is wrong ?

We know that the analog pins in output mode give PWM signals. The thing with PWM signals is is that their average value comes out to be 3.3 V , they do not provide a steady DC output of 3.3 V. The duty cycle with 168 as the parameter in analogWrite function will be approximately 66% i.e for 66% of the time it is outputting 5V and the rest of the time it is outputting 0V so that the average comes 3.3V. But we must note here that it still outputs 5V for majority of time , and during the time it is outputting 5V it is capable of damaging the chip-on-board.

Hence we are left with using either Level Shifter ICs or making a voltage divider.

Whats the fun in making a voltage divider circuit 😛 ??

So lets focus on using the level shifter ICs. Now there are a lot of solutions when it comes to using the ICs. Some possible solutions are –

  1. 74125 (might be obsolete)
  2. 74245http://www.adafruit.com/datasheets/sn74lvc245a.pdf
  3. 74HC4050http://www.nxp.com/documents/data_sheet/74HC4050.pdf
  4. TXS010X series
  5. TXB010X series
  6. CD4050
  7. Field effect transistors with proper biasing

There are probably more solutions than what i have listed and  you can get a very comprehensive list from HERE .

I am using the BSS138 (from adafruit), so the next post would be about how to interface arduino , logic level converter and the RC pcb together.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s