Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Remote control using PICs and RF Tx/Rx modules

Status
Not open for further replies.

rafael_cordeiro

New Member
Hello. I am working in a remote control project and I need some help.

I want to use a PIC12F675 to read potentiometers (about two or three) and submit their values serially using Tx/Rx RF modules.
A PIC16F628A would get the data and control servos or stteper motors.

There is only one problem. I emailed the Tx/Rx modules suplier and he answered me that the modules work great for data transmission but I would need a filter circuit to prevent data being lost.

So, does anybody know which filter circuit is this? Is it really relevant? The range I am planning is something about 50 or 250 meters.

Thank you for any help.
Rafael Cordeiro
 
rafael_cordeiro said:
Hello. I am working in a remote control project and I need some help.

I want to use a PIC12F675 to read potentiometers (about two or three) and submit their values serially using Tx/Rx RF modules.
A PIC16F628A would get the data and control servos or stteper motors.

There is only one problem. I emailed the Tx/Rx modules suplier and he answered me that the modules work great for data transmission but I would need a filter circuit to prevent data being lost.

So, does anybody know which filter circuit is this? Is it really relevant? The range I am planning is something about 50 or 250 meters.

You need some kind of protocol to help to cope with errors, Manchester coding is a popular choice, and you can find examples by googling.

A good idea is to add LOT'S of redundancy to the transmissions, presumably for your purposes speed isn't an issue?, so you could send each byte of data multiple times, in multiple ways.

If you use a two way radio path, you can then ask for data to be resent (as a modem does), but for a one way path you've got to try and make sure enough gets through.

You can buy radio modules with PIC's built-in, they accept standard RS232 data and do the coding/decoding themselves.
 
My own experiences may help you.

I needed to transmit data over a distance of 5 kilometers. I needed an Ack from the remote end that data had been received satisfactorily. That entailed using transceivers and the only available ones that fitted the spec were expensive and were capable of carrying audio as well as data. They used the 458MHz band. To prevent sideband splatter there were inbuilt filters on the inputs which were AC coupled and accepted a wide range of levels. Each transmitter section had a ‘data slicer’ to determine if a given input level represented a ‘1’ or a ‘0’.

I arranged a check before each transmission to ensure the RF channel was clear. I sent data as RS232, 8 bits plus start and stop bits. At the start of transmission were 3 ‘AA’ bytes to normalise the data slicer, followed by an ‘FF’ byte. The micro controller program tracked the alternate ‘1’ and ‘0’ bits of the ‘AA’ byte till the ‘FF’ byte arrived. The micro then looked for 5 consecutive ‘1’ bits before deciding this was valid data. It then waited for the stop bit.

At the next start bit, it knew that valid data followed. The first byte indicated the number of data bytes that were to follow, ie. the message length. Each byte was repeated inverted so that the mean DC level of the data stream was constant throughout the transmission. The second byte after inversion was compared to the first and if they agreed the data was deemed valid. At the end of transmission the remote end sent an ‘ack’ signal if reception was OK. No ack meant the signal had to be repeated.

While the equipment was in its experimental stage, the micro program kept a tally of the number of invalid bytes received. There were none – which gives a fair indication of the reliability of using a modern RF data system.

If you are using only a Tx at one end and a Rx at the other then you could repeat the transmission x number of times, dependant on past failure rate. It depends a lot on your location and the amount of traffic on the particular band you are using.

I hope that may help.
 
I used tx and rx too in my school project.
ha. since this is only a school project, i reduced the error by limiting the baud rate to 9600bps. The lower baud, the lower error rate.
if possible, add some delay between characters.
 
That is something i don´t have much experience, but i´ve decided to reduce the baud rate and send the bytes multiples times. I´ll also include the delay.
I think high speed transmission isn´t important.
I´ll see.
Thank you all for the answers.
Rafael
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top