How to control and LED dot matrix display via Android phone or tablet?

Thread Starter

florenceh

Joined Oct 30, 2023
11
I'm trying to connect my LED display to my android phone (either via usb-c connection or via bluetooth). What is the best way to go about this for the usb-c connection?

I have an RS485 cable and then an RS485 to usb-c converter and I've plugged this into my android. I can visibly see the LED dot matrix display on my phone's connections, but I can't figure out how to send any thing to the LED dot matrix display? What am I missing?

I tried using the Serial USB terminal app but I haven't succeeded!

Thanks in advance! 1698663151234.jpg
 

MrChips

Joined Oct 2, 2009
30,485
Welcome to AAC!

Presumably, you will need software on both ends, at the Android device and at the LCD. What software do you intend to use?

What is the part number of the LCD?
 

Thread Starter

florenceh

Joined Oct 30, 2023
11
Thanks for the speedy reply and welcome! :)

It's an LED device and I'm using the serial terminal USB device (https://play.google.com/store/apps/details?id=de.kai_morich.serial_usb_terminal&hl=en_GB&gl=US) on my android for testing and I'm not sure what the software is on the existing LED device.

The LED has an RS485 communication cable and I've got an RS485 (B) to USB converter (Waveshare) then a USB to USB-c converter to connect it to my android device. On the device it has three lights: PWR, TXD and RXD. I can successfully start the RXD and PWR, but I'm having trouble activating the TXD.

I should be able to just put a HEX command through the android app to push it to the LED but it doesn't seem to be receiving from my android device.
 

MrChips

Joined Oct 2, 2009
30,485
I don't know anything about the Serial USB Terminal.
I would start off by experimenting with program code running on an MCU such as Arduino or similar. Even a PC would work.
 

LesJones

Joined Jan 8, 2017
4,172
There is an APP for Android devices that emulated a DEC VT100 terminal It lets you send ASCII characters to other Bluetooth devices such as an HC-05 or HC-06 modules. The interface on these devices is serial data at TTL logic levels. If you convert thse signals levels to RS485 levels this might work. (You may also find that there is a Blutooth to RS485 module available.
After a quick look at your link to the required protocol you need to be able to send binary values. I don't know if Blueterm has this option.

Les.
 

MrChips

Joined Oct 2, 2009
30,485
There are software packages that can send serial data from your computer. The ones that I am more familiar with are Labview and MATLAB. I can help you with MATLAB if you want to go that route. Or you can use any popular MCU development board that can be programmed from your PC.
 

MrChips

Joined Oct 2, 2009
30,485
Oh yes, I'd be keen to give MATLAB a go!
Good.
What computer are you using, Mac or PC, what version OS?
What version MATLAB do you have?
Do know how to create a GUI on MATLAB?

You will need a USB cable from your PC to the RS-485 adapter and a connection from the adapter to the LED device.
 

Thread Starter

florenceh

Joined Oct 30, 2023
11
Thanks so much for your help!

I have a mac with the latest OS 14.0

I have a USB cable from my PC to the RS-485 adapter and to the LED.
 

Thread Starter

florenceh

Joined Oct 30, 2023
11
I used MATLAB a few moons ago at University, though I am much more familiar with Python.

I've just signed up for the 30 day free trial with MATLAB.
 

MrChips

Joined Oct 2, 2009
30,485
Usually, I would create a MATLAB GUI with at least two buttons, TEST and QUIT.
However, we can omit the GUI just to keep it simple. We will simply create a script (.m file) to send a message via the COM port.

You will have to find out which communications port has been assigned to the USB adapter. This information is found in the Device Manager on a PC. I don't know how it is done on a Mac.

I have created this script and named it test.m
From the MATLAB command window, you simply type test to execute it.

As written, the program sends the character U, which is 0x55, at 9600 baud. This can be verified using an oscilloscope.
Then you can edit message as you wish.

Code:
disp 'Serial Port Test'
serialportobj = serialport("COM7",9600);
message = "U";
fprintf(serialportobj, '%s',message);
delete(serialportobj);
 

Thread Starter

florenceh

Joined Oct 30, 2023
11
Thanks so much!

I created the test.m file and added the following info:

disp 'Serial Port Test'
serialportobj = serialport("/dev/tty.usbmodem56590026621",38400);
message = "U";
fprintf(serialportobj, '%s',message);
delete(serialportobj);

But when I go to run it nothing seems to happen, the TXD light flickers but the LED display doesn't change what it's showing at all? Any reasons this could be?
 
Top