APC220 modules working as emitter/receiver alternately

Hello there! I was wondering if someone can help me with this. I have a project using two APC220 modules: one is connected to a Arduino MEGA and the other to my PC. On the Arduino side I have some sensors that gather some variables and send it to PC side. This part is working fine! Now I want to send orders from PC to shut down the sensors on the Arduino side. So I will have a situation where my APC220 modules will be receiving and transmitting at the same time. Is this possible and can be done by simply connecting Vin+GND+RX+TX on both sides? Or I have to get some kind of synchronism to make shure I enable the modules to work as emitter/receiver in each case? Any ideas? Thanks a lot! Best

So I will have a situation where my APC220 modules will be receiving and transmitting at the same time.

No, you won't. You can send or you can receive, at any given time. You can't listen while talking. You can't talk while listening.

You can listen. If nothing is being heard, you can talk. But, of course, the modules know that, and take care of doing that.

Or I have to get some kind of synchronism to make shure I enable the modules to work as emitter/receiver in each case?

They are enabled as transceivers by default.

Thank you PaulS! My problem is to know if the modules do that management. In other words if I give an order on PC side (send a character) and the module is receiving data (please note that data is being received on PC each 250ms), do he waits until stop receiving and sends the character? Or the character is only sent if for luck the order occurs in a time instant when nothing is being received? Thank you.

You can arrange the timing from the PC. Send interrogation command and only send data to PC when requested. This way you know the remote will only send data when the PC is expecting it and you know the remote will be able to Rx the PCs command.

If your remote is sending every 250mS, then you also know that sending PC commands immediately after receiving data will not interfere with the remote sending.

Weedpharma

weedpharma: You can arrange the timing from the PC. Send interrogation command and only send data to PC when requested. This way you know the remote will only send data when the PC is expecting it and you know the remote will be able to Rx the PCs command. If your remote is sending every 250mS, then you also know that sending PC commands immediately after receiving data will not interfere with the remote sending. Weedpharma

Yep, that's how I do it too. Effectively use one end as the 'master' and the other as 'slave'. The 'slave' only sends data when requested by the 'master'. It's also good if the receiving end sends some sort of 'acknowledge' code. If an 'acknowledge' isn't received, the sender resends the information.

I have three APC220s on the computer, linked to three different PIC and Arduino-based systems and operating at three slightly different frequencies, and it all goes without a hitch. (The PC is 'master'.)

OldSteve, what sort of layout, distance and usage are they in? I want to use the same devices (1Tx, 1Rx) over about 400m with some trees in between.

Weedpharma

weedpharma: OldSteve, what sort of layout, distance and usage are they in? I want to use the same devices (1Tx, 1Rx) over about 400m with some trees in between. Weedpharma

That's a long way. I've seen these modules do 1km line-of-sight, (documented in a 'Silicon Chip' magazine some years ago), but 400m with obstacles might be pushing it.

One of mine does two-way comms over about 10 metres through two walls. It synchronises my bedside alarm clock with PC time, and an RTC keeps time when the PC is off. This one uses the 'master/slave' method with 'acknowledge'.

The next one does one-way communications from my workshop to the PC in the house. It only covers a short distance too, about 25 metres. It goes through two brick walls and a steel roll-a-door without problems. It's for my workshop alarm system.

The third is for general purpose use, for communicating with various circuits that I play with, like my Mattel Mindflex headset hack. It usually only has to cover up to 10 metres.

You'll need to do some testing to see what sort of range you can get. The longest I've personally ever needed was about 50 metres.

Edit: I'm not sure about AppCon, (APC series), but Dorji and some other manufacturers sell similar modules with higher power. You might need one of those to get the range that you want.

Oh, and all of mine use 'rubber ducky' antennas about 1 1/2" long.

Thanks a lot to everyone.

Best