Orange Pi revisited
The Raspberry Pi offers very good value for money, performing like a fully-fledged - albeit very low-end - computer at a fraction of the cost. Another great plus-point is that you can get at the port pins very easily; since the demise of the onboard serial, parallel and user ports, the regular pc has become something of a closed book for small-time hobbyists like myself. But for real cheap-skates like myself, there is the Orange Pi. This is similar in concept and design to the Raspberry Pi but at an even lower price. I own three of these, all with slightly different specifications:
My Orange Pi One is connected to the so-called P1 port of our domestic smart energy meter. Every few seconds ,it collects and logs a new 'telegram' of information from the meter. These can then be analyzed and displayed via an HTTPS web server connected to the 'pi' by sshfs over WiFi.This works very well... apart from the fact that the WiFi connection occasionally drops out, requiring a reboot of the pi. At first, I had mounted the Orange Pi on a mini-breadboard, containing an inverter as demanded by the unusual polarity of the P1 serial output signal, and connected the rectified signal to one of the Pi's serial ports, which was handily available on the 2x13 pin connector. I later replaced this by a FTDI USB RS232 to TTL adapter. This I had to first 'reprogram' to reverse the polarity of the Rx signal. I made this change largely because I was looking for a more portable (e.g. to a NAS) solution.
My Orange Pi Zero plus (I think! ... even though the file system refers to it as a 'One' ) resides in our garage. Currently all it does is provide an encoded open/close switch for the large garage door, replacing the functionality of the long broken - and no longer replaceable as such - original remote control. This also works reliably in general, but also suffers occasional WiFi dropouts. It These don't affect the main functionality, only the ability to remotely log performance. This board is also mounted on a mini-breadboard; this is mainly to accommodate an opto-coupler between the physical switch and the output port bit.
I also own an Orange Pi 2 Lite (Pictured above). This seems to boast a stable WiFi connection - which is just as well given that, unlike the others, it has no cabled Ethernet (RJ-45) connection! I intend to build this into a replacement for the Pi in the meter cupboard. While doing this, I want to use an alternative USB to serial interface (CH340G) which is more readily and reliably available. I had earlier made the mistake of buying a cheaper FTDI interface, which then turned out not to have the capability of inverting the input signal. The CH340G chip can be made to invert the Rx signal by pulling up its 'R232' input pin. It would have been really nice if the board in question had had a jumper for this ( I hate having to solder!). This pin is however adjacent to the RTS pin, so by simply(?) shorting these pins together I can gain software control of the Rx polarity.
领英推荐
I was surprised to see that I had installed Ubuntu 16.04 on the Orange Pi 2 Lite . The other two boards both ran Armbian, arguably a more natural choice. My memory fails me once again but I suspect I had problems getting the WiFi configured. Anyway, I programmed another SD card with the latest appropriate (U-Boot + Armbian) image and tried this out... and yes, I did have problems getting Wifi configured via the serial interface. I succeeded after some trial and error using command 'nmtui'; unlike armbian-config, this was just about usable over the serial line. In practice, A far easier solution is to connect a keyboard and mouse via a USB hub to the USB port, log in using these, then do 'sudo armbian-config' which works perfectly. Of course, now that WiFi is up and running, I can disconnect these peripherals and use 'ssh' for further work.
How I get on further with this little project will be the subject of either a revision of this article or a follow-up article.
This is the latest in a series of occasional article about my hobby pursuits. I am using Linked-in for this for the first time. In the past I have used 'Facebook pages' (see https://www.facebook.com/ThePapaHippo ) but that had the disadvantage that the user interface for composition seemed to change often and unpredictably. I'm already warming to this linked-in functionality; it allows me to sit down, write, check and publish without unnecessary bells and whistles.