Monday, July 13, 2020

Experiments: Green Screen

I've been playing with OBS a lot lately. Today I tried something different: use a green screen to spiff up a virtual presentation. Instead of just screen-sharing the presentation, I'd use the laptop camera to film the room with me and a green screen in the background. Using the Chroma Key filter the green screen becomes transparent and shows the underlying window grab from Key Note in the OBS stack.

Here's my test arrangement.

Screen-grabbing video into Zoom or Meet tends to be somewhat problematic, and I didn't get the details right yet. However, getting the weatherman effect is cool and fun. I'm sure, I'll find more uses for this.

Sunday, July 12, 2020

Amtrak 11 at Blossom Hill

The timing was just right this morning to catch Amtrak 11, the southbound "Coast Starlight" at Blossom Hill Caltrain station. The train left San Jose 8 minutes late, but was going at a steady clip by the time it got here. Contrary to regular practice, today's 11 had the baggage car at the rear of the train.

It's always fun when the engineer acknowledges some random dude standing at the end of a platform with a camera, so I was delighted when he he greeted me with two short horn blasts and waved from the cab.

Saturday, July 11, 2020

Solar System Cleaners

I usually clean the solar panels in the summer months. It's July, so it's time. Pascal helped. In fact he did all the hard work, and I could take photos.

SVL: Club evening with remote operator

For tonight's club meeting I brought the camera to the layout, so that we could test more of the applicability of this on the actual layout. It worked well.

Here is James running the train on the layout from his home in the Santa Cruz Mountains.

The camera opens up new perspectives for ops. Here's a screenshot taken by another member participating in the video conference.

This time I set up in a much more comfortable location in the layout room.

Wednesday, July 08, 2020

I wanted a challenge ...

This is Bemo's kit 1004 820 for the württembergische Tssd. A beautiful metal model in 750mm narrow gauge (HOe) with many, many really small parts.

The locomotive can be built as Länderbahn, Reichsbahn, or Deutsche Bundesbahn prototype. I'm planning for the DB version, but maybe should practice metal building skills with the WEG VT 04 first, and definitely will need to get a  magnifying glass for the workbench.

Sunday, July 05, 2020

Untergroeningen: Locomotive Shed (8)

[ part 7 ]

While the ballast dries, I'm working on the floor of the locomotive shed. The idea here is that the floor will be permanently mounted to the module, while the locomotive shed will remain removable, at least for the time being.

The floor will get a concrete look with the rails embedded in the (styrene) concrete. The flangeways need to be quite wide to conform with NEM 340. The single Code 40 rail will provide power to the locomotive. I'm hoping it will be less obstrusive when the floor is painted.

Untergroeningen: Trackwork (4)

[ part 3 ]

In the early 1970's Untergröningen station was more or less covered in ballast and small gravel, which is the look that I'm trying to replicate here. After laying the track, I was quite concerned that I'd have trouble representing the prototype.

However, after I started to sprinkle Arizona Rock & Minerals ballast #1332 around the tracks the concern turned into excitement. The tracks are slightly raised above the base with just a little bit of shoulder. The real rock provides some color variation which helps the overall scene.

This afternoon I finished ballasting the segment and applied Matte Medium to glue everything down. Unfortunately, the alcohol and Matte Medium washed some of the rock dust off the ties and rails. I might come back later with weathering powders to compensate.

For now I need to wait again and ... don't touch until the glue is dry!

Saturday, July 04, 2020

Basic Scenery for Untergröningen (2)

[ part 1 ]

The trackwork for Untergröningen segment three is complete. Time for getting basic scenery done to match the first two segments. The prototype location has a lot of gravel around the tracks. I'm using Woodland Scenics Fine Grey Blend (B1393) for this base layer glued down with white glue.

While I'm working on the segment, I'm watching a cab view video of a freight train traveling from Untertürkheim to Nürnberg via the Murrbahn. It's nice to see the prototype locations. To my horror, I saw that the freight shed in Backnang has been torn down. What a pity, I had planned to take more photos and measurements during my next Germany trip.

Next comes dirt and grass. Fine dirt from the backyard, Scenery Express 2mm Late Summer fibers, with some Noch 6mm Wildgrass fibers for accents.

I don't know yet when I'll build the ramp for the tail track, nor how big it's going to be. I finished the scenery into the right hand corner so that it looks complete. This area will need to be adjusted when I build the ramp. I'll worry about that later.

Here's a view of the current state.

Friday, July 03, 2020

SVL: Raspberry Pi Zero Camera Car with Streaming Video

We're still tuning the software and streaming setup, but the hardware looks feasible.

This is a Raspberry Pi Zero W with the Zero Spy Cam and a Juicebox Zero battery board connected to a 2000mAh Li-Ion battery. A completely self-contained camera setup that easily fits on a HO flat car and can stream video over existing Wifi. If I stack the components more intelligently, it fits on a much shorter car, too.

During the Show&Tell at tonight's club meeting, we demonstrated the setup at the workbench and on the Welztalbahn.

Members on the video conference were able to observe the trip with only a few seconds delay. This worked much better than expected.

So far, so good. The real test will be trying this out at the club.

Wednesday, July 01, 2020

Untergroeningen: Locomotive Shed (7)

[ part 6 ]

With the mainline track in place, I can finally figure out exact placement of the locomotive shed on the module. This also sets the parameters for how much of the loco shop I will be able to build. (Spoiler: Not a lot.)

I tested clearance with the longest car I have, the middle car of a BR 614 DMU. My rendition of the locomotive shed came out a little bit too tall overall. I might have been better off scratchbuilding the building altogether. Oh well, it should still be a fine building once completed.

Because of the non-prototypical curve to the Welztalbahn connector, I had to angle the locomotive shed away from tracks a little bit, which in turn requires a slight S-curve in the track leading to the shed, which -- to my utter surprise -- is also present in the prototype track arrangement. Cool!

[ part 8 ]

Tuesday, June 30, 2020

Untergroeningen: Trackwork (3)

[ part 2 ]

When I planned segment three, I flipped the direction of the crossover compared to the prototype because I figured it would be helpful to have a passing siding on the way to Slim Staging. Let's just say that wasn't such a great idea. It makes switching the ramp cumbersome. Remember, the prototype is (almost) always right. Change the track arrangement only if you really thought it through. Over the last couple weeks, I slowly reworked the crossover, reusing one of the turnouts.

  Here's the segment on the workbench. I'm remounting the Tortoise turnout motors.

Aligning the track on the segment so that I get maximum length and width of the ramp, while not diverging too much from the existing arrangement took a little bit experimentation. Now I just need to fit the curve to the Welztalbahn connector.

For curves I prefer to install the puko-strips the old fashioned way using brass screws in the roadbed on the centerline and soldering the puko-strip to them.

The surrounding tracks rest on a thin strip of cork. I glue the strips to the roadbed to get the same track elevation.

After some fiddling with the track piece, a few swear words, and some patient convincing the curve is properly aligned on the puko-strip, and spiked down.

[ part 4 ]

Wildlife on the Commute: Phidippus audax

Admittedly, my commute these days consists primarily of the walk from the bedroom to the patio.

Friday, June 26, 2020

SVL: Socially Distanced Remote Ops (2)

[ part 1 ]

Tonight was the ops session we have been planning for the last few weeks. Since we are in the middle of a global pandemic, we decided to severely limit on-site attendance, institute social distancing, wearing masks, and try out remote participation.

Instead of the usual 10 - 15 session participants in the layout room, we had only four: A yardmaster for Nowheres, and three engineers. Plus myself for the Internet and streaming stuff. We also had three club members joining us remotely as engineers, as well as a remote dispatcher.

Remote control of our web-based layout panels and locomotives on the layout is easily accomplished using a VPN application that connects remote devices to the club network. EngineDriver's automatic discovery of JMRI's Withrottle Server doesn't work over the VPN connection. Instead, remote participants need to enter IP and port number of the computer running JMRI manually. In our case, port 12090. The control and dispatcher web panels are available at over the VPN connection as well.

Over the course of the afternoon I installed cameras in the layout room. I got two Foscam X1 cameras relatively cheap during a Father's Day sale, and used the IP Webcam app on two Android smartphones as additional IP cameras. All four cameras were streaming video into OBS.

I set up the Foscam X1 with the Foscam phone app: Scan the bar code of the camera, enter wifi information, point camera at phone, add camera to phone app for configuration. I was unable to get the browser interface of the camera to work with Chrome, Firefox, or Safari, but didn't try very hard. In Chrome and Firefox I got and empty page, while with Safari I got at least to the login page, but attempts to login resulted in a failed refresh. I didn't debug this in any depth, and haven't tried with a browser on Windows yet.

The OBS setup is quite simple. For each camera:

  • Add Media Source and give it a unique name
  • Uncheck "Local File"
  • Check "Restart playback when source becomes available"
  • Set Network Buffering to 1MB
  • Input:
    • For the Foscam X1 use rtsp://login:password@192.168.8.XXX/subVideo
    • For the IP Webcam use http://192.168.8.XXX/video
  • Leave Input Format empty
  • Click [Ok]
The video feed shows up in the projector window.  Arrange to liking. I'm using the subVideo feed on the Foscam, since I set the OBS projector to 720p and planned to have 4 cameras on the screen. There is no need to stream HD from the camera if the stream gets downscaled to 360p anyways.

I set up the four cameras to cover as much of the layout room as I could pull off, with the intent to give remote operators as much visibility of the main line as possible, so that they get to see the trains they are running.

OBS can stream to Youtube, which I did for a good part of the session, but the more important feature is to make the projector output visible to the remote participants on Google Meet. I planned to use the OBS VirtualCam plugin, but forgot to restart the browser after installing it, so the OBS Virtual Cam option did not show up as possible inputs for video conferencing, which made me sad. I read that Zoom and Skype had disabled virtual cameras in their applications, so I thought maybe Google had done the same (It didn't. It was just my own stupidity).
I used the Google Meet presentation feature to send the camera window to the video conference instead. Worked fine for me, but not for anybody else. There was a random delay on the window capture presentation stream, between 10 - 120 seconds behind real time. This made it impossible for remote engineers to safely run trains, and put quite a damper on the session. Sorry, guys!

The control stand
I spent the evening in front of computers. On the left is the FRS Radio / Meet gateway. This old Dell laptop runs Linux and has separate microphone and head set plugs, with microphones taped to computer and headset speakers. The 17" MacBook Pro in the middle runs OBS and acts as the hub for all the video streams, including broadcasting to Meet and Youtube Live. The 15" MacBook Pro on the right was my control for the Youtube Live stream.

When we do this the next time, I will set up in the dispatchers office, which has a much more comfortable desk area and comfortable chairs.

This was another step to restarting operations at Silicon Valley Lines. Operations sessions as we know them will not be possible for a while. Some remote participation component will be needed for the time begin.

We confirmed that a remote dispatcher with engineers in the layout room is feasible. However, more work is required to reliably set audio levels to avoid clipping, and improve audio quality. At times, engineers in the layout room had trouble hearing dispatcher instructions. Participants on the video conference heard background noise or buzzing that was picked up by the microphone of the FRS gateway computer. These issues should be addressed by replacing the truly analog audio gateway with a circuit that directly connects headset out / microphone in with microphone in / headset out on the radio, taking into account properly adjusting audio levels in both directions.

We need to confirm end-to-end delay of visual feedback through OBS to remote video conference participants is better when using the VirtualCam plug-in.

The club Internet connection has 24 MBit/s downlink and 5 MBit/s uplink. We found that throughput on the uplink was very variable. I stopped the Youtube Live stream halfway through the session after downgrading quality multiple times to free up more bandwidth for Google Meet. That definitely resulted in improved video and audio quality with less artifacts.

IP Webcam did not work reliably on some phones, while it worked just fine on another phone. On problematic phones the app stopped streaming to OBS on a regular basis. Sometimes the app crashed on the phone. I couldn't find a specific root cause for these problems, but noticed that one of the phones I tried got very warm during streaming.

Finally, we need to build a more compelling remote engineer experience. While the camera setup I put together allows for an ok overview of the layout room, it very much has a security camera feel to it. We will try to make it more reliable, but even then it's at best nice as a novelty.

What we really want to do is to put the remote engineer in the middle of the action. If you can't be there, maybe with technology we can provide an experience that is not possible when standing in the layout room.

Stay tuned.

Tuesday, June 23, 2020

Experiments: FRS Radio Video Conference Gateway

In normal times, Silicon Valley Lines runs one operating session per month. In these times ... not so much. Density of people in the layout room is the main problem with social distancing. Cutting down on the number of people, wearing masks, proper hand santitation, and keeping social distance is a requirement in these times.

What would it take to have a remote dispatcher patched into the FRS radios used by the engineers in the layout room? Video Conferencing solutions like Google Meet, Zoom, Skype, and others bridge the long-distance connection easily. However, how do I connect a FRS radio to a computer?

Should be easy: Connect the headphone speaker of a radio to the microphone in on the laptop, and the line out of the laptop to the microphone of the radio. Not so fast! The voltage levels between line, speaker, and microphone vary quite a bit. It's not just about plugging stuff together with the correct wires, but rather needs some circuitry to translate the signals properly in both directions.

The next idea I had was to connect a headset to the radio, so that I have physically separated places for speaker and microphone, and tape the microphone of a computer headset to the earpiece from the radio, and the computer ear piece to the radio headset microphone. With a headset plugged in the radio automatically goes into VOX mode when turned on. When the radio "hears" something being said, it starts transmitting. There is a delay of 2-3 seconds before radio transmission starts, so people on the "computer" side need to add a couple filler words to all their transmissions. This worked, but volume level from radio back to the computer side was very low and very garbled.

Eventually I found a setup that works reasonably well. I'm using a new cheap ear piece and microphone for the radio side, and regular earbuds for the computer side. The 4-pole 3.5mm jack of the earbuds goes into a splitter cable that converts the wiring to two 3.5mm stereo plugs. The microphone is plugged into a small external denoise adapter and into the computer. I taped the ear piece of the radio side to the microphone of the computer side, and taped the microphone of the radio side to the laptop speaker. The photo above shows the early test setup using a TED talk on Youtube. The volume on the computer needs to be loud enough that the radio starts transmitting, but not so loud that it overwhelms the radio microphone, but with some experimenting the right level was found quickly. A remote dispatcher (or remote engineer) should probably have a microphone close to his month and not use the built-in microphone of their computer.

Participants on the video conference will be able to see the video feed from the layout room and hear the conversation of dispatcher and crews.

I'm still interested in the proper circuitry for connecting the radio directly to the computer, but that's for another time. In addition, at least my Motorola Talkabout radios don't work if they are plugged into a charger, which makes me really sad.

Sunday, June 21, 2020

Untergroeningen: Platform (3)

[ part 2 ]

Taking a break from rebuilding the tracks on Segment Three I decided tonight to paint the platform on Segment Two. I'm using Woodland Scenics Asphalt Top Coat, which is easy to use and has a very pleasing asphalt color. I find it fascinating how a little bit color can change the scene.

A source of frustration in this area was Track One. At the station building the track is embedded in asphalt. Building track embedded in pavement is always a challenge on Maerklin layouts because the center studs get in the way. I've tried various approaches for this in the past (e.g. the railroad crossing in Emsingen). Here I filled the gaps between the ties with very fine sand, leveled it to the top of the ties, and glued it down like ballast. The Puko-Strip from WeichenWalter sticks up slightly above the ties. I was concerned that the difference in texture would be jarring, and that I couldn't get the top of the center studs properly cleaned after painting. However, cleanup was easy and here's Koef III creeping slowly over the track embedded in asphalt. The texture difference is not as bad as I feared and the center studs are barely visible.

Saturday, June 20, 2020


I'm playing with old smart phones as IP webcams, Open Broadcaster Software to stream video to Youtube Live, FRS radio to computer audio, ... This might be going somewhere useful.

Thursday, June 18, 2020

A ride up the hill

I finally got over my internal "Schweinehund" today, hopped on the bike, and climbed the hill at Santa Teresa County Park to the gates of IBM. Even at 7:30am it was impressively warm already. After months of being sequestered at home, the climb was a bit harder than I expected, but the downhill ride makes up for the pain.

There's a nice view of Almaden Quicksilver Park and Mt. Umunhum from the small parking lot at the top of the hill.

Tuesday, June 02, 2020

Untergroeningen: Workbench Chaos

Slowly making progress on segment three. Getting there. Piece by piece.

Monday, June 01, 2020

Kurve: Extension Storage case

Here's a little finger exercise to get my mind off other things going on in this country. A small box connects the rest of the Kurve module to Slim Staging yard. While I built a storage case for Kurve a while ago, today the extension finally got its respective case. I'm using hardboard with glued and stapled strips of wood. I made the case high enough to leave room for some bushes and small trees on the hill as a transition to the trees on Kurve.

The main motivation for building the case is to protect the scenery from damage and dust while the module is stored in the garage.