![]() |
![]() |
![]() |
Original Shop Gateway
|
Nano Mount | Live Env Data | Diagram |
Hardware:
I bought an Rpi shield and a CYT1070 Level Converter from Amazon.
The shield provides a simple connection to the Rpi's GPIO and a place to mount the Level Shifter and 4 wire cable connector.
I was originally going to use an Rpi-4 but after a little thought I decided to use an Rpi-3 as the shop gateway.
The Rpi 3B+
The Rpi is running a "headless" Ubuntu Server as it's OS.
Being familiar with Ubuntu makes this an apetizing choice.
I spent many years writing code for and administering Unix systems before Linux cane to be.
Now we have Linux
Between gwy (ShopGateway) and the Env Server will be via RS-485, a level shifter will be required due to the Rpi's 3 volt signal voltages and the Arduino uses 5 volt signals.
The ShopIfc will be the internet Interface to computers in the shop and will be running Ubuntu and my Unix infrastructure.
I modified the Infrastructure to allow processors with different "Endedness" to communicate.
Since the rpi is a 4-way 64bit Arm processor and the rest of my computers are AMD Ryzen (x86-64bit), this will be a Multiple Arcitecture comm.
Any process on the house net can make requests to the ShopIfc for display on web pages etc.
I will add to the Dust Auto system keys to query the env sensor, also display the temp/hum during normal operations.
And, in order to not complicate the Dust Auto system's main conroller any more, I will use RS-485 between the Env Server and V8.
Rpi UART-0 tx = GPIO_14 P1-08, and Rx = GPIO_15, P1-10.
Dust Auto will query Env via V8.
For later: I can also have some queries from the ShopGwy to DustAuto, via Env and V8, but since DA is not always running, that may not be necessary.
Rs485 is used here as a Master/Slave.
The Shop Environment Server monitors temperature and humidity inside and outside the shop.
The readings are stored in static variables, updated every 2sec.
The Dust Auto system and the ShopGwy will each make periodic requests for this information.
The ShopGwy will be the network gateway to the shop and be visible on our 1Gb household LAN, to all internal systems.
I added the shop internal info to our weather page.
The Dust Auto system will be able to display current temp/humidity inside and outside on the data terminal.
And in addition I could add some checks for shop occupancy, like with a PIR detector, or ultrasonic check to see when the overhead door is open.
Look at live answer from the Shop Gateway
Originally the shop gateway was run on an Rpi-3, but die to stability problems, I had to build one based on a Nano with an ENC28J60 shield.
Eth2Ser:
I am creating a Nano based Ethernet to Serial device which will also serve as the shop's network gwy (gateway).
The gwy (Shop Gateway) will run on a Nano with an ENC28J60 ethernet shield.
Gwy will be a Nano based ethernet to RS232 converter.
TCP packets will only contain ascii characters, including an 8 char Info header,containing a 4 char packet length field and 4 extra bytes space for future routing.
The gwy will poll it's ethernet and RS232 ports.
The gwy will have 4 tty ports for speaking to the devices in the shop: Env, DustAuto, Shop AC (mini split AC), and one extra.
The tty ports will be using RS232 ascii characters.
Messages will contain a small, initial vector address which will enable gwy to determine the message's destination.
When a request arrives it will be forwarded to the correct server, wait for the response, and forweard the response back to the sender.
In this 1st version, during the processing of the request no other requests will be received.
Requests and responses should be very quick, only tying up the gwy for a few MS.
+5 Volt Power
The Env server's power will be supplied from the ShopGwy (Rpi).
Since the ShopRpi is never powered off, and I want the Env server available at all times for our web servers, the Env server will draw +5 volts current from the ShopRpi.
When Testing allow the V8 RS232 cable to the Env server to supply 5 volts (red wire connected).
When installing, be very careful about not connecting the +5 volt power between V8 controller and Env Server (just don't connect the red wire in that cable).
Under installed conditions, power (+5 volts) is supplied from Rpi to Env server, when testing, v8 supplies power to Env.
It is difficult to get more than two wires in a screw terminal (like the Nano Breakout's).
I came up with this power distribution device to handle the four ground and four +5 volt power wires for the connectors to the two DHT22s and 4 wire JST connectors for the rpi and V8 controller.
Env
(Env Server), will be running on an Arduino Nano, mounted on a Screw Terminal Adapter Shield Expansion Board and will use Software Serial for the link to/from V8 and Hardware Serial for the ShopRpi's requests.
Env will measure temperature and humidity using DHT22 sensors.
I chose the DHT22s because they are more accurate than the DHT11.
The DHT22 sensor outside (Ext) will need to be in a weather proof housing, made from 3/4" PVC, that allows free air circulation with the outside air.
I need to test long cable length comms to the DHT22.
The Nano Env Server will be mounted in a Nano Breakout Box, similar to the Dust Detector.
![]() | ||
Click For Larger Pics |
Hardware:
I bought an Rpi shield and a CYT1070 Level Converter from Amazon.
The shield provides a simple connection to the Rpi's GPIO and a place to mount the Level Shifter and 4 wire cable connector.
I was originally going to use an Rpi-4 but after a little thought I decided to use an Rpi-3 as the shop gateway.
The Rpi 3B+
The Rpi is running a "headless" Ubuntu Server as it's OS.
Being familiar with Ubuntu makes this an apetizing choice.
I spent many years writing code for and administering Unix systems before Linux cane to be.
Now we have Linux
Between gwy (ShopGateway (Rpi-3B Shop GateWay) and the Env Server will be via RS232, a level shifter will be required due to the Rpi's 3 volt signal voltages and the Arduino uses 5 volt signals.
The ShopIfc will be the internet Interface to computers in the shop and will be running Ubuntu and my Unix infrastructure.
I modified the Infrastructure to allow processors with different "Endedness" to communicate.
Since the rpi is a 4-way 64bit Arm processor and the rest of my computers are AMD Ryzen (x86-64bit), this will be a Multiple Arcitecture comm.
Any process on the house net can make requests to the ShopIfc for display on web pages etc.
I will add to the Dust Auto system keys to query the env sensor, also display the temp/hum during normal operations.
And, in order to not complicate the Dust Auto system's main conroller any more, I will use RS232 between the Env Server and V8.
Rpi UART-0 tx = GPIO_14 P1-08, and Rx = GPIO_15, P1-10.
Dust Auto will query Env via V8.
For later: I can also have some queries from the ShopGwy to DustAuto, via Env and V8, but since DA is not always running, that may not be necessary.
Rs232 is used here as a Master/Slave.
![]() | Rpi-3, running Ubuntu 20.40 Server with my infrastructure, being tested as a shop gateway. |
![]() | Testing Rpi talking to Arduinos. Rpi UART uses 3V I/O while Arduino uses 5V I/O, thus requiring a level shifter. You can see the level shifter being tested here. |
![]() | Close look at Rpi-3 under test. Note the DHT-22 laying over the Rpi's cooling fan exhaust, to provide a different temp so I'd know I had the right one labeled EXT. |
![]() | Rpi-3 with breakout and a DHT-22. |
![]() | Rpi gateway installed in the shop. |
![]() | Home net switch in the shop. |
![]() |