Pages: [1]   Go Down
Author Topic: 433MHz Remote controll  (Read 895 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 90
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I'd like to make a remote control with an atmega328 and a 433MHz transmitter, which will be recieved by another atmega328 and a 433MHz Reciever.

I understand how I can send high or low signals with it, but how can I get it to understand different signals? Or transmit something like the value of a potmeter?
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 310
Posts: 26632
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you keep the bit rate down below about 2400 bits per second, you can use serial read and write.
Expect some noise.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 27425
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Use simple parts like these with the VirtualWilre library.
Use the analogRead to read the pot value, send the data over as 2 bytes.

http://www.robotshop.com/433mhz-high-sensitivity-transmitter-receiver-pair-rxa30.html
http://www.open.com.au/mikem/arduino/VirtualWire.pdf

Sending:
 
Code:
  potValue = analogRead (A0);
    msg[1]=highByte (potValue);            // split the readug into 2 bytes
    msg[2] = lowBYte (potValue);

    vw_send((uint8_t *)msg, strlen(msg));     // send the msg[array] out

    vw_wait_tx();                             // Wait until the whole message is gone

After receiving, put the 2 bytes back together into an int:

potValueRx = (upperbyteRx<<8) + lowerbyteRx;

Moderator edit: [code] [/code] tags added
« Last Edit: April 24, 2012, 01:38:10 am by AWOL » Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Jr. Member
**
Karma: 0
Posts: 90
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I only need like 16 buttons or so, implementing a whole library seems a bit overkill..
I was thinking about sending PWM signals through the transmitter, and having the reciever calculating an average, which will indicate which button it is.

Does that sound possible?
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 310
Posts: 26632
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
implementing a whole library s
The library is already implemented, all you have to do is use it.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Jr. Member
**
Karma: 0
Posts: 90
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, using in that case. I'd just like to stick with my own code.

Quote
I was thinking about sending PWM signals through the transmitter, and having the reciever calculating an average, which will indicate which button it is.
Is that possible?
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 310
Posts: 26632
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Buttons, maybe, but not if you want an accurate representation of the analogue inputs, no.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

0
Offline Offline
Shannon Member
****
Karma: 222
Posts: 12725
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I only need like 16 buttons or so, implementing a whole library seems a bit overkill..
I was thinking about sending PWM signals through the transmitter, and having the reciever calculating an average, which will indicate which button it is.

Does that sound possible?

pulse widths will be affected by the modulation and demodulation used in the RF link - expect some distortion.  You could use a frequency proportional to your signal (so long as it doesn't exceed the limit of the TX RX pair.

The advantage of using serial is that you can packetize your transmission and save on TX power when not sending data.  You will need at the very least a packet-start sequence and a checksum byte or two.
Logged

[ I won't respond to messages, use the forum please ]

Pages: [1]   Go Up
Jump to: