Simple serial transceiver – Aurel RTX-MID


 

I’ve been looking for a simple and cheap wireless serial data solution for quite a while now…

No specific usage, but things like every time you integrate your Arduino into a project and then 2 days later you want to update the code and you have to dismount everything, or simply remote control a project or more generally just getting tired of “all the wires”…

There are of course plenty of solutions out there, but I wanted something cheap and simple to use !

The WiFly solution that I’ve already used here, is “ok” simplicity wise but far too expensive !

Then you have RF link devices like this one, which are really cheap indeed … but as simple as they might be to install, they get a fair amount of noise so you get added complexity in the code to filter out some of that noise and do some error checks…

Anyhow, I’m sure I could go on forever like this, again one of the reasons I haven’t gotten anything until now, it’s that I couldn’t decide what to go with !

Finally, I got 2 of these TRX-MID Aurel boards from Farnell  (quite reliable guys, I use them whenever I can, it’s a shame they seem to be more oriented towards professionals than hobbyists…) :

  • they are 2-3 times more expensive than the really basic ones (12£ here in the UK, probably ~ 15$ in the US)
  • they are transceivers, which means you can have bi-directional communication
  • they seem to be slightly higher specs, so I hope for less noise / more reliable communication

Aurel TRX-MID-3V Close Up

Before I insert them into any project, I need to do some testing / benchmarking to get a feeling for how good / bad they really are.

The simplest setup would have been to connect both of them to the PC through 2 USB to serial adapters, BUT given that I have only 1 3.3Volts cable, I had to use something else…

The next “simplest” solution was for me to use the IOIO board, connected to an Android phone. I know, it doesn’t sound very simple, but it’s a 3V3 board and it’s really quick to write a few lines of Java to make it send some serial data periodically:

Aurel TRX-MID-3V Test Configuration Schema

  • TX
  • the Android phone and the IOIO are there simply to periodically send some serial data
  • GND and VCC come directly from the IOIO board
  • pin 6 / Enable is connected to VCC through a 10k resitor
  • pin 5 / TX/RX is connected to VCC, telling the transceiver that it’s in TX mode
  • pin 4 / Input Data is connected to pin 5 of the IOIO
  • RX
  • the FTDI USB – Serial cable connecting the transceiver directly to the PC, on which I used Tera Term
  • GND and VCC come directly from the FTDI cable
  • pin 6 / Enable is connected to VCC through a 10k resistor
  • pin 5 / TX/RX is not connected, telling the transceiver it’s in RX mode (same as if I had connected it to GND, I think it has an internal pull down resistor connected to it)
  • pin 9 / Data Out is connected to the RX pin of the cable

Aurel TRX-MID-3V

Aurel TRX-MID-3V Test Setup Overview

 

All in all, it’s a fairly simple connectivity, it literally took me 10minutes to set all this up, and then it worked from the 1st try !

 

Now it’s time for a quick test, which consisted of simply seeing the “Hello World” sent by the IOIO board display in the serial terminal on the PC, and then take the board in another room (~5meters and 2 walls apart).

 

Everything worked well (at 9600bps), but when I took the transmitter to the other room, I would get some spurious characters at the end of each transmission. I haven’t fully investigated this, but it seems that without an external antenna, the range is really 5-10 meters, no more. One can obviously add some error checking in the software or lower the bps to extend that.

 

  • I like
  • the fact that you can start into RX / TX mode by simply pulling a pin down / up (as oposed to the user manual where they describe a fairly complicated sequence (“From powerdown mode (pin 4-5-6 low), drive high pin 6 (ENABLE), then after 20us drive high pin 5 (RX/TX) 200us, hold on 40us and then drive down 20us pin 6 (ENABLE).“) which I’m sure it’s necessary in some more complex use cases
  • don’t have to set the speed
  • I dislike
  • you need an extra wire to set TX/RX, it’s not full duplex (can’t send / receive at the same time) – that’s really not problem for connecting remote sensors for example, but it makes it virtually impossible to use these boards to make an Arduino fully wireless
  • limited at 9600bps, again ok for some sensors, not really enough to replace wires (most of the applications expect at tleast 115200bps)
  • the range – this can be mediated by adding an antenna, but that makes things more complex
All in all, it’s a nice and easy to use product, better than the basic ones as it can do both TX and RX (though not simultaneously), but it’s uses seem limited to sensors feedback type of use cases, definitely not making your micro-controller fully wireless by replacing the wired connection and debugging remotely.
As usual, do let me know if you enjoyed the post and if you have any feedback.
P.S. here’s for the sake of completeness (it really doesn’t matter who and how was sending the serial data) the code used for the Android/IOIO:
package org.trandi.helloioio;

import ioio.lib.api.DigitalOutput;
import ioio.lib.api.Uart;
import ioio.lib.api.exception.ConnectionLostException;
import ioio.lib.util.AbstractIOIOActivity;

import java.io.OutputStream;
import java.lang.Thread.UncaughtExceptionHandler;

import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;

public class MainActivity extends AbstractIOIOActivity {
	private static final String LOG_TAG = "APT";
	private static final int RX_PIN = 4;
	private static final int TX_PIN = 5;
	private static final int UART_SPEED = 9600;

	private MyIOIOThread _IOIOthread;

	private TextView _msg;

	/**
	 * Called when the activity is first created. Here we normally initialise our GUI.
	 */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		Thread.setDefaultUncaughtExceptionHandler(new UncaughtExceptionHandler() {
			@Override
			public void uncaughtException(Thread thread, Throwable ex) {
				Log.e(LOG_TAG, "", ex);
			}
		});

		setContentView(R.layout.main);
		_msg = (TextView) findViewById(R.id.textViewMsg);
	}

	/**
	 * This is the thread on which all the IOIO activity happens. It will be run
	 * every time the application is resumed and aborted when it is paused. The
	 * method setup() will be called right after a connection with the IOIO has
	 * been established (which might happen several times!). Then, loop() will
	 * be called repetitively until the IOIO gets disconnected.
	 */
	class MyIOIOThread extends AbstractIOIOActivity.IOIOThread {
		private DigitalOutput _onboardLED; // The on-board LED
		private Uart _uart;
		private OutputStream _dataOS;
		private long _count = 0;

		/**
		 * Called every time a connection with IOIO has been established.
		 * Typically used to open pins.
		 *
		 * @throws ConnectionLostException When IOIO connection is lost.
		 */
		@Override
		protected void setup() throws ConnectionLostException {
			msg("IOIO Connected !", null);

			try {
				_onboardLED  = ioio_.openDigitalOutput(0, true);

				// initialize the UART
				if(_uart != null) _uart.close();
				_uart = ioio_.openUart(RX_PIN, TX_PIN, UART_SPEED, Uart.Parity.NONE, Uart.StopBits.ONE);
				_dataOS = _uart.getOutputStream();
				msg("Connected to UART", null);
			} catch (Throwable e) {
				msg("Can't connect to the UART (" + RX_PIN + ", " + TX_PIN + ", " + UART_SPEED + ")", e);
			}
		}

		/**
		 * Called repetitively while the IOIO is connected.
		 *
		 * @throws ConnectionLostException When IOIO connection is lost.
		 */
		@Override
		protected void loop() throws ConnectionLostException {
			try {
				onboardLED(true);
				final String msg = "HelloWorld  " + _count++ + "\n";
				runOnUiThread(new Runnable(){
					@Override
					public void run() {
						_msg.setText(msg);
					}
				});
				_dataOS.write(msg.getBytes());
				onboardLED(false);
				Thread.sleep(1000);
			} catch (Exception e) {
				msg("Can't write serial data", e);
			}
		}

		private void onboardLED(boolean on) throws ConnectionLostException{
			_onboardLED.write(!on);
		}

	} // end IOIOThread

	private void msg(final String msg, final Throwable e){
		runOnUiThread(new Runnable() {
			@Override
			public void run() {
				_msg.setText(msg + (e != null ? " - " + e.getMessage() : ""));
			}
		});
	}

	/**
	 * A method to create our IOIO thread.
	 */
	@Override
	protected AbstractIOIOActivity.IOIOThread createIOIOThread() {
		_IOIOthread = new MyIOIOThread();
		return _IOIOthread;
	}
}

12 Responses to Simple serial transceiver – Aurel RTX-MID

  1. Pingback: RC Car Electronics | Robotics / Electronics / Physical Computing

  2. Max says:

    I understand that these are old message long ago ….. now it has made great strides Technology ….. Ever tried ESP8266 ??? It costs about $ 3 and can send and receive wireless full duplex and anche ….. and can Marshalling sue ​​outputs via the Internet by the world Any Where there COVER WiFi ( search on Google ESP8266 ) . However, even with RF modules you can do impossible things for WiFi , as send messages to kilometers away via Air and without any internet connection … we just want a good antenna … look at this too … https://www.youtube.com/watch?v=7BYdZ_24yg0

    Max

    • Trandi says:

      Thanks Max I knew about the ESP modules , but as you said this is a pretty old post…:)
      No chance I would bother with these for a new project….

  3. Max says:

    Hi, I have 2 RTX-MID-5V in the drawer closed for some time, perhaps ready for trial use Arduino or other. I have in the past been dealing with RF module, especially those Aurel and advice I can give you to increase the flow rate is put on pin 1 a piece of copper wire 0.8-1mm diameter along 17-18 cm (the wire must have a correct length given for 433 MHz … see google …) this is in the form of transmission and receipt and you’ll see that the capacity will increase by much. Indeed these modules, as you can see they have the printed antenna on PCB and if you don’t put an external antenna might also fail. If you want to bring long you keep RTX-MID-3V as receiving and use the transmitter model Aurel TXBOOST-433, this module has data input to 5v, but is powered at 12v and unleash a transmit power of 400mw (around 400-500 meters), but if you power for short periods to 18v you have 800mw trasmission ranging from 1 km to 1.5 Km. Only thing is that you can’t use a baud rate of 9600, but maximum 4 kHz modulation, so you can use it with COM terminal to 1200-2400 bps.
    Sorry for my poor English language, but it is not my original language. Ciao from Italy, I hope this help …

    Max

    • trandi says:

      Hi Max,
      Wow… ! That’s some very precise and useful info, thanks a ton !
      I haven’t played with those for a while, but I’ll keep this advice in mind the next time I put them in a new project…

      Dan

  4. Triselectif says:

    That’s super nice
    But would you have an idea how to connect several emitters (simple on/off switches) to one receiver connected to the pc in usb so that the pc is able to identify emitters with an id ?

    • trandi says:

      Salut,

      Sorry for the late reply.
      I don’t think this is possible as this are quite simple devices that area paired with each other.
      You might be better of using the cheap Bluetooth boards, similar to what I’ve used for my SPOKA project, where not only you can have plenty of them, but they can connect directly to the PC which is admittedly much nicer than having to connect an extra board.

      Hope this helps,
      Dan

  5. slasi says:

    For a little more, I’ve used these: http://www.pololu.com/catalog/product/1336

    Good wireless range, plus you also get USB and a fairly powerful microcontroller.

  6. Pingback: SPOKA Night Light controlled from and Android Phone « Robotics / Electronics / Physical Computing

  7. Ytai says:

    Haha, soon with IOIO over bluetooth you can cut the middle-man 😀

    Nice build!

    • trandi says:

      Yes, indeed ! 🙂 More seriously now, it’s “crazy” how easy it was to use the IOIO for testing, while the only reason I chose it was the right voltage 🙂

      I haven’t followed the latest IOIO developments, but what’s the status on the bluetooth ? Will it be a new board, or some addon that you simply plug into a “good old” IOIO ?

      Actually, the cheap bluetooth devices we were talking about on the IOIO forum make these transceivers pointless ! Beyond the range (I haven’t tested it properly on either side, but I have a feeling these simple transceivers, with an antenna, would fare better !) everything else is in favour of the bluetooth: – cheaper – size is similar – can have full duplex – bps muuuch higher – can connect directly to a phone / PC – etc. …

      Dan

Leave a comment