Sunday, April 8, 2012

ADSL Splitter quick fix

I'm using my ADSL splitter for more than 5 years now.Recently I found out that Voice line is not working but Data line is working.When I was checking my ADSL splitter I found out that inductor on the voice side is blown out.Actually there are two filters in theboth side to pass only respective frequencies.

Blown out inductor :




When I searched the internet,I found out that these splitters usually have inductor around 330uH or so for the Low Pass Filter(LPF).So,I gave a try by replacing the blown out inductor with a 100uH inductor,which I had on my component store.TaDaaaa!!! It worked well,if not I could have to buy another splitter ;) ;)

This is Dilshan's post on splitters,Really nice,

Replaced with :

Sunday, March 18, 2012

Micro controller Networking - UART to SPI bridge

There are many parts used in embedded systems.In most cases,we have to transfer data between these components.In this tutorial we're going to look how to receive data from UART module in a PIC micro and transfer those data to another component using SPI module.Using this method we can transfer single input to multiple receivers because we can use more than one component in SPI.

In here,PIC16F887 micro controller is used as the UART receiver and it'll send the received data via it's SPI module.MikroC PRO is used for the writing the firmware.You can download the FREE(with some limitations) version from,


MikroC PRO Download Page


This is the code used.First we initialize UART module to work at 9600bps.
Then we initialize SPI module.Then the code is to check whether there is data coming to UART module and if so,just relay them to SPI module.The last line will send received data again to another UART receiver via UART Tx pin.

You can find more info on these modules form MikroC knowledge base.

SPI Library

UART Library

void main() {
char receive;
UART1_Init(9600);
SPI1_Init_Advanced(_SPI_MASTER_OSC_DIV4, _SPI_DATA_SAMPLE_END,
_SPI_CLK_IDLE_HIGH, _SPI_LOW_2_HIGH);
while(1){
if (UART1_Data_Ready() == 1) {
receive = UART1_Read();
SPI1_Write(receive);
UART1_Write(receive);
}
}


Circuit with PIC16F887 Slave with this PIC16F887 Master:(Click on image to get high resolution schematic)



In the next post,we'll build a simple motor controller slave with this :D

Wednesday, March 7, 2012

Homemade USB LC Meter

I wanted to have a LC meter for a long time.Specially when working with oscillators and stuff,they are really useful.After some research on internet I found this great site by YUS.He had designed a USB LC meter using PIC18F2550.As I had a PIC18F2550 development board with me,I decided to test it on a piece of vero board.

YUS's post including Schematic diagram and Software

But after i downloaded HEX file and tried to program it with my Pickit2,I found that there are no config words included on this HEX file.So,I guessed them by my knowledge on PIC18F2550 and they worked well in the first try.I disabled MCLR too in this and you can build the circuit without R7(4.7k).I've also replace 2N7002(SMD) with a 2N7000(Through hole) because I only had that.
Here are the config words:



Here are some photos of measuring 150pF capacitor and a 100uH inductor shown below.






Finally this is my LC meter circuit on a piece of vero board.
It did only cost me less than US$ 0.50 for this part :)



This is my PIC18F2550 development board on a veroboard.http://www.blogger.com/img/blank.gif
It did only cost me around US$ 1.00 for this part without PIC18F2550 :)



Finally I must say "Thank you YUS for your great design on this" :D