微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 微波和射频技术 > 天线设计和射频技术 > ASK ..tx/RX transmitter receiver remote control

ASK ..tx/RX transmitter receiver remote control

时间:04-08 整理:3721RD 点击:
I built as system where I used multiple TX/RX modules to transmit data. The data was encoded using AVR microcontrollers with codes I wrote myself. It seemed perfect when only 1 TX was on and it could select addresses and send data to any of the 3 respective RX modules with respect to the address sent by the TX. But when 2 TX modules was ON the RX received data from only the nearest TX module.

1. I did not use interrupt in my coding.
2. All TX/RX modules work at the same frequency i.e 434MHz.

Is there any way i can overcome this problem through coding.?

I want to race cars using this system as the wirless control method. But I can not do so if the RX modules receive data from only the nearest TX module.

Is there any other DIY remote control methods I can use for this purpose?

Looking forward to your generous help.

If u want to see the code just knock me I'll mail it to you. or upload it here if needed.

If possible use different frequencies for each unit.
That would probably be the cleanest solution.

I can think of others but they are all quite "messy".
(such as broadcast a "header" that turns all other modules off
for a short time)

jack

thanks...I cant really Use the ...cleanest solution ..coz then I would neeed ...ASK transmitters of 15 different frequencies...which arent available........

SO I would love to hear a bit more abt the messy ..solutions

code for receiver


while(1)
{
sync=getchar();
if(sync==25)
break;
}
add=getchar();
data=getchar();
chksm=getchar();
if(add==20)
{
if(chksm==(add+data) )
{
PORTA.0=(data>>7)&0b00000001;
PORTA.1=(data>>6)&0b00000001;
}


code for transmitteer

putchar(sync);
putchar(add);
putchar(data2);
putchar(add+data2);


whre do u suggest I put the header ..nd how could i make it work ..just a bit of explanation would help

That looks like PIC code to me ...


Anyway - I was just thinking aloud as I wrote that but the real answer is either different frequencies and command codes of some sort to identify senders/recievers.

If as in your case (from what I understand - I don't have full knowledge of your project obviously) - you can't change frequencies so that leaves some sort of code
as the next best solution. (Unless someone else knows a better way)

Again - thinking it through as I type... As you actual problem appears to be RF interference between 2 or more units on the same frequency broadcasting simultaneously I think I'd look into the possibility of temporarily silencing all but a master unit.

In abstract terms you need to make all units network "masters" for short periods of time.

In practical terms (I dont know how possible this is for your project) something like

1. Ping a codeword to the reciever - if it gets echoed back its safe for that unit to talk. If it isnt - put all data in a buffer and try again after a short timeout period.

ASSUME
You now have a means to make a simple communication but you havn't solved the real problem. However this tells you nothing else is transmitting right now if it does ping back.

So - without delay send a code to all other units that causes them to save any data - and put transmission on hold either:-

a) for a given period of time
b) until a "go ahead" code wakes one or more units up

On wake-up if a unit needs to send data - it must ping to get a response and become the "master" itself.

This all assumes that non-transmitting units are capable of recieving at all times of course.

Depending on your needs you may also want to implement "collision detection" and recovery of some sort.

There are still problems depending on how "fail-safe" you have to make it but that
should give you something to think about to get started.

jack

Yes it is a micro controller code but its AVR not PIC.

I am trying to control and race around 10 cars (model cars) using this transmission method of mine.

I thought of a new way where I send all the data through one TX module to all the RX modules. Would it work if i send 4bits address and 4 bit data in each byte i send. I will send the 10 bytes for the 10 cars 1 after another.

Is there any other DIY transmission methods I might use for this purpose. I need to control all the cars simultaneously.

Time division multiplexing is your only choice.
(fancy name for what I already suggested - implementation can vary but thats
effectively what we are doing. Your suggestion could work - its just another way to implement the solution)

This is effectively going to be "simultaneous" if the application
is toy racing cars. Whilst they have phenomenal acceleration I doubt they
could do much that is faster than sending 10 carefully structured RF commands in sequence. (How long would it take to send all 10?)

You could queue the commands if you like but to do that you still have to send from each unit - collect them centrally and then send them again. That seems self defeating to me - especially as collection still suffers the same problem.

Remember your problem is the RF interference not the addressing issue.

Do a little math and work out how long it would take to send commands - maybe build an excel worksheet and play with the timings.

Work out a command language you want to use - define it in bit/bytes.
Calculate a real-time command sequence time and then simulate what happens in worst case scenarios (All 10 sending at once continuously maybe)

Then work out how long a car takes to respond. (decode its address and activate the command and become free to accept another)

Once you work out the required time the worst case scenario would take to resolve (IE all 10 units continuous) and how long the cars take to respond to a "round robbin command sequence you can evaluate what actually consititutes "real time"
for the system.

You might find for example that in a worst case scenario it suddenly makes sense
to simply ignore some commands (how many times a second can you send a "go faster" command and at what resolution - does the worst case senario need to be totally fail safe and process every single command ... you may find not)

If you can't vary the frequency you have to time slice. Crunching the numbers is your next best problem to solve as that will help you decide the best implementation.

I can see a case for central collection then sequencing their sending despite the extar lag and work involved - but not I suspect for slow mechanical systems such as controling small cars. I doubt their response times warrant it.

If you did want to go that way you could introduce other methods to assist
the communication - perhaps use IR to signal the units "your turn to send now" period or something but that does start to get "messy" and probbably isn't as fast anyway.

I could be wrong - you probably know better than me about that but thats my
current estimation.

I didn't get that line.

I tried the simultaneous command sending approach. I tested it for 2 units and the response time is exactly the same or it cannot be noticed by the human eye. I will try it a bit later with more units.

It takes 3 lines of C code for 1 package which is sent to each of the cars for 1 command. The microcontroller is running at 8MHz and the Baud rate of the transmitter/receiver is 1200.

I will use a wire to send to to the Central micro controller which will send the commands through one transmitter to all the cars with the respective addressing done for each car. I think this will remove the radio interference problem since there will only be 1 transmitter ( i.e 1 carrier for all the cars with almost no noise of a similar strength).


Thank you for all the help so far. I would be very happy if you give some feedback on what I have done so far (i.e two units working simultaneously with no lag noticeable to the human eye. I video taped it but still found them responding at exactly the same time) and any suggestions to improve it further.

Thanks

Yes collecting all 10 commands and then sending them without delay in sequence will probably not give any noticable lag. I have no doubt it will work just fine.

My point here was -

To do it that way you still have to
1. switch 9 units off
2. switch unit01 on
3. send command to buffer
4. switch unit01 off
5. switch unit02 on
6. send command to buffer
7. switch unit02 off
8. switch unit 03 on ..... etc etc untill you have all 10 commands buffered

then...
A. silence all 10 units (or 9 if one is doubling function as the buffer)
B. activate buffer and send 10 commands.
C. silence the buffer

The point is - if you just send the commands from each unit directly
you dont need the buffer at all. Steps A B and C aren't needed.
(Unless I've missunderstood something about what you are doing?)

As I understood it - you have 10 independant RF units sending on the same frequency to 10 cars.

The cars are address selected but 2 or more units on the same frequency will
corrupt the signals

The desired outcome is for all 10 cars to get a clean-addressed signal

The problem is RF interference.

SO

10 hand units - RF signaling possibly simultaneously
10 cars each with unique address and RF reciever
1 RF frequency available for all 10 cars

If the above understanding is correct - inserting a buffer to collect the 2 or more
RF commands being sent simultaneously will just produce the same corrupt signal.

I'm not sure where the wire is needed or what it could do to help with RF interference? Are you now saying all 10 hand units are connect to one control unit by wire?

If so that would work fine but I thought you were doing 10 RF hand units.

jack

I get corrupt signals only when using more the one transmitter. Using just 1 central transmitter means that the receivers no longer receives any corrupt signals.

It wanted it to be totally wireless but with the problem I have I think I have no other choice then using only 1 transmitter which forces e to use wires.

....................
Fair enough

jack

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top