Dr, Acula advice please!

BrendanP

Senior Member
Hi Dr.

I've got a 433mg RX module hooked up to a 40X1. Im using the serin time out com. Problem is the serin timeout never times out because the 40X1 sees all the noise on the serin line comming out of the rx unit as a signal i.e. valid incooming data.

I've tried a 47UF electro cap, that smooths out the singal enough to let the time out work properly, problem is though it so smooths out the signal that it wont respond to valid incomming data txd by the tx 433mg unit. Any suggestions on how to get around this?

 
 

hippy

Ex-Staff (retired)
You could use another PICAXE as a front-end to pre-assess data and only pass on that which is legitimate, or you could use a PICAXE in a 'squeltch' mode, only letting meaningful data through to the master. A PICAXE with an I/O as Output Low can silence a signal and as Input let it through ...
Code:
   \|/                           47K
    |   .-----------.            ___              .-------------.
    `-->| 433MHz RX |---.-------|___|--------.--->| PICAXE-40X1 |
        `-----------'   |                    |    `-------------'
                        |   .------------.   |
                        `-->| PICAXE-08M |---'
                            `------------'
Even if you could find some means of filtering out the noise, you'd still have a problem with any legitimate 433MHz data jamming your 40X1. A front-end or squeltch PICAXE could help minimise that.
 
Last edited:

moxhamj

New Member
There can be all sorts of noise on a radio channel - either data or voice. If the signal is music or voice it will be an AC waveform which will go below the picaxe Low threshold and above the High threshold and the picaxe will think it is some data and will try to extract bytes from the signal.

The best way to use serin is to have a header as per the manual eg serin 1, N2400,("ABC"),b1,b2 etc

Ok, this hangs until it gets the data but if there is no data there then perhaps the comms protocol needs to change eg send data on a regular basis.

I'd use something like hippy's circuit - ie a dedicated 08 that just hangs till the data arrives, and then sends the data through to the new 40x that has a timeout, or one that holds the pin low till valid data has arrived.

Or for the older chips that don't have a serin timout, an 08 receiving the data, and then this chip puts a pin high to tell another 08 than it has some data.

Don't put any type of filtering such as a cap on the Rx output.
 

BrendanP

Senior Member
Hmmmm, Ive been looking forward to the 40X1 with the serin timeout, I actually redesigned the pcb to remove the 0M8 I had to monitor the serin from the RX module. Looks like I'll have to put it back in!

Hippy, so the RX dedicated PICAXE, a 0M8 no doubt, will serin from the the TX unit and then when it sees valid data comming in serouts that out to the 40X1. I don't undertand what the R is doing in paralell with the picaxe on the serial line. Sorry if Im being dense.




Im aware of the header/handshake info needed ie.
serin[500,cont],1,N600_4,("2006"),b1

Thanks for the advice guys.

BTW be aware of the N600_4 when using the X1 parts. You've got to have the _4 or _8 after the baud speed on the serout instruction from the TX picaxe side of things otherwise it dosent work properly. You guys probably already know that but it took me a couple of hours of head scrathing!

 

Edited by - BrendanP on 03/06/2007 13:31:20

Edited by - BrendanP on 03/06/2007 13:42:17
 

hippy

Ex-Staff (retired)
The 47K is there so that when the 08M output is low it effectively puts 47K across the 08M input pins so the 08M can still read the RX, but the input of the 40X1 is pulled to 0V so it doesn't receive any data. When the 08M output is actually an Input, it places no load on the 40X1 input so the signal can go from RX into the 40X1. The actual value was a guess, it may need to be lower in practice.

The 08M could do SERIN to look for a prefix which comes in before real data, or it could be polling the line to see if what's being received is just noise, random length pulses etc or something which looks like serial data.
 

BrendanP

Senior Member
Hippy you're a genius! Your fix worked first time! used a 39K R because thats what I had to hand. A massive thank you! The CRO shoes the line from the RX module to the 40X1 is dead flat until the pin become a input. 

Edited by - BrendanP on 04/06/2007 14:16:53
 

hippy

Ex-Staff (retired)
Glad it's working but I cannot take credit for the concept. I'm not sure who gets that, but it's very likely one or more people on this forum, who, if they didn't suggest the trick directly, inspired that rather clever solution.

It's been very useful for me and probably the <i>Number One Trick </i> in my book.

If using a PICAXE which doesn't allow I/O to be switched from output to input, using high and low with a diode, pointy-end to that PICAXE, can also work well.
 
Top