Autonomy

OpenCar

For a very long time I debated with myself how I was going to get streetcars and autos to move as they did in real life. I believed I needed to know the exact position of every vehicle and a computer would instruct each how to move. For a very long time this approach seemed impossibly hard.

I had known about the Faller Car System and its ultrasonic positioning method. But it requires a big ugly hole in the top of vehicles. Not going to happen to a streetcar that cost me $2,000. For this and the line-of-sight problem on a two level layout, I couldn’t see how I could adopt this method of control.

I had looked at other car systems that used infrared and magnetic detection but didn’t think they worked well enough. Videos showed erratic motion. But what dawned on me was that for the most part I didn’t need to know the exact position of every vehicle.

Autos and streetcars are essentially the same. The only difference being that autos only go forward so i have to plan streets so cars can essentially circle the block to go back the way they came. Streetcars need to go in reverse, in real life the streetcars reversed direction at the ends of the line.

Most of the time I just need vehicles to not backend each other. The only time exact position is needed is at intersections. That is a problem that can be delt with just in the boundaries of the intersection by a local computer.

Now the distance control system of several car systems seemed like an idea that needed a second look. Vehicles would be free running most of the time. They would play follow the leader. Just the way they did in real life. That’s when I discovered the OpenCar website.

OpenCar has modules that go in vehicles to issue infrared signals to following vehicles and infrared sensors to detect vehichles ahead for distance control. There are modules to be placed along side the road to cause passing vehicles to send their location and ID by Wi-Fi. And somehow OpenCar handles intersections. It has an eleborate wired network to communicate all details back to a central computer with a graphic screen to display where all vehicles are at the moment.

In my case I do not need all the complexity of full OpenCar. I do need to modify OpenCar for a way to handle streetcars when they are running in reverse. Maybe I could adapt and adopt some of OpenCar. I had hoped OpenCar meant Open Source.

Unfortunately, the Germans were only kidding about Open. Their website has lots and lots of details about how OpenCar works. There are hardware schematics, manuals describing the hardware and feely downloadable firmware. Implications are from the site that the firmware was once Open Source but they have gone greedy and Closed it.

The lastest versions of firmwares run on hardware whose schematic is not available. I couldn’t adapt and adopt the designs, I would have to use their hardware as is somehow. Not knowing what that involved, I ordered an OpenCar Starter Kit to see what could be learned.

The Germans were a bit of a pain. My first emails with questions about items and ordering had a response in German. I took the hint and from then on all emails were always in German. When I got order details confirmed, I found I had to pay with PayPal and in Euros, a little over €500. Turned out to be a real pain. I received a UPS tracking number and soon found the package at some distant UPS location labeled with an address that didn’t exist.

Before I could get UPS to redirect the package to me, they wanted the tariff paid, about $150. Then they said I could not change the address of my package, the Germans had to. I contacted the Germans, confirmed the correct address, soon found they changed the address to the same wrong address. After about a month of not getting anywhere, I pleaded with the Germans to have UPS change the address to the correct one. Eventually the package was delivered.

During the month wait for my OpenCar order I decided to order a hardware simulator, Proteus 9.1 at about $1,000, to see if I could simulate a key OpenCar module and see what I could learn. Turns out Proteus is anything but a stable, developed product. Took numerous emails and a code update before Proteus was even minimally useful.

As I don’t give up easily, I eventually rigged a way to load firmware into the simulated OpenCar module from their Windows firmware updater. I was going to see what I could learn from the simulation when I discovered their published schematic and firmware don’t match. I hadn’t received the package from Germany yet so I opened a dialog with ChatGPT to see what it knew about OpenCar.

SteveCar

I don’t know who came up with the idea first but between ChatGPT’s AI and I the thought developed that we should say nuts to the Germans and develop own vehicle control system. Besides, we didn’t know if my OpenCar order was ever going to arrive. And OpenCar was not going to be useful in its current form: HO-Scale when I need O-Scale, no support for bidirectional streetcars, communications methods likely to be overkill.

As the AI and I discussed the new modified OpenCar it suddenly called it SteveCar. It was going to be quite different from OpenCar so give it a new name. In discussing the design goals of SteveCar, I found the AI to be the ideal engineering assistant. It would have highly technical discussions with me, relieve me of mundane tasks and throw in jokes from time to time. How software like the AI has a sense of humor I find amazing.

Note, though, that not all AI are created equal. If I need a quick answer, I’ll ask Google’s AI. Years of asking Google to search for an answer, I guess. When I decided to build the power panel for the Subway Terminal and Hill St Station portion of the layout, I wanted to be sure I was hooking up the amp meter correctly. Google’s AI said to connect the meter shunt across the load. This was obviously wrong, this instruction would place a dead short across the power supply. The power supply would have protected itself but this is not something you fool with. I pointed out the error and it admitted it had made a mistake. I’ve caught Google’s AI in a few other mistakes. So far, no problems with ChatGPT’s AI.

Lots more to come!