basic Help needed with PICAXE and HopeRF

avner

Senior Member
Hello,

i just got one transmitter RFM02 and one receiver RFM01 from HopeRF.

they have more pins than 'dumb' RF modules (which have +v, GND, DATA),
but as a beginning i'd like to interface them at the minimal possible.

i mean, just send and receive, no feedback if sent, no sleep mode, no config of band/rate etc....

could you please give me a hint for the program on PICAXE ?
i'm currently not using X2 which enable SPI,
so let's say im using a 08M for this demo purpose.

so i kinda know the loop used to send 8 bit SPI data and CLK,
but what do i need to send ? what byte should i send so it start transmitting etc.. ?

thanks a lot for your help,
i'm really new to it and i read a lot, but i get quite confused...
 

manuka

Senior Member
I've not used that HopeRF pair, but certainly feel they may be a tad over the top for someone new to the wireless field. If PICAXE driven their high data rates will be wasted as well. How about parking them for a while & grabbing some cheapies for an entre?
 

avner

Senior Member
im not too in advance on my project and getting other RF module would take time.....

the question is:
is sending the bits by SPI (clk, dta) from the picaxe to module enough to get the module transmit ?

or does it REQUIRE more complex program to work (feedbacks, etc...) ?
 

manuka

Senior Member
It may take MUCH longer to tame them! I can NOT say anything much about their setup unless I've used them.

Where are you ? Just what is your project ? Which PICAXE ? What ranges are needed? Simplex or half duplex ? Budget ? Skills? Resources? Time frame?
 

hippy

Ex-Staff (retired)
The RFM02 refers to "RF02 commands" which seems to be here -

http://www.hoperf.com/upfile/RF02_code.pdf

Unfortunately my current PDF reader won't display that file so I have no idea what it contains.

Unless someone here has already used the modules you've chosen you are largely on your own, will have to work out what to send and receiver from reading the datasheets, finding example code from the manufacturer or on Google and other search engines.

While people can and will help along the way, it's not likely they'll do the work for you if they have no interest in the modules themselves. I'm not sure they are the best choice for someone who has limited experience of hardware interfacing and control.

If you've got the modules, you could simply try using them without any SPI configuration and see what happens.
 

Dippy

Moderator
I agree with Stan (again!) re: complexity vs ability.

- Assuming I've looked at the right Data Sheet RF02 IC -
I'm doing a design with a similar module (but much more flexible) and the code is complicated. (Sorry, not PICAXE BASIC).
This RF02 looks a lot simpler, but I suspect that unless you get a PICAXE with more space and/or SPI then you may run into trouble - especially if you are a novice.
If you wish to proceed I would suggest using a larger PICAXE or dedicate a PICAXE solely to the Rx/Tx.

So many of these modules look easy and have an attractive price tag.
Then, post purchase, the difficulties are discovered. Usually, and without huge amounts of help, this results in it being put in a drawer.
You will probably be better off buying a done-for-you ready-made module.
Unless, out of generosity, Stan and Hippy do the coding for you...? :)
 

avner

Senior Member
actually it is some sort of remote,
i need to send some possible commands from a wireless remote PICAXE
to a receiving picaxe at the machine end.
the receiving picaxe will determine the machine work mode (lets call it 1-9)

requirements - quite fast communication -
the signal has to be output in ~few ms.
starting to count at the sending picaxe button pressed and stop counting at the receiving picaxe output to the machine

what picaxe ? currently i dont have X2 parts.
but my skills can now control a SPI slave device (SCK,SDA) from a 08M

thanks !
 

Dippy

Moderator
If it's just a push-button shortish-range remote then any half-decent module can handle that. You can calculate time and speed. Of course, there is th processng ovehead too.

I only had a quick look. The Tx looks simple enough, but the Rx section is nothing like wht I've done before. (It's probably staring me in the face!).

Setting up and changing configs will take some code space.

Why did you select this RF module? Size? Price?
Go for a simpler module. It'll save time and grey hairs.
 

avner

Senior Member
actually i need a high accuracy system.

i thought using such RX\TX would allow me accurate authentication of the data.

i need the receiver picaxe NEVER to receive flase triggering
i need the receiver picaxe ALWAYS to receive the transmitted data.

i thought i could verify signals more easily with the bits and bytes of the SPI interface.


would a simple TX\RX allow me to serin and serout directly from DATA pin to the picaxe ?
 

hippy

Ex-Staff (retired)
i need the receiver picaxe NEVER to receive flase triggering
i need the receiver picaxe ALWAYS to receive the transmitted data.
You are seeking two impossible Holy Grails. You can minimise false triggering to an acceptable level but it's almost certainly impossible to guarantee reception except by stating within what constraints. If someone sticks a spark-gap transmitter nearby you may never receive anything.

Even a wired system could never likely guarantee what you seek.

would a simple TX\RX allow me to serin and serout directly from DATA pin to the picaxe ?
Yes. But whether that is suitable for what you want is a different matter.

You haven't really explained what the application is, given the 'big picture overview'; do that and it may be possible to offer better advice.
 

avner

Senior Member
OK,

i have a flash unit (xenon, strobe) controlled by a picaxe (capacitor charge control)
i'd like a remote, with a potentiometer lets say that will send to the flash picaxe what value should the capacitor be charged to.
if i can serout a single 'b' variable it would be great (0-255).

additionally the remote should trigger the flash.
so i need it to be fast enough to trigger the flash according to the camera's command to do so, that the flash won't miss short exposure times.
 

Dippy

Moderator
Other people here have done remote flash modules and how they dealt with the 'system' delay. Do a search.

Do a calculation to work out the delay from sending to receiving/processing.

Any error checking etc. will add significant delays - there is no magic.
 

hippy

Ex-Staff (retired)
Throughput and latency could be a problem, perhaps not.

At 1200 baud it takes over 8ms for a single byte to be transfered. The usual RF trick with simple tramsitter / receiver pairs is to send a number of "U" charcters, pause, send a qualifier and then the data. That may add up to 10 or more bytes, which would take 84ms.

That can be reduced by using faster baud rates and also by keeping the link alive, sending "U" characters when there's nothing else to send.

It should be possible to synchronise camera triggering with flash triggering and certainly when both are initiated from a trigger which controls both, and it should be possible to synchronise whatever's being photographed so that its trigger to initiation gives the shot required.

A wired solution would be much simpler all round and I'd suggest getting that to work before doing the same wirelessly.
 

hippy

Ex-Staff (retired)
One solution here may be to continuously transmit a '1200 baud' square wave via PWM continuously fed to the transmitter and gate that with a signal which goes off when the shot is taken, or simply turn PWM off. Suitable RC on the receiver will keep the incoming signal at zero while the square wave is present and will rise to high soon after the PWM is cut off. Faster the baud rate the sooner the receiver should notice.
 

Dippy

Moderator
Surely, any break caused by 'whatever' will result in a false trigger.
And I hope he doesn't transmit close to me with a continuous RF carrier. 433/4 will upset my digital TV box if potent enough :)
Not sure what part of the world Avner comes from but check legal restrictions too re: Fq/Pwr/Bw/Duty.
So not sure if that's a real goer.

Would completely agree about getting a wired version working first.
 

hippy

Ex-Staff (retired)
True, any glitch could be a false trigger. Any error checking adds delay so it's swings and roundabouts, horses for courses. It may be that wireless is a poor choice for this application.

Continuous transmission would only need to be from getting ready to take the shot to having taken it.
 

avner

Senior Member
I think i'll go with a pair of HM-TR which has advanced technology but still allow very simple interfacing like i've read.

someone knows where can i get them for cheap ?
at FUTURLEC which is the only place i saw them, they're at 19$ each
 

manuka

Senior Member
Avner: I assume you are the same Israel based professional photographer who has just emailed me on this.

There surely must be numerous off the shelf flash units capable of such effects? Even 30 years back (thus pre digital & when false triggers meant wasted film) I recall such units,although I don't remember if delays were adjustable. You REALLY need to tell us more on your actual needs/budget/time/skills ! Stan.
 

Attachments

Last edited:

avner

Senior Member
Thanks Stan !

there are such units,
but cheap chinese ones are kinda short range and not powerful,
and pro ones are starting at 400$ for each.

plus, i already have a picaxe based studio flash array,
so it can be just add-on to add RF control !
 
Top