Raspberry Pi Application
By Chris Clement - KA4UPC
Web-enabling a useful legacy computer application
➲ Original package pic2.jpg
➲ In the 90s I developed 16-circuit energy monitor "microMeter" (mM) with CT's, PT's and a serial data stream.
➲ Like many industrial applications, a small amount of data must be collected reliably.
➲ It is a timeless need and works well today. Simple and loosely coupled.
Long-term goal
➲ Keep s/w current and simple.
➲ Move past desktop “fat client” s/w.
➲ capture serial data from DOS to Windows 10, Linux, Mac - read 17 bursts and toss 1st, index the rest by channel#
➲ add timestamp and append counter values to flat file or table rows
➲ subtract any two rows and calc demand, usage, cost, %, power factor, etc.
The Present Situation
Development up to present
➲ Pull model vs push model.
➲ Main concern was maintaining modern, supported serial data pathways as desktop interfaces changed or disappeared.
➲ Raspberry Pi is a good building block but even it has been changed disruptively to serial communications.
➲ Support X-10 and similar controls.
Potential Alternatives
➲ Serial to Ethernet adapter
➲ Raspberry Pi 3 - need to get serial ports working reliably.
➲ Arduino – small memory constraints.
➲ Another hobby microP with the same c socket code.
➲ Beaglebone Black! 5/26/2023
Recommendation
● "web-service" php to stuff the data argument into a table
●connect(mysocket, (struct sockaddr *)&dest, sizeof(struct sockaddr));
●reports Selection panel
●my Air BNB older Type 1. No pf but still supported.
●my house in Ozona newer Type 2.
My RP Serial Level Hack
➲ Data from mM is traditional RS232 +/- 12v.
➲ mM txd goes to LED anode.
➲ LED cathode goes to NPN base (2N2222).
➲ NPN emitter goes to common ground.
➲ NPN collector goes to RP rxd.
➲ Optocoupler 4N37 can be used instead of NPN for ESD ground isolation.
My RP3 Video Hack
➲ The RCA composite video jack was dropped and was only available in the 3mm jack with a weird flip of ring and sleeve.
➲ I use the RCA male barely pushed in with a jumper from coax shield to ground.
➲ No need for expensive adapter cable.
Pic
Even better optical coupling
White LED facing jameco 1108144 photo trans tept5600
micrometer2001.com