Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Seeking help -- 433MHz ASK/OOK dual-mode operation how-to ?

Status
Not open for further replies.

jayachar88

Member level 3
Joined
Feb 26, 2011
Messages
56
Helped
6
Reputation
12
Reaction score
6
Trophy points
1,288
Activity points
1,941
Hi,

There are at least 2 styles/modes of using the 433MHz ASK/OOK modules for short-range communication s.a. for remote-control / telemetry.

1) Use encoder/decoder IC's that encode some combination of "hardwired" (through jumpers) address + data bits (normally limited to 12-bits). For examples the HT12E/HT12D.

2) Use software based manchester-encoding (or other encoding) for transmitting short packets/frames of data, with a prefix (e.g. 10101010) and CRC/checksum as trailer.

Is there a way to do both of those, completely in software ? Is there any hope of being able to do this without DSO (or just any Scope), Frequency-counter, Logic-Analyzers etc., i.e. the bare-minimal hobbyist approach ? Looking for some guidance.

Here's what I've tried so far. Have wired up a RXD1 (433MHz ASK/OOK) module with my Arduino as mentioned in the VirtualWire protocol document, and reading the data-out of the module on a GPIO pin (conf'd in input mode). I've attempted doing this with various values of delay() in Arduino style. Note that I am not using the VirtualWire library, but directly reading off the GPIO pin.

Help/suggestions on how to proceed are welcome. BTW, will the DSO-Nano type of scope help in debugging such situations ? I guess it might be too slow and too insufficient for MHz range RF investigations, right ?

thanks,
Jay
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
48,186
Helped
14,200
Reputation
28,659
Reaction score
12,891
Trophy points
1,393
Location
Bochum, Germany
Activity points
279,169
Assuming, your RF module is known to work, the problem is only in designing the software correctly. You won't necessarily need an oscilloscope, but it's surely useful in watching the digital baseband signal at TX and RX side. Also an USB scope or a simple LA should do.
 

jayachar88

Member level 3
Joined
Feb 26, 2011
Messages
56
Helped
6
Reputation
12
Reaction score
6
Trophy points
1,288
Activity points
1,941
Thanks FvM. I had considered a USB scope, but the ones with positive reviews are still fairly expensive for hobby electronics (considering shipping + import duties etc.).

A fundamental doubt I have is, given a 433MHz carrier wave (or even a 918MHz carrier wave), do I really need a scope that is twice the carrier wave frequency for scope to be usable ? I mean that's what Nyquist–Shannon sampling theorem says. On the other hand, most of these module cannot do more than 9600bps. Does it work to buy a rather cheap Frequency Counter (have seem some starting from about $20-25, the DIY-kit kinds), to check the tx frequency (not quality), and a slow scope like DSO-nano ? Of course, this might be less than ideal, but an improvisation (I hope) given cost constraints. Or is that hopeless ?
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
48,186
Helped
14,200
Reputation
28,659
Reaction score
12,891
Trophy points
1,393
Location
Bochum, Germany
Activity points
279,169
Why do you want to measure the carrier with an oscilloscope? You would neither see the exact RF level nor measure the frequency with required accuracy. If if you are going to design the RF part of the circuit yourself, then there's a number of useful instruments like spectrum analyzer or vector network analyzer. An oscilloscope being capable of measuring the carrier frequency isn't a classical RF engineering tool. Of course if you have a sufficient fast instrument, you can use it for a quick check of some signals. But a simple level meter or a demodulater (diode) probe is usually good to check the transmitter operation.

I understood however, that you want to use a ready-made module, so the only RF problem involved with the design is antenna matching.
 

zuzu

Member level 3
Joined
Jul 10, 2007
Messages
54
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Activity points
1,817
Yes, you can do that entirely in software and quite well I'd say. I've done on Microchip both PIC18 and PIC24 @20Kbps, so on Atmel should be the same principle. But not Manchester since is hard to decode at high speed.
The best suitable peripheral in MCU is USART module. You must ensure your transmit procedure (INT not INT based, ring buffers, other INTs) will actually output the bytes with no gaps per packet (or no more than 1-2 bitcell), the just emulate your own "DC-free" by mapping one "to be sent" byte in two lookup bytes. This will overhead with 50% but the Manchester will do exactly the same :) This is the most simple and efficient method, and on Rx side you only should ignore FERR and OERR (USART flags) since noise coming from RF will trigger your USART Rx INT all the time. While receiving noise, just do a simple FSM watching 4 bytes as "packet start" then one byte as packet length, grab indicated length as payload and finally 2 more bytes as CRC-16.

You can even minimize overhead under 50%, by using block encoding (say 16 bytes in 24, "almost" DC-free). In reality there is no need of absolute DC-free because your receiver AGC and data-slicer. But 1 byte -> 2 bytes is just KISS method :)

Hope I was clear enough, my english is poor :)

PS. Without tools DSO, freq, SA it's hard but not impossible.

First make sure your RF link is working statically: ie. 1 logic on transmitter data to be reflected on receiver side. Watch out, you may be required to shut off AFC and or AGC at Rx side, depending on radio modules.

Once rf link is established, you should be able to see direct USART from two devices. Just connect 2 PC's with hyperterminal on low speeds, say 1200...4800 and characters should appears on screen. Watch out, hyperterminal and windows serial driver may goes crazy when link is down and RF noise is feed into com port :)
 
Last edited:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top