HopeRF modules Serial radio 40X2 to 40X2 remote control assistance required

D n T

Senior Member
I having some trouble getting my 40X2 chips to talk to each other.

I have 2 joysticks and a latching switch on the transmitter chip as well as the transmitter enable and the serial out to the transmitter module (see the attached PDF).

I have a saber-tooth 2 x 32 Amp Dual H bridge as well as the receiver enable and serial in from the receiver to the chip (see the attached PDF)

I had the link working perfectly form one 20M2 to another 20M2 chip, including the same radio modules.

The 40X2 reads the joystick and debugs properly. The 40X2 receiver is hung up on the serial in. I tried a simple serial in receiver code without all the saber-tooth ramblings but no go.

I need to use the 40X2 for future expansion of the project so need some assistance. I have resisted the temptation of throw things against walls or bang my head on the same so far.

View attachment 40X2 ROVER TRANSMITTER AND RECIEVER 1.5.bas

View attachment help.pdf


Senior Member
When using wireless comms, the receiver will continuously receive noise, broken up with data. This means that the serin command will never time out.

Initially, bypass the transmitter/receiver and have the data go directly between the chips. That way, you can get the basic comms debugged without the additional headache of radio. If using a 40X2 (or any X2 for that matter), I would not consider using SerIn when background hSerial is available: that way, you never get "stuck" in the SerIn command. Of course, this will require different code from a 20M2.

Also, when the time comes (as JimPerry alludes), the heavy currents around the H-Bridge will have to be carefully steered away from the microcontroller to keep it stable. I used optoisolators (and decoupling capacitors, of course) to separate the control legs between the two power circuits in a similar situation.

D n T

Senior Member
My apologies for no caps, I left them off my drawing but not off my actual circuit, they are everywhere, power rails, across the power and 0 volt legs of the chip, like pimples on a teenager.
I understand that running the h bridge to picaxe wiring through ferrite cores might also help.
It is my understanding that the sabertooth has a fair bit of suppression gear built in but I will certainly make sure I have decoupling caps for my circuit, thank you JimPerry.
Optoisolatiors sound like a wise measure, they will be making there way onto my board as you read this, I have some sfh601 in a draw.
Is there any other "preconditioning commands' I need to set up the serial comms, can I serin on any pin, or only inputs?
Do they have to be configured as inputs?
These are all questions I would ask my teacher if i wasn't it.
I've since built a test circuit with wired serial and it is functioning correctly, so I'm going to add wireless and stand back.
I'll also start playing with hserin and hserout on my bench

Thank you for your assistance.