Using RF 315Mhz PT2262/PT2272 with Virtual Wire

Hello everyone, this is the first time I join the forum.Therefore, please forgive me for some of my questions is naive or stupid.All right! This is my problem, I wanna build RF Transmitter using arduino that receive data from my laptop through serial then send it to the Receiver to control a robot.

I have coded a small Python script.When I run it, I could use W,A,S,D on keyboard to navigate the robot.

I have planned using the RF 433Mhz modules with Virtual Wire lib but the electronics store does not sell those instead they only sell RF 315Mhz Transmitter/Receiver set using PT2262/PT2272 chips. Therefore, I bought one. :confused:

I have read a lot of articles but none of them use this set. Someone uses RCSwitch library to program with a transmiting module with VCC/GND/DATA pins and their explanation make me confused.Please help me choose the Lib and show me how to program with these modules ! I need to program 2 board one for transmitting and one for receiving. :frowning:

Thank you very much!l

Please help me choose the Lib

The VirtualWire (obsolete) doesn't care what frequency the radios are. The RadioHead (replacement) library doesn't care, either.

Virtual Wire send a byte type pointer so that it send an array of char while four OUTPUT pins of PT2272 module only give discrete values like LOW, HIGH. This is where I am stuck in. Look again to the image of the modules. :confused:

You can't program those modules, they are self contained.

One transmits switch closures (HIGH or LOW on the data pins), the other receives the data. They are used in pushbutton keyfobs like this one.

So pins 10~13 of PT2262 transmitting module correspond to A~D buttons.If I want something like pressing button A, I call digitalWrite(the Arduino pin connect to PT2262 module pin 10 , HIGH). Is that correct/

PT2262 data sheet

Do you have the TX module data sheet?

Here is the image of them.They are actuallly PT2262 Tx and SC2272 Rx. Forgive for my mistake!

What image?

If I want something like pressing button A, I call digitalWrite(the Arduino pin connect to PT2262 module pin 10 , HIGH). Is that correct

Who knows? Try it. A data sheet or user manual for that module should tell you.

I did ! It look like Rx OUTPUT pins do not give any signal! :frowning: i just upoad image to drive! Check it! :slight_smile:

Did you power the modules, and connect ALL the grounds? Post wiring diagrams (hand drawn, not Fritzing Idiot diagrams).

For further help, please read and carefully follow the directions in the "How to use this forum" post.

OK I will take a picture! Why not Fritzing?

You could probably hack them to work. :slight_smile:

This is my sketch? It is right if I call digitalWrite(arduino pins connect to 10~13 pins of the TX, HIGH) then the LEDs with light up?

What happens when you try?

Nothing! However, I havent attached the antena to the Rx module. Is it matter?

Nothing! However, I havent attached the antena to the Rx module. Is it matter?

Yes it matters. A radio has to be connected to an antenna.

You can't use those kind of receivers/transmitters with virtualwire.

They already have dedicated chips performing the role of virtualwire.

If you want to use virtualwire, you need to use the transmitter/receiver boards that do not have the PT2xxx chips on them.

If you want to use the PT2xxx boards, you do not use virtualwire, and instead have to simulate buttons on the transmitter, and listen to the pins turning on and off on the receiver. You need to pulse the simulated buttons (as someone presses and releases them, rather than holding them down continually - I think they transmit constantly as long as the "button" is "held down")

I do not know if virtualwire/radiohead/other library exists that will output or receive PT2xxx compatible signals on a transmitter/receiver that doesn't have the PT2xxx chip on it - if there is, that might give you some more freedom.

Re: antenna - those receivers will usually work without an added antenna if the transmitter is very close. However, that receiver looks like a typical crapola superregenerative design, like the really cheap green ones - they're marginal in the best of circumstances. A nice superhet OOK receiver will work at short range w/out an added antenna. It markedly degrades range compared to using an antenna, ofc...

if i attach the antena to the Rx, will my model works?

sketch_oct12a.ino (328 Bytes)

All that can be said at this time is that it doesn't work without the antenna.