You are here

serial interface

4 posts / 0 new
Last post
wb6tae
serial interface
I have been working on a small application to monitor the state of a solar charge controller remotely. At this point, I have a (relatively) low cost EPSolar Tracer MPPT controller connected to a local R-Pi

But, I was thinking "..if the Ubiquiti hardware had a UART, maybe I could connect the controller directly to the node."  In fact, it seems most (maybe all) Ubiquiti wireless routers actually have a UART on the board. It runs at ttl (3.3v) levels and could interface directly to the Tracer. A level adapter would be needed for RS-232. My plan would be to use a serial to socket "connector" like ser2sock, to feed the data to some place where it could be recoirded or displayed.

So, does anyone here have any experience with UARTs on the Ubiquiti routers. Like do they all have this feature, are there any special concers, etc.

TIA

Richard - wb6tae
KG6JEI
Using the onboard serial is
Using the onboard serial is not recommended nor supported by the AREDN team. Currently debug data is output on that port by our core Operating System. May not be useful for 99% of users, but for the dev team its often critical data we use to make these devices work and I sure haven't heard a proprosal for disabling that in the future.

Figure its really not practical to use in the field anyways. In most deployments I've seen the node is 50+ feet away from any of the ground level hardware. That is a pretty darn long RS232 run.

On top of that ANY DATA AT ALL during the bootup sequence will interrupt the onboard boot loader causing the node to stop booting, keep sending random data in this state and eventually you could even wipe the bootloader if the wrong sequence of data came out the serial port.

Really its best to let the nodes do what they do best, be packet routing devices, and put everything else off node.
 
kg9dw
kg9dw's picture
arduino
This would be a great use for a $5 Arduino Uno microcontroller. You've got analog inputs that you can use to read the voltage (using a voltage divider if you exceed the input level), and you can throw a $5 ethernet shield. You've got digital pins you can use to switch things on and off. 

If you want to read your serial controller, you can do that with an Arduino as well. And with some pretty simple code, you can provide a web interface through the ethernet shield. All this, and the current draw will be less than the Raspberry pi. You aren't getting a full-function linux OS by any means, but you're getting a low cost ($10) simple single function solution.

Good luck!
Mike
 
wb6tae
Thanks
Mike, thanks for the comment.  I agree, and Arduino can handle specific tasks quite well, and at very low power consumption.  However, in this particular case, I am thinking about a Pi-Zero (100ma). So, while the current draw is double the 'duino, it is still pretty low.  The advantage, to me at least, is that I have easy remote access to change anything I want.   Other benefits include having full web server and things like syslog, collectd, SQLite, etc..

However, there are a lot of other single board options to look at and once we are clear on what we want to do, choosing a platform will become a lot easier.

Richard - wb6tae

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer