Wednesday, June 22, 2011

Breadboard before you solder.

I repeat the title - Breadboard before you solder.I didnt say simulate,'cuz simulations are a personal pref.,but PROTOTYPE. Dont get that smoking gun out too early.

Just wanted to get this across. :P


I recently recd a 'SchmartBoard' sample in the post.Its basically a PCB,which makes prototyping with SMD components easier.See a pic here.

See the site for their entire(and very innovative,I must add.) product range.


This is a common topic learners deal with.A great article here. Must Read for all embedded systems enthusiasts :)

SMD with through hole components

One can always solder through hole components as SMDs,by laying their legs out flat.Why?
Well,while making your own PCBs(homebrew),it can save you drilling,and still allow you to use conventional components.
Pics up soon :P

Sunday, June 19, 2011

Whats that middle pin?

The popular Nokia BL5C battery(pic here) has 3 pins.One -ve,one +ve .. and the other one?
Mobile servicemen call it the "BSI" pin.BSI? They say its short for 'Battery Size Indicator'.Hmm,ok.Turns out,its a fixed resistor behind it,between the BSI pin and ground.The phone measures the resistance of the BSI - GND pins, and can determine what kind of battery is in.

The BSI GND Resistance for a normal BL5C comes out to 82.5k,and on a 4C to around 74.6k.Interesting.


While working on my ENC28J60 Project with the PSoC3 FTK,I felt a pressing need to get some debugging data out,in realtime(dont wanna pause it >.< ).There are a few direct solutions,
2.Serial Interface(UART)

LCD can be run at 3.3(here) but its too many wires,and limited text.That makes UART our preferred option.Which explains the title,TTL-UART.

PSoC Creator has a UART component,which can output RX-TX lines(TTL) to the GPIOs on the underside.Hunting around on the net,there are a couple of solutions.Keep in mind,that these will be 3.3V signals.

Before we discuss various options,Serial Port interfacing is basically about turning a 0-3.3V signal to a +/- 12V signal(Inverted) and the reverse for RX.

1.Use a dedicated chip.
MAXIM Semiconductors has a dedicated bunch of chips,each with different features.The one we'd need is the MAX3232(here).Its a one-chip solution,with only some decoupling caps externally.Make a neat PCB,and we're done :)
Sadly,this isnt a common chip here(unlike the MAX232),and ordering is costly :(

2.Use a popular "2 Transistor" Solution.
This is another popular method,which involves  basic NPN and PNP switches based on the 3906 and 3904,though there are variants around.(a detailed explanation of this circuit)

3.Bring in the MOSFETs! :)
Another solution uses a 2N7000,an N-Channel FET.Images,PCB and more here.

4.Use the MSP430 Launchpad(or similar)
If you do have an existing board which has some kind of TTL to USB/UART interface,get it out,and rig it up with the FTK :) .. A messy arrangement,what with 3 boards(Ethernet module too :P ) but it works.Even a PSoC1 Eval kit is a candidate here.

5.Use a MAX232
Yes,this 5V chip can be run at 3.3,to no special side effects,and with perfect results.However,this is abuse of the chip,and shouldnt be used for production level designs.

6.Use a FT232RL or similar USB UART IC.
This chip is another great way to approach this.More at the SparkFun store,here.

7.Mod an existing USB-Serial Cable.
The title says it all.Details here and here.(Many such on the net)

8.Use OpAmps :P
This was an Idea i thought of as I was reading the RS232 specs.It blared comparator at me,since a 0-3.3V signal,needs to be inverted and made a -12V/+12V one.While you can use a dedicated voltage comparator chip,or wire a 741 as an inverting comparator with hysterisis,both should work.How about using the analog blocks on the PSoC3? :)

9.Quick & Dirty : A Hex Inverter
Use a hex inverter for a quick and dirty solution.But its success depends on how far you can violate the standard RS232 protocol.
I'll add more as I find/think of em.Take your pick :)

No Go :(

Seems something is off some place else on my PSoC 3 FTK.Adding my own powersupply is keeping it running,but something is defn off. :( Maybe a capacitor leak or similar,which is shorting Vcc-Gnd somewhere.