# Parking slot supervision project: 7-segment 2 digit display panel addressing

Status
Not open for further replies.

#### earckens

##### Member
Hi, for a large project for a 100 slot parking supervision system there need to be 14 7-segment/2 digit 7" display panels each showing different values (ie free slots for specific parking segments).
The hardware supervises sensors (1 per parking slot) giving real-time either "vacant" or "occupied" status for each slot to the control system.

What I look for is a solution that allows my programmer to address each panel individually and transmit a specific 2-digit number to each panel.

I know there are drivers for 7-segment displays but I need to have a solution to address these display panels individually. Similar to large highway display panels showing the price for different fuels at the next petrol station.

My programmer uses C++, the software will be installed on a W10 pc, but the information needs to get out of this pc to the display panels and their individual drivers.

How would this on hardware level best be accomplished?

#### ronsimpson

##### Well-Known Member
Are the displays in the same place, next to each other OR are they spread out over the parking low.
Can you run a wire to all 14 displays.

#### earckens

##### Member
Hi ronsimpson: the display panels locations are spread all over the parking, they are used to display the number of free slots in the parking segments "behind" the display (the parking is a 1 entry+exit type of -private- parking). The parking is an underground 2 level construction 60m x 40m in size. Cars enter at -1 into the building, can drive down through roundabout to -2, and to exit they have to drive back up to -1 to exit through the entrance.
Wiring is no problem, the building owner / occupent will provide all the cables where needed. Technically I think we will need to go over TCP/IP using cat5 or cat6 for the displays.
(The parking slot sensors are wireless, we collect the sensor data using 868MHz datacollectors, 3 per floor).

#### earckens

##### Member
Here are some pictures of the parkings.

#### Attachments

• 963.9 KB Views: 50
• 1.3 MB Views: 56
• 1.2 MB Views: 51
• 1.1 MB Views: 60

#### ronsimpson

##### Well-Known Member
You need to connect your computer W10 to the display panels.
Your computer (W10) has Bluetooth 4.0 and 802.11a/b/g/n WiFi and 2-USB ports. We must use only these ports to talk to all the display panels.
WiFi is a good option.
USB can not go on long wires. We can get USB to RS232 or USB to USB to RS422/RS485.
>RS232 can not go to all places. (limited in distance) But RS232 can go to display1 and get retransmitted to display2 and retransmitted to display3 .......
>RS422 can go a long distance. I don't know if it will go to all the signs.
-------------------------------------
One option is to have the W10 computer send data and addresses to 14 very small computers.
Data can be in serial format ASCII. Example: (start command), address, data1, data2, end command.
Data is:0 through 9 (or it could be in binary, Bit 8=1, bit 7 through bit 1 is for segment 7 through 1.
Start and stop commands could be control_S and control_E (any thing you want)
(I found an example where # is for start, address, data, data, check_sum, CR=end)
-------------------------------------
Small computer could be any "credit card size computer" that has a serial port.
https://www.sparkfun.com/products/11113
There are many different little boards like this one. Some are less money. Some have wireless internet. (no wires ) You might find the wires cost more than the computers. (remember labor)
I am using "Paspberry Pi Zero"

#### JonSea

##### Well-Known Member
A possible method would be to use Dallas 1-Wire octal switches. Each 1-Wire switch has a unique serial number and all devices communicate over a serial network, possibly over just a power/data line and ground or data/power/ground conductors.

You should be able to drive a network of about a thousand feet/300 meters; the network must be daisy-chained, not a star configuration.

The octal switch can be decoded to display 256 values. I would use a PIC18F and a MAX7219 to decode and display the number at each station.

There are USB-1-Wire and RS232-1-Wire controls for the PC end to drive the display network.

#### earckens

##### Member
(...)
One option is to have the W10 computer send data and addresses to 14 very small computers.
Data can be in serial format ASCII. Example: (start command), address, data1, data2, end command.
(...)
Small computer could be any "credit card size computer" that has a serial port.
https://www.sparkfun.com/products/11113
(...)
Hi ronsimpson, very interesting idea!!!

Question: how do you assign an address to each microcontroller?

#### earckens

##### Member
A possible method would be to use Dallas 1-Wire octal switches. Each 1-Wire switch has a unique serial number and all devices communicate over a serial network, possibly over just a power/data line and ground or data/power/ground conductors.

You should be able to drive a network of about a thousand feet/300 meters; the network must be daisy-chained, not a star configuration.

The octal switch can be decoded to display 256 values. I would use a PIC18F and a MAX7219 to decode and display the number at each station.

There are USB-1-Wire and RS232-1-Wire controls for the PC end to drive the display network.
Hi JonSea, nice to hear from you; great solution too (and I had never heard of the 1-Wire solution)!

The wiring itself is no issue, the customer will install whatever we require. Individual distance over a daisy-chained connection between each display is about 50m or less; however, the W10 computer may well be about 80 to 100m away: would that work with this solution? Repeater required?

#### ronsimpson

##### Well-Known Member
how do you assign an address to each microcontroller?
dip switch. 4 bit = 16 addresses.
OR
put a 8 bit number in EEPROM. (I2C type EEPROMs use two wires. OR SPI EEPROM. )
Many of the small computers have on board memory so you will not need to add more parts.
If you use the Raspberry Pi 0 it has memory that is used like a hard drive. So same a file called address.txt and in the file save a "5" for address 5. At power up the computer will read the file and only respond to that address.

#### earckens

##### Member
dip switch. 4 bit = 16 addresses.
OR
put a 8 bit number in EEPROM. (I2C type EEPROMs use two wires. OR SPI EEPROM. )
Many of the small computers have on board memory so you will not need to add more parts.
If you use the Raspberry Pi 0 it has memory that is used like a hard drive. So same a file called address.txt and in the file save a "5" for address 5. At power up the computer will read the file and only respond to that address.
So a 4bit dipswitch to be connected to 4 digital inputs for each controller and then have the microcontroller use these values to use as its address?

#### ronsimpson

##### Well-Known Member
Yes,
In the PC you send out data to all displays. One at a time. You know how in C.
In the little computer. Every time data is received. Look for the start "#". Look for the address "5". Look at dip switches. Compare. Respond or do not respond. Loop back to looking for the start #.

Little computer:
4 input pins = dip switch.
8 pins = display digit 1, 8 pins = display digit 2
2 pins for serial data in and serial data out.

Thank you for the likes.

#### JonSea

##### Well-Known Member
Rather than rely on my dim memories, I'm going to point you the definative reference. A quick scan of the following suggests networks of 200m are not difficult, and over 500m is possible.

Guidelines for Reliable Long Line 1-Wire Networks

Years ago, we investigated this. We wanted to cut a 1000' spool of CAT-5 cable into a 500' piece, a 250' piece and two 125' pieces to test various length networks. Did didn't have space to easily measure and cut the cable. We figured we could buy a 1000' box of cable at the home center, then use their wire measuring tool to measure the lengths and coil them up.

We went to the home center, got a box of cable and a package of cable ties and tracked down an employee to explain we'd like to use the cable tool.

"Sure. Cut cable is $xx per foot." quoting us a price about twice what the box cost. We explained again. We wanted to buy the box of cable, and just use the machine to measure and cut OUR cable. He repeated that cut cable was twice as much. Geez. We gave up and went to the competitor literally across the street. We explained what we wanted to do again. Same response from this employee. We asked for a manager. Same response initially. We explained again. We argued, and eventually he understood that all we needed was to ise his machine for 10 minutes. No help required. The store wasn't losing anything. But even then, he insisted we actually pay for the box of cable before we actually cut it. This from a store that will saw a sheet of plywood into pieces for you at no charge! #### KeepItSimpleStupid ##### Well-Known Member Most Helpful Member What I look for is a solution that allows my programmer to address each panel individually and transmit a specific 2-digit number to each panel. that should be in the realm of RS485: https://en.wikipedia.org/wiki/RS-485; RS485 has an inherent 32 device limitation and is master/slave. I have no idea what the communication is for your displays and the parking sensors. That can help immensely. Suppose that all you needed is a 4 bit value for the displays. Adam modules could work. http://www.advantech.com/products/digital-i-o-modules/sub_gf-5vwk77 You mentioned W10 and I'd initially say "Why bother?" This probably should be a job for a PLC. e.g. http://www.ezautomation.net/ezlogix/ezlogix.htm If you wanted to use a W10 PC, use it for report generation, but make the system autonomous. Modbus over TCP/IP is yet another protocal. A Modbus device might be the way to go. You can;t interface anything without knowing how they communicate, I assume the displays are commercial, Your sensing system comunicates via what? Serial? You could introduce a "tamper switch". So, it could very well be just wire and program and you really don;t have to build much, If you don;t know much about DIN rail construction techniques, LEARN. This is basically the de-facto standard for process control. It all starts with a flange mounted enclosure that has a 1/4" thick aluminum plate on the bottom. You'd need power and data as separate lines coming in. If you played your cards right, you could have connectors or even DIN rail terminals for power and communications. The plate could easily be removeable to swap out another functioning module. Here http://www.tan.com.ua/en/automated-process-control-systems is an example of the technique. Generally, you have all the inputs going to terminals near the point of entry and then distribute from there. Data has to be separate from power. Inside, you can have breakers, convenience outlets, terminal strips etc, I wire them with 18 AWG stranded wire, but with reduced stranding. The grey stuff is wire duct. I don't think I can find pics of stuff I did. Now, if you were building a lot of these, you might consider an R-Pi with ethernet. I'd cable it as though it was ethernet, What about brightness control on say a roof level. What you do on a roof may be different. You might be able to introduce power saving techniques too. if all spots are open, blank the display as an example. or note when a car enters the garage and only put the displays on for say 10 minutes. Time enough for the guy to park. When I generally design stuff: 1. Modular 2. easy to troubleshoot (a shorted Modbus wire might be a real PITA) Ethernet keeps things isolated. There is something called an RS485 hub so you can make it like Ethernet (home run wiring) and possibly make Ethernet a future upgrade. 3. Write down everything under the sun you would like the system to do. 4. Decide what you need. 5. Implement with the future in mind. Dumb examples: Tamper switch: Wire for it, but don't install the switches unless it becomes a problem. Power saving: Bet you never thought of that? Accounting: Let the W10 computer do that and that only. Back-up: May just mean that all boxes are on the same circuit and you pick out a UPS and wire so not many changes are needed. You might have a UPS for the parking system and a UPS for the W10 computer. It could change how the program is written. Test routines: e.g. check the parking sensors Web: TCP/IP: Call boxes with TCP/IP phones 2 cables: RS485 and later Ethernet or spare. Keylocks: It's OK to decide if none of the above is reasonable. In one of my designs, I decided that I would not power an indicator direct form a panel in a room 50 feet away, I had to use a relay and the local power supply. If I cut power to the box, I knew the front panel would not be live and external sources were confined to a given space. So, an extra$25.00

LabView is the defacto standard to control Instrumentation. The home version is cheap, http://store.digilentinc.com/labview-home-bundle/ but your not allowed to use it in a commercial setting. The commercial version is considerably more expensive. There are built in functions that allow you to create Excel files and that could be enough for accounting. it's weird language. graphical in nature and works on the principle that a routine executes when all the data is available. It's cake to write code that executes in parallel.

There's a lot of little things that will be gotcha's.

These guys https://www.asi-ez.com/ have a lot of stuff for building control panels.

So, another example: Take the RJ45 modules here: https://www.asi-ez.com/member/x026-...RJ45-Patch-Panel-Modules-DIN-Rail-Mounted.asp

So, you can wire the displays as though they are Ethernet and it gives you an easy termination. If you wire with an RS485 Hub (Home run), and make room for an Ethernet switch, you have made troubleshooting easier and have an upgrade path.

Don;t forget surge suppression especially the roof spots. You may need RS485 suppression or do the roof with fiber.

MODBUS over TCP/IP may be too expensive,

#### KeepItSimpleStupid

##### Well-Known Member
We gave up and went to the competitor literally across the street. We explained what we wanted to do again. Same response from this employee. We asked for a manager. Same response initially. We explained again. We argued, and eventually he understood that all we needed was to ise his machine for 10 minutes. No help required. The store wasn't losing anything. But even then, he insisted we actually pay for the box of cable before we actually cut it. This from a store that will saw a sheet of plywood into pieces for you at no charge!
No bar code for time on machine. No can do! then there is liability issues like cutting your finger using your cutters in their store using their equipment.

#### earckens

##### Member
that should be in the realm of RS485: https://en.wikipedia.org/wiki/RS-485; RS485 has an inherent 32 device limitation and is master/slave.

I have no idea what the communication is for your displays and the parking sensors. That can help immensely.

(...)
Great post, it helps immensely in situating my project communications concept. It is weekend now and we have friends and family coming in a few hours, so I promised my wife not to sit behind the keyboard, and to read your message in detail tomorrow.

As far as display comms is concerned, the only thing these displays need is an update every few minutes with the status of the number of free parking slots in the area behind where each display is hung to the ceiling.
So, slow communications, few data, and that is it.
Basically just digits, and in case we would go for a alphanumeric display just digits and when the area is full, write "FULL" to the panel.

Thanks and have a great weekend!
Erik

Edit: typos and grammar

#### KeepItSimpleStupid

##### Well-Known Member
Are you building or buying the displays.

i was initially thinking along the lines of a take-a number. e.g. https://www.microframecorp.com/d5120axx8-2-digit-take-a-number-display

These use RS-485 and are indoor. Maybe you could get them to make some custom firmware to just display a number.

Talk to the manufacturer to see how well it would work in a parking garage. Some displays had outdoor mounting.

They didn;t give you the low level protocol, but you could likely control it via curl https://linux.die.net/man/1/curl or get and put commands directly. it's beyound my expertise, but it should be possible. You even get to display "Full". Looks like an outdoor case is available. Nothing said about brightness.

You would have to confirm if:
1) Auto delete = 0 and Rollover set to <don't care> would always display a number.
2) Is all spaces legal for power save mode. You could even reduce that to a DOT if it isn't.

An example test mode, would display the spot that changed state rather than the # empty.

So, all you'd need is a 24 V energy limiting transformer in a box with a few ventilation plugs.

or https://www.kele.com/power-supplies-section.pdf PDF page 14.

For "power savings" you probably could display "spaces".

So, maybe Linux single board computer.

You can easily go full-circle.

#### earckens

##### Member
Are you building or buying the displays.

(...)
Just a quickie in between the cooking session here: I want to buy ready made displays for this project, other suggestion are welcome too for future projects but here I want to impress the customer and saving money with self-made things will not. The money is there.

Edit: this does not mean I would dismiss other suggestions, I keep an open mind. Even as JonSea already suggested earlier, the OneWire concept would be a feasible idea if I find ready-made displays to connect too. And even if I don't find uses for ideas proposed here they surely will be helpfull for future projects.

#### KeepItSimpleStupid

##### Well-Known Member
I'm going to throw out the Python programming language on a linux box.

If you don't need accounting, there is likely no need for a WIN 10 PC.

I don;t know if it's possible to create a web server and "push" results from Python to that running on the same machine. It then MIGHT be possible to have a web application that would display all levels.

For grins and giggles allow the users of the garage access to web app if possible so they can see all levels. That might be something entirely different. When they returm, they would run the app and the spot would be known. This idea is really off the wall.

#### KeepItSimpleStupid

##### Well-Known Member
Here's another company http://www.gs-gmbh.net, but in Germany and you may not want to import from there. BCD and RS385. Colors and auto-brightness with some models.

Really expensive, confusing documentation, 5 digits, but they have the IP (Ingress Protection) rating down.

Last edited:

#### KeepItSimpleStupid

##### Well-Known Member
You have to figure out some basic specs of the displays and you might have to work with the manufacturer to achieve them.

IP (Ingress Protection) rating (you don't want to have to clean them; bugs; spiders)
Is brightness control necessary?
Color (green is more easily read in the dark, Yellow in bright rooms)
Temperature range?
Humidity?
Will any actually see the outside elements like snow, rain or freezing rain?
Mounting availability and method?

Power supply?
-Do you want the system on one breaker?
- What about low voltage AC/DC power from a central location?
What happens when one unit goes out?
- i.e. the use of an RS485 hub
Cost
-If you put class II power and data in the same conduit, you may be able to get away with PVC conduit.
- Thermostat wire for power and tamper with a shielded data cable to central location.
Data Wiring
- Probably you'll end up wiring it as though it's Ethernet, but really RS485.
Any advantages of POE (power over Ethernet)?
Wiring in general
- Something to envision is start with a large PVC conduit to essentially a breakout/pull box an run low voltage on heavier wire like thermostat wire.
- leave a few extra wires for tamper and leave slack
- The PVC conduit would get smaller as you went to the top level.
- There is a weatherproof Ethernet (RJ45) connector, expensive though
- If it was RS-485 you might be able to get away with one plug so replacement is cake; Cable and jacket might be different here.
Reliability
-If one node goes down, what happens?
-I mentioned the idea of power save mode where the entrance gate opening starts a timer for the max time it takes to find a level.
Spares?
Debug Mode?
-Display indicates spot that changed state. i.e. webserver on phone; Maybe display a decimal pt.
Communication (software)
-MODBUS, Web Interface
Communication (Hardware)
Tamper switch
-probably not
-Alarm?
Embedded computer at each location
-Hopefully all you need is in the display hardware

There is some ideas.

Status
Not open for further replies.