It’s Alive! 3D Printer Resuscitation

It’s official! I finally managed to get that old Tevo Tarantula Pro (TTP) 3D printer back online. It’s been sitting on the shelf with the new printer for over a year now, useless and just taking up space. With even more recent acquisitions, space is at a premium. I’m to the point where if I can’t get it working, it has to go to reclaim the wasted space.

Thankfully it didn’t come to that. But I was ready to start parting out the old TTP, either to use for other projects or to sell online. If you’ve read this post about its demise, you know it’s been the mainstay of much of our Barkyard “imagineering”. It left us in the lurch when it bit the dust.

The new Sunlu S9+ printer has been a steady source of new prints and inspiration, and continues to pump ’em out, so it’s not like we need another 3D printer. But… We already have one and it sure would be nice if it worked. Spoilers. It does work. As well as it ever did. In fact, it still has that damned offset to the right and the top that I remember!

Hot Off The Presses… er, Build Plate

So What’s The Problem?

Essentially the problem is me. At least the reason it hasn’t been fixed until now is my fault. The original problem was the wires flexing enough that the hot end heater circuit became intermittent, causing a massive clog the hot end just couldn’t recover from. Mainly because I broke everything trying to get it apart.

The reason I say the problem is me is because it took me so long to finally get fed up with the situation and finally do something to resolve it. I tried to put everything together after ordering and receiving a new hot end, back when it first failed, but was never able to get it to reliably PID tune the nozzle heating.

If that sounds like gibberish, it means that any heating related elements need to be “tuned” to function properly, without going into “thermal runaway”, a condition where the temperature continues to rise out of control. The last thing we need is a “fire starter” in the house. We’ll get back to PID tuning in a bit.

Totally Irreparable Hot End

An Incorrect Assumption

At the time, I thought the replacement’s use of inline connectors was causing too much noise for the electronics to deal with and put it aside for later. Later never came. All that needed done was to remove the those connectors and solder the leads together as one solid connection from the heater and thermistor back to the controller.

It was never a high enough priority to choose to take the time to do that. If you’ve ever taken apart the print head of a 3D printer, you’ll understand the dread of doing so. It never goes back together the same way it was before taking it apart. And it never goes together correctly the first time. Or the second. Or the third. You get the idea.

Another problem is where to work on it. Once it’s torn apart, everything has to go back together, working or not. Since I share my workspace with my work computer during the week, I’d have to move it out of the way come morning. That doesn’t leave much time to get things done at all. Starting after supper and working until midnight, maybe 6 hours.

Heavily Damaged Hot End Fan Shrouds

Where Did I Leave Off?

I decided Monday evening to try to figure out where I’d left off way back when, tearing into it after supper. First I had to sift through the “tin” of 3D printer parts. It was an opportunity to sort things together that share a common use, like bowden tube and the related push connectors, and refresh my memory of what all was in there.

I found both the old and new thermistors along with the old heating element. I don’t plan on using it since the new one’s already in place. Using the old one would require taking the heat break and hot end back apart again just to swap them. The idea is to just remove the connectors and solder the wires together.

Next is taking the print head apart. There are several parts that come together to make a complete print head. The main assembly that “contains” everything is the fan shroud with three separate cooling fans, one dedicated to the heat break, essentially a heat sink with fins that it screws to directly. The two others on either side to provide work cooling.

The heat break has a cooling fan so it doesn’t melt the end of the bowden tube or the filament. It’s meant to provide a path to guide the filament to the hot end and nozzle. The hot end, with its heater, thermistor, and nozzle fits into the bottom of the heat break. The hot end is where the solid filament is turned into molten, oozing plastic, and forced out the nozzle.

Heat Break and Hot End Relative to Print Head Fan Shroud

Making Quick Work Of It

Because the hot end parts use connectors, it’s easy to disconnect them and move them out of the way. The connectors are snipped free and the wires stripped in preparation for soldering. Turns out the thermistor that came with the replacement hot end is the wrong one! Well, let’s just say it wasn’t the one the firmware was expecting.

In general, the type of thermistor and its characteristics are “baked” into the firmware when it’s built, at “compile time” as they say. There’s no way to change it once it’s built and loaded onto the controller short of changing it, rebuilding it, and reloading the new version. When I first got it, Nick was the one who built the firmware. Not sure where the source code is now…

After much searching on the interwebs, I found a WordPress page dedicated to the TTP, and true replacement thermistors meant for it listed there. I ordered a set of ten, just in case the original is bad. They’re also replacements for one of Nick’s printers as well. They come with a 1 meter pigtail, so my thought is I’ll just dress one into the harness.

Old Thermistor, Far Left, Out of Focus and New Heating Element Wiring, Center

Change Of Plan

Doing anything with the harness looks like it would be a nightmare. Change of plan. I’ll just use the old thermistor. After all, as far as I know there was nothing wrong with it. I just snipped it out of the circuit back then when I found the predrilled hole for it in the replacement hot end was bigger than the original.

After some fiddling with it and the old hot end I discovered that predrilled hole in the original was deeper than the thermistor was inserted, as if it was meant to rely on the heat being radiated and not conducted through direct contact with it. There was no thermal paste or any other means of conducting the heat from the metal of the hot end to the thermistor.

Thankfully getting the old thermistor in place is as simple as inserting it into the predrilled hole and clamping it in place with the original screw and washer. Soldering the wires back together takes some “fixturing”, but with the help of the “third hand”, I made quick work of it. I even remembered to put the heat shrink on the wires before soldering them!

New Heating Element Wires Won’t Accept Solder?

Make That Change Of Plans

Happy with the relative ease of restoring the old thermistor to the circuit, it’s time to tackle the heating element. Now I know why the thermistor was easy… Because the heating element is refusing to cooperate. Not so much the element itself as the wires connected to it. There’s no amount of flux or heat that will allow the solder to “wet” them!

Now I know why they had connectors! Not sure if it’s aluminum or steel wire, but you can’t get solder to sweat onto either of them. I’ll never understand why any electronics manufacturer would use anything but copper wire. How much money did they save? Those connectors, crimp terminals, and assembly had to cost more than copper.

When I saw the silver color of the wire, I just assumed they were tinned copper. Wrong! As much as I wanted to avoid taking the hot end apart, looks like I’ll have to now. There’s no other way to gain access to the heating element. And just as I feared, I stripped one of the tiny 3mm grub screws in the process!

Print Head Assembled and Wires Neatly Dressed

What’s In The Big Prize Stash?

Of all the small, metric hardware we have, grub screws aren’t in the inventory. Then I remember Nick gave me one of his old hot ends from a different printer. Maybe it has one? Score! It’s a smidge longer, but it should work. Problem solved. Time to solder the old heating element in place.

The red, braided cover is more difficult to “strip”, but the flush cutters manage to cut it back far enough to strip the actual insulation. Lighting strikes twice as I remember to install the heat shrink before soldering again! Time to shrink things in place with the battery powered heat gun.

After struggling with getting the new heating unit out and installing the old one in its place, it’s time to put things back together. That’s easier said than done, but a LOT more than I thought would get done in one evening! It only takes three tries to get everything back together and ready to test!

Giving The Hot End “The Boot”

Third Time’s A Charm?

The first try is a bust when I realize the hot end interferes with one of the work cooling fans in the shroud. Let’s loosen and strip those grub screws some more! The next try is because I didn’t have the thermistor clamped down enough and it just pulled out. Let’s loosen and strip those grub screws even more! Third time better be the charm!

By now I’m using the small needle nose pliers to “cinch” down those grub screws that last little bit. I didn’t realize it at the time, but the nozzle on one of those work cooling fans was cracked and falling to pieces. I zip tie what’s left of it together enough to get the screws in place. Until it cracks and one of the screws falls out!

The other nozzle was totally deformed into a crescent moon shape, pretty much pinching it off. A little work with the heat gun and a screwdriver opens it back up, albeit haphazardly and crooked. I searched for replacements online, but don’t know what those things are called. It will be good enough to test with and at least they’re accessible.

Ready For Initial PID Tune and Testing

The Big Test

Getting everything connected and plugged in and turned on is a big step toward testing the repair, but first things first. Time to do a PID tune on the nozzle heater. This is where the hot end replacement failed the first time around. Had I known then what I know now, this thing would have been working a lot sooner.

So what the Hell is a PID tune? PID is short for Proportional, Integral, Derivative. It’s actually the parameters were tuning for the heating control system. Proportional is exactly what is sounds like, a proportional response to the heater given feedback from the thermistor.

The Integral part is like a long term averaging, so as not to overreact. Derivative is more responsive to the rate of change of the thermistor feedback, the faster the change, the faster it responds. The three taken together allow for a fast response to a given input, without overshooting the value, with small excursions around the setpoint.

Amazing First Time Nozzle Temperature Curve

Absolutely Amazing

It’s incredible how close the thermal response is to ideal the first time through tuning! It’s like this thing was never offline. Without going into too much more detail, many 3D printers use Marlin as the base source code for building the printer’s firmware. The printer is commanded using GCode and Marlin (“M”) commands.

For example, to start the PID tune process, an “M303” command is issued. It takes parameters, like which heating element to tune, what target temperature to use, and how many cycles to run before completion. In our case we’re tuning the nozzle heater, so the command would be: “M303 E0 S210 C10”.

The end result is a new set of parameters to replace the existing parameters with. This should be done any time the nozzle assembly is modified to account for any variations or changes in the heating characteristics. In our case, this becomes: “M301 P40.10 I5.44 D73.92”, where P is the Proportional value, I is the Integral value, and D the derivative value.

The Moment Of Truth

One last thing to do, extrude some filament and verify the nozzle is heating as expected and no thermal runaway occurs. I set the controls to extrude 50mm and it’s looking good! I command another 50mm and… Schmidt! It’s extruding alright, AND PUSHING THE HOT END OUT RIGHT ALONG WITH THE FILAMENT!!!

That’s all she wrote for tonight. The printer is on the shelf and out of the way for work tomorrow. I’m not taking it all back apart tonight. Without new grub screws to replace the stripped out ones, it wouldn’t make any difference anyway. There’s no way to fix this until the grub screw assortment I ordered gets here Wednesday.

Still, it’s very encouraging that everything else is working. None of those problems from the first time around. If there’s a lessons learned from all of this, it’s don’t trust it when they say it’s compatible with your particular brand. It’s not. Another is hex keys and screws are easily stripped with excessive force, especially when they’re small.

A Two Day Wait Just For Two Set Screws

The Suspense Is Killing Me

I hope it lasts… But seriously, the wait for the grub screw assortment to arrive is torture, not knowing if this is really going to fix the printer. It arrived early in the afternoon, so I was able to get right to it once I was done with work for the day. I’ve had this thing apart so many times now I could do it blindfolded. Not that I’d want to mind you.

No way to know if pushing the hot end out caused any other issues until it comes apart. A close inspection reveals everything is clean. For whatever reason it’s giving me fits trying to get that hot end back into the heat break, but in the struggle, I realize the “flat” on the hot end connector appears in one of the grub screw holes. Hmmm…

I wonder if that’s what caused the loose fit? If that flat isn’t close to perpendicular to the grub screw, it may seem tight, but won’t be. Because it threads into the hot end, it’s at a slight angle when the hot end is square to the heat break. This time it gets aligned with the flat and the grub screw tightened down along with the other one.

Drum Roll Please

This print head has been apart and back together so many times, the bowden tube is fighting me now. The way the push in connectors work is they “bite” into the outside of the tube using some type of one way clutch to allow inserting the tube but preventing it from being pushed back out. Only depressing the release ring will allow it to push back out.

Over time, the repeated insertions leave a permanent “ridges” that refuse to push back through that clutch. The only way to fix it is to replace the bowden tube, which is exactly what I did. The connector threads into the top of the heat break and holds the end of the tube tight against the top of the hot end so no molten plastic can leak out.

The old one was a bit short anyway, so now’s a good time to replace it. Filled with new confidence, it’s time to test this latest incarnation. First a PID tune, then the extrusion test. It works! The hot end stays put and I can repeatedly extrude filament! No movement of the hot end whatsoever! SUCCESS!!!

Back To Basics

The next hurdle is to adjust the Z offset, that is to say the offset from when the BLTouch sensor detects the build plate and the nozzle contacts it. This has always been a hassle and a long term struggle to properly adjust that distance. Whether the first layer adheres to the build plate or not hangs in the balance.

Too much and the nozzle crashes into the build plate. Not enough and the first layer just sticks to the nozzle and not the build plate. Somewhere in between is the balance where prints just stick or they don’t. It’s a painful process of cancelled prints and minute adjustments and more test prints.

Until this time. I actually found an article online on how to precisely measure this offset in one operation. Without going into too much detail, the secret is to turn off the “soft limits” that stop the head travel before actually reaching the desired adjustment. That’s the piece of information I’d been missing this whole time.

Probably The Best Test Cube From This Printer So Far!

The Old Standby

With the Z offset within a couple hundredths of a millimeter, it’s time for a test print to see if the printer really works. The good old 20mm calibration cube is the best choice. I don’t want to have to reslice it right now, plus I know it’s worked on this printer in the past, and it only takes 25 minutes or so. Off we go.

I’d forgotten how much louder the stepper motors are on this printer. Definitely spoiled by the silent stepper drivers on the new printer. Not sure what’s different this time around, but it’s the best test cube I’ve ever seen this printer print! No elephant’s foot. No layer shift. None of the artifacts I seem to remember in the past.

I AM ECSTATIC! This is beyond awesome. This is beyond belief. I cannot believe the old printer is back online and working as well as it ever did! I cannot believe I did not do this this sooner! It’s May of 2025 and the printer failed February of 2024. Considering this all came together in a couple evenings, I should have made the time long ago!

A Few More Tweaks

I planned on getting to this point a long time ago. I even bought a second Raspberry PI 4 to control it. It just sat there this whole time, unused and ignored. Thankfully it was already configured and ready to go when I needed it. There’s only one thing that still needs some work. The PI cam. It’s oriented in the portrait mode.

Recently I figured out how to tie into the camera stream using the browser and VLC. So I was a little confused when the Octoprint version was correct yet portrait mode but the streamed version was rotated 90°! A little more digging and I figured out how I managed that.

There’s a setting in OctoPrint for “Classic Webcam” that allows flipping both horizontally and vertically and well as rotating by 90°. Now they’re both rotated 90° and portrait mode! Then I realized the PI 4 controller for the new printer is standing vertically compared to the old one that’s still horizontal and it dawns on me it’s the internal camera mount.

OctoPrint Camera Settings for Stream, Snapshot, and Time Lapse

More Tweaks

The see through case for the PI 4 only has two mounting holes, not four. The problem with that is if the orientation is wrong, i.e. portrait mode in this case, then the only other option will still be portrait. The case itself must be rotated the extra 90°. I designed a new mount for the case back then, but only printed one because that’s all I needed at the time.

So that’s the first real print job for the printer, printing its own vertical PI 4 case mount. I used the original sliced version, but soon regret that choice once I remember the problems it had printing the first time. Not only did it have a brim that didn’t stick to the build plate, the small hole features also cause headaches.

Those small features invariably end up sticking to the nozzle and not the build plate, which ends up grabbing other parts of the print and ripping them free from the build plate, dragging the whole mess along until finally cancelling the print. In this case, it’s something even more stupid, the filament “jammed” on the spool and caused it to stop extruding!

After spooling out nearly 10 meters (~33 feet) of filament, I finally manage to untangle the snag on the supposed “non tangle spool”. It’s hard to describe, but once the tension is released from the filament, an entire layer springs loose and somehow the other wraps manage to overlay the loose end. This traps it beneath them once tension is restored.

Unfortunately, the more tension, the tighter it pulls down over the end being fed to the extruder. May as well tie it in a knot at that point. The extruder actually pulled the spool off the counter, filament dryer and all! The extruder drive gear nearly ground through the filament when it stopped spooling out.

With the rewound spool in place, I extrude 200mm of filament, 50mm at a time, to ensure it didn’t cause a clogged nozzle or other issues with the extruder. Not sure why this particular spool of white PLA is so snag prone, but it’s jammed twice now, once for the new printer and now once for the old one.

Even More Tweaks

Back to the drawing board, or in this case, SketchUp. Once I finally found the original design on disk, I made a quick change to put down a solid first layer, then draw the small features on top of that. If the first layer isn’t sticking, there are other issue that need addressed. But this trick has worked for me on other designs, e.g. Run In Stands.

The nice thing about new STL is I can slice without the brim. In fact, I don’t even need a skirt! Another trick I learned from the new printer is how to add enough of a “primer line” to the startup GCode for every print. Essentially it moves to the edge of the build plate and extrudes two thin lines, side by side, enough to ensure the nozzle is flowing.

The skirt accomplishes the same task, but sometimes doesn’t stick and causes more problems than it solves. Those primer lines are just enough to gets things started. The next print is a success, but I realize that the nozzle temperature in the slicer was still set to 200°, not 210°. It’s not going to hurt this print, but I fixed it for next time.

Next steps are to glue the freshly printed PI 4 mount parts together and replace the existing mount with the new one. I’ve described the process in detail elsewhere, but the short version is I use a liquid acrylic solvent to “weld” the PLA parts together, similar to styrene cement for building plastic model kits or PVC cement for plastic plumbing pipe.

In similar fashion, the best strength is obtained obtained in 24 hours, so I let the new mount assembly set up overnight then swapped it out with the old one the next morning. I had forgotten how much I detest those mini tripods I bought all those years ago. At the time, I thought they’d be useful for my job, but they didn’t work out.

Instead they ended up here at home and holding up the PI 4 controllers for both the 3D printers. They’re study enough, with telescopic legs to adjust to unlevel surfaces, but the ball “joint” that allows the camera mount to swivel is way too loose. No matter how hard I cinch down on the set screw’s stupid little plastic handle, it ALWAYS ends up loose again!

The PI 4 Case on the New Mount on the Annoying Tripod

The Final Tweaks

Guess I should stop complaining about it since it only matters when I tell OctoPrint to capture a time lapse of a print. Even then unless I fabricate some overly complicated “Extendo Mount” contraption to hold it further away and higher off the build plate, the capture is too close. The PI camera for the new printer is an 8MP version, but the setup could be better.

The PI camera for the old printer is an older 5MP version that has problems with low light. Even with the bright office light in the ceiling fan on, the time lapse still looks dark. There may be some other settings I can adjust in the Linux OS itself, but since I don’t usually capture a time lapse anyway, what’s the point?

The last thing I want to figure out is why prints on the old printer are ALWAYS offset from the origin, the front left corner of the build plate. I would usually take this into account when slicing, but it’s not an exact science. When I was printing the “Glow In The Day” clocks, they were sized to require nearly the entire build plate and nearly impossible to adjust.

The Offending Setting Causing Those Blasted Offsets

Even more Googling reveals it’s the Cura slicer and not baked in offsets in the printer’s Marlin firmware. In fact, I tracked it down to the actual settings file Cura uses when it wouldn’t let me update the offset values. Turns out they’re not actually “offsets” at all, but rather print head dimensions to the corners measured from the nozzle.

The default print strategy is to print the first layer of copy 1, then first layer of copy 2, then second layer of copy 1, then second layer of copy 2. The sole reason for those settings to exist is to allow printing multiple copies of the same print to finish sequentially, i.e. completely print all layers of copy 1 then completely print all layers of copy 2.

Unfortunately, when  the “Apply Extruder offsets to GCode” is checked, the slicer automatically adds those printhead offsets to the actual GCode values when slicing. This is so the printhead can avoid collisions with the other print(s).  Not sure where to tell it to print each copy sequentially, but I don’t plan to use the feature anytime in the near future either.

To be sure I re-sliced the test cube and moved it as close to the front left corner as possible. Both the slicer and OctoPrint appear to have built in safeguards to avoid printing outside the edges of the build plate. Looking at the GCode it leaves us about 5mm away in both X and Y. The closest I can get is 1.999 x 1.999 away from the origin (0, 0).

Finally Figured Out How To Get Rid of That Blasted Print Offset!

The Final Tests

A quick test print of the re-sliced calibration cube shows it’s right there at the front corner. It also clearly shows the slicer settings leave a lot to be desired compared to those used to slice the earlier near perfect print. In the Cura slicer there are really too many settings to display all at once, but there’s a way to select which settings are visible.

I need to figure out what those settings were that used to visible to fix that extra buildup of plastic at the corners and the ridges where the infill meets the walls. Also looks like there was some under extrusion on that top layer. This cube looks terrible compared to that first blue one. Another possibility is this is a different filament.

Those tweaks will have to wait until after the real final test print though. Printing the PI mount was a good test, albeit a short one at just shy of an hour, but the true test is the one that takes 6 hours or more. For that we’re printing the last eight run in stands I need for the Mikado’s tender.

That calls for a new slice since the standard one I use has only six and takes more than 5½ hours on the new printer. Had to laugh when the slicer told me 4 hours! The curious thing is it took about the same amount of time to print eight of them on the old printer as it did six on the new one. Ironically, the new one is supposedly faster than the old one.

Printing The Run In Stands

There must be another hidden setting I’m neglecting because all the print speed settings are the same between the two printers. I did notice it seems like the old printer is moving faster than the new printer using the same slicer settings. Guess it’s time to push the new one to its limits just to see when prints start to fail. Maybe an overall acceleration limit?

That’s a problem for future me as they say. For now, I’m thoroughly pleased with the performance of the old printer. It’s everything it used to be and nothing unexpected. I take that back. I did run into something unexpected when trying to narrow down those offsets. The X and Y range is supposed to be 240mm, but the Y axis hits mechanical limits at 230mm?

Unexpected Discoveries

I remember when Nick and I originally put this together we had to move the Y limit switch just past the end of the one mounting screw to where is was just holding on. Maybe that center rail the print bed rides on needs adjusted away from the front panel? There may be another 10mm to be had. Hopefully there’s an extra 10mm in the timing belt too.

The X axis looks like it could go on forever. Well, at least until it reaches its mechanical limits, well past 250mm anyway. The limiting factor at this point is the flexible metal build plate, limiting the build area to about 232mm, maybe 233mm, in both directions.

I tested the Z limit of 260mm as well, but both the harness and bowden tube to the print head contact the top crossmember well before that, before 240mm anyway. I doubt I’ll ever be printing anything that tall, but if I do, that’s what the new printer is for. Its build volume is 310mm x 310mm x 400mm.

For now it’s working, and working as well as it ever did. Considering the limits of the build plate, I’m not going to take things apart just to get that last 10mm out of the Y axis when it’s more like 2mm-3mm to be had. I’ll use the big printer. It’s quicker and easier. Well, it will be quicker once I figure out the slicer settings!

Thanks for tagging along and stay tuned for the next adventure.

 

 

 

 

 

 

Adding I2S Sound

Another Project?

Yes. Another. Project. And no, it’s not yet another passenger car lighting project! I can hear you rolling your eyes from here…

This time it’s about adding sound to anything that you please using an Arduino ESP32-S3 Super mini and an I2S amplifier. But I’m jumping the gun here going on about the specifics already. Let me start at the beginning, with a little history on our “sound projects”…

A Little History

We started looking at “sound enabling” our equipment years ago. January of 2020 to be exact. The idea was to couple an Arduino and one of those “cheap” MP3 player modules as a low cost sound option. When compared to the cost of retail sound offerings available, often for hundreds of dollars or more, the motivation is obvious.

Long story short, those “cheapo depot” MP3 DFPlayers turned out to be absolutely unreliable. Nothing but junk. No amount of tinkering or tweaking could guarantee operation without having to “ruthless reset” everything. We ended up mothballing the project indefinitely. Well, at least until I could find a more reliable solution.

It was quite an effort to get as far as we did, but it left us with a reusable software implementation based on the concept of a “playlist”. The backend (Arduino) serves up the playlist in JSON format to the front end, a browser based user interface (UI), served up via WiFi from files stored on the backend.

MAX98357 I2S decoder amplifier
MAX98357 I2S decoder amplifier

New Found Motivation

Enter the idea of the I2S interface. Not the I2C interface. I2S, short for Inter Integrated circuit Sound, developed by Philips back in the ’90s for stereo equipment interconnections to share audio streams between components, both internal and external. The more I read about it, the more I was convinced this was the solution I was looking for.

Being the electronics and audio buff I was growing up, I’m surprised I hadn’t heard more about it at the time. Late to the party, I found some folks online using various I2S audio decoders in their projects and settled on the MAX98357 based decoder. It has a built in 3W amplifier, with a somewhat odd 0-21 volume range, but whatever. At least it works!

But I’m skipping ahead again. While the Maxim hardware does everything for us, it requires a LOT more horsepower from the Arduino to handle converting and the streaming the audio data to the decoder hardware. When I say a LOT more horsepower, I mean at least an ESP32-S3 (dual core) to handle the load.

ESP32-S3
ESP32-S3

Time To Order Parts

I’ve never used an ESP32-S3 so I don’t have any to experiment with. Don’t have any of those Maxim decoders either, seeing as how I’m just now reading about them. While the Arduinos I’ve been using aren’t a dime a dozen, they aren’t ten dollars a piece either. They’re roughly twenty dollars for three of these “high horsepower” ones.

The Maxim decoders are about five for fifteen dollars. The only thing missing is an SD card reader. They may make an Arduino package that has one already included, but I haven’t looked for one (yet). I found five for $7.50. So far grand total of $7 + $3 + $2.50 = $12.50! That’s not including the micro SD card to store the sound files on.

That’s an order of magnitude (10x) less than the retail price of a low end sound system! Last time I bought a 32GB micro SD card was years ago, but it was ~$7.50. So let’s say $20 vs. $200. Sold! Thinking about it, maybe there’s a version with enough flash storage onboard to eliminate the need for a card reader altogether. Depends on the number and size of the files I guess.

The next step is to bring that old MP3Player project out of mothballs and see if we can breathe new life into our aspirations for sound.

What’s Next?

Time to start working the old software into a new project to meet our needs. The old project is one of the older ones and doesn’t have any of our latest improvements, like themes and OTA progress indication. But the first thing to do is get rid of the DFPlayer stuff, then update to using LittleFS in lieu of the old SPIFFS library.

I’ll try not to get into too much detail about the software, but that’s what we’re talking about, so… If you’re not familiar with Arduino speak, the Serial Peripheral Interface Flash File System (SPIFFS) is deprecated. The replacement recommendation is the Little File System (LittleFS). This is used to read files like the HTML web files (internal flash) and sound files (SD card).

Those libraries are “built in” to the specific Arduino hardware platform, unlike some of the others we use, like ArduinoJson and I2S_Audio that perform specific tasks regardless of platform. Fortunately, this sketch doesn’t need much else beyond those and the WiFi libraries.

Eventually the code we use to encapsulate the audio functionality will have its own library, but for now it’s part of the sketch to ease debug. Thankfully most of the playlist handling code doesn’t need much modification. Really the only “major” change is implementing looping in software where it used to be hardware driven with those junk MP3 modules.

Sounds Easy Enough…

The software is already pretty close, at least the UI code is, sans the equalizer settings. The looping is “commented out” until the backend Arduino code gets updated to implement it in software. The messaging piece is already there, it’s just adding the logic necessary to emulate what the old hardware used to do for us automatically.

The neat thing about the existing backend code is it already responds to event messages from the old hardware when the previously played track finishes playing. It should be easy enough to substitute the event processing for the new hardware, tracking the current looping mode to determine which track is next, if any.

Most of the effort on the UI is getting everything updated to use the latest improvements, which involves comparing the older existing code with current versions from other projects, like OiffceLighting, LithoPhaneLEDs, and PassengerCarLighting2812. We added two new themes for PassengerCarLighting2812 recently, highlighted in the Latest Evolution Lighting post.

ESP32-S3 Super Mini
ESP32-S3 Super Mini – Small Enough For The Latest Evolution Projects

Development Concerns

While we’re talking about adding themes, that brings up another “issue” with using Arduinos, at least when it comes to uploading files to them. The Arduino IDE, with the proper uploader installed, will upload all files in the “data” folder to the flash file system on the Arduino. No problem there as long as you can find and install the proper uploader package.

Right now each and every project has to have its own “data” folder with a “themes” subfolder in it. Any change, or in this case addition, in any one project must now be manually propagated to every other project to keep everything in sync. Similarly, all the CSS and javascript files suffer the same fate. Basically any shared common files.

There may be a way to use symbolic file links in place of the actual files, but I haven’t tried it yet. Hopefully the IDE won’t have problems with the file system interface using symbolic links. If that works, it will allow one set of files to be maintained and all projects can link to that “master” set. But let’s get this deployed before we go mucking around with something else…

Some More History

Just a little more. I promise. If you want A LOT More History, I’ve tacked it on the end of this post.

We started on this latest adventure going on six months ago as of this writing. But I let myself get sidetracked with other projects, Hurricanes, etc. You name name it, I got distracted by it. Some of those distractions were acquisitions and the ensuing investigations of their installed electronics, like battery power and sound systems.

The I2SAudio project was put on the back burner for at least a few months while all that was going on. But all the basics were there and working. We’re able to play sound files stored on the micro SD card from the UI. Only dynamically building out the looping buttons based on the playlist was left to do.

Past tense. That’s done now too. That leaves expand/collapse of the playlist in the UI. I swear I have code somewhere from past experiences with a javascript/CSS based “twisty” implementation. I’m hoping that I can leverage it, but like most things in my favorite place, somewhere, it will never be found quickly nor easily.

Making More Work For Myself

Defeated by wasting time looking for it, I tried yet another internet search. Unlike the first few searches that turned up nothing useful, encouraging me to look for that old code, this one came back with a new HTML5 construct I didn’t even know existed. The <details> and <summary> tags provide a built in expand/collapse function without the need for code behind it.

At first I thought this was the quick and dirty way to get there from here. WRONG! The entire playlist tree in the UI is built dynamically from the playlist data received from the backend. Using nested HTML <ul> and <li> elements, we build the hierarchy one entry at a time. Each <li> element has a <span> that contains the actual “name” of the entry in the tree.

All these elements are given a specific CSS class to correctly render in the browser. Without going into too much more detail, it’s important to note that any selection clicks made in the UI on any of those elements in the playlist tree get “bubbled up” to the top level element, in this case the top level containing <ul> element.

Why does this matter? Because now in the javascript event handler we have to figure out which one of potentially hundreds of elements was clicked on, then backtrack and modify the CSS class of the affected element(s) to indicate selection visually. Before adding the new elements, this boiled down to one of the three element types already mentioned. And it worked. Past tense.

Why Did You Break It?

After modifying the javascript dynamic generation function to add the new <details> and <summary> elements, all of a sudden NOTHING WORKS! So here we are weeks, if not months later, still fixing the “quick and dirty” way. But at least it’s working now. Even the CSS needed modifications to work with both versions.

I commented out the old, working version of code as I progressed with the new version. Boy am I glad I did! I went back and made it selectable using a single flag to indicate whether to use the old or the new version. My thought is maybe I’ll come back to this some day and figure out how to make it all work without the newer HTML5 constructs.

So why in the world would I want to come back and redo this, potentially breaking everything yet again? Looking back at how each level of the hierarchy needs more and more of these <details> <summary> blocks, it’s apparent these were meant to hide large blocks of HMTL, most likely upper level <div> element containers, not each and every nested element of a tree.

I’ll spare you and save those particulars and details for later. At this point, the only thing left to do for the existing UI is figure out why it stops selecting down to the lowest level for all child items except the first child of the parent selection. What did you just say? A picture is worth a thousand words…

I2SAudio UI Screen Shot
I2SAudio UI Screen Shot Showing Only First Group Completely Expanded

There, I Fixed It

Well, not really. That can wait until we know this is really the UI paradigm that best fits what it is we’re trying to accomplish here. What you see is essentially an MP3 player interface, with play, pause, stop, next, previous, etc. There’s also a set of looping selections, based on the top level selection, in this case Genre, Artist, Album, or Track.

But those “classifications” don’t really fit either. Function type seems more suited for Steam Whistles and Diesel Horns than Genre. Not sure how to classify Single Chime vs. Three Chime, but Artist isn’t it. Road Name seems a better fit than Album for C&O vs. CN. Track may fit, kind of, but I think you get the idea.

The good thing is these classifications are all easily configurable as part of the playlist. But keep in mind for every new classification, there must be a corresponding addition to the CSS to accommodate it.  The other thing to keep in mind is they can also be directly tied to the currently selected theme settings, like the “Teal Mobile” theme used in the above screenshot.

A New Look?

Regardless, the UI is going to need a facelift moving forward. Now what that should like like, I have no idea. Guess I need to look at some of those sound systems on the market to get an idea what theirs looks like. But even then that may not be the best fit for our application.

When it’s all said and done, we have everything we need in place whenever we finally figure out what it’s supposed to look like. Most of the commercial products I’ve seen tend to break up sounds into an intro, sustain, and ending portion, stringing them together, starting with the intro, then looping the sustain part, and finally play the ending to finish up.

Not sure how “quill” will work, but that’s a problem to solve another day. I’m sure there are other “features” we’ll need to add as we go, but for now we have a reliable, extensible solution. With that in mind, I’m wondering if we have the capability to play two tracks at once.

Stuck thinking in that MP3 player mindset, I just issue a stop, then play a new track. Wonder what happens if I don’t stop the currently playing track? I did a deep dive into the library code already to see for sure what was going on for other issues I ran into, but it would be easier to just modify my code and see what happens. Probably a kernel panic!omg lol

 

A Look At The Hardware

Originally just an ESP8226 was used for the MP3Player project, more than adequate to communicate with those POS DFPlayer modules over a 9600 baud serial connection. But even that simplicity was unreliable, or rather, the modules themselves are unreliable.

Fast forward to now, using I2S audio technology, proven over decades. But there’s a price to pay when it comes to the control side of things. Beyond the extra horsepower, the full sized ESP32-S3 is a sizeable piece of hardware, consuming nearly an entire half sized breadboard. In fact, to have space for anything else, we used two of those half size breadboards side by side!

The ESP32-S3 module itself is stout enough to hold the two breadboards together once plugged in. There are only two other components required, but to be sure there was space for them AND the connections without having to run half the connections under the Arduino, two side by side are better than one.

I2S Audio Breadboard And Size Comparison
I2S Audio Breadboard And Size Comparison, “Super Mini” vs. Full Size Dev Module

The full sized S3 module is labelled with an abbreviation of the project and its last IP “triplet”. This is absolutely necessary for me to keep my sanity. When “rooting” through a box of old projects with probably a dozen Arduinos inside, it’s maddening having to plug in each and every one just to see what it’s running and what IP to use in the browser.

The two purple modules are the actual I2S decoders, one for the left channel, one for the right. Notice only one is connected. That’s because the decoder can also combine both channels into a single mono output as well. Good enough for what we’re doing. The actual formula is (L + R)/2. The mode is selectable with a single input, left, right, or both.

The blue module standing up next to the speaker is the micro SD card reader. All the audio files are stored on a 32GB micro SD card. The S3 reads the files and converts the audio to an I2S stream that the decoders turn into audio output to the speaker with over 3 watts of audio power! More than enough for our needs.

The speaker is a leftover from one of our Bachmann Ten Wheeler projects. We replaced the old tender bottom half with a new one, complete with “updated” electronics for chuff sound. Still the same tired old 9V hiss generator connected to a chuff switch… That only activates twice per revolution. Not very realistic, but at least the new red painted wheels look nice.

In any case, the speaker in the old bottom half became a “spare”. IIRC we ended up with at least three if not four “spares” this way. I designed and 3D printed the speaker enclosure, hoping to give the tired old 1W 8Ω speaker a fighting chance to sound good. It helps, but with its limited response, there’s not much else that can be done.

Something’s Different

You may have noticed a difference between the full sized S3 and other Arduinos, the number of USB connections. One is the standard Program Upload and Serial Monitor port. The other is for JTAG debug. JTAG is short for Joint Test Action Group, which defines a means of getting “inside the hardware”, essentially allowing the equivalent of attaching test probes inside the chip.

Apologies, that’s a very dumbed down explanation of a fantastic innovation in hardware development, also proven over decades. We won’t need that low level debug ability. At least, not yet. More pertinent to our discussion is which is which? The one that works is the one we’re looking for. Just that simple. The other is enabled and configured using the board settings.

The obvious difference with these “Super Minis” is their size. They’re so small it presents a problem when labelling. There’s no big metal can to stick the sticker on. Haven’t tried it yet, but probably have enough room on the back for a sticker. They also run hot to the touch. Hotter than their full size counterparts for sure. Beware.

That’s Not The Only Difference

Another difference with these S3s, and even the ESP32-C3 Super Minis, is the actual board selection. They only have one USB port, but good luck finding the correct board for your particular flavor of Chineseum. Nick had ordered a set of the C3 and S3 Super Minis and gave me a sample of each.

Even though the silkscreen on the C3 says it’s a specific type, selecting that type in the Arduino IDE board manager does not allow me to communicate with it. It also causes build errors that go away when selecting the generic ESP32-C3 Dev Module. What’s interesting is there are contact pads on the PC meant for “pogo pin” connections.

The C3s I bought have more contacts than the one Nick gave me. It’s a crap shoot when dealing with any of these “dime a dozen” Chineseum parts regardless of where they’re sourced. It would be helpful if the competition to mass produce knockoffs of knockoffs to make of profit didn’t make it impossible to get anything more than basic information, let alone good information.

That’s the nature of the beast. It would be different if paying more for quality actually worked in this case. Been suckered by that before with these things. About the only way for me to know is if they can be trusted is to order from an Amazon seller I’ve dealt with in the past that I feel can be trusted. Sometimes even that isn’t enough. Caveat Emptor.

What’s A “Pogo Pin”?

These were designed in the ’70s for testing integrated circuits and other micro circuits. Basically they’re a spring loaded pin the provides positive pressure on a mating contact pad. I hadn’t seen them is common use until using a Raspberry PI Zero. The I/O is limited on the PI Zero, but an expansion board can provide more USB connections.

The expansion board “piggybacks” on the original PI Zero, making connection via pogo pins on the expansion board that mate to a set of built in pads on the PI. These Super Minis are the only other commercially available products that I’ve seen them on.

That’s not to say you have to use pogo pins to make the connection. It’s just another solder pad, it just doesn’t have the plate thru hole. You can just solder wires directly to them, but be sure to strain relieve the wires. Don’t depend on the pad to hold the wires in place or you’ll find yourself in the situation where the pad got lifted off the board and went with the wire.

 

The Particulars

If you’re already familiar with HTML, feel free to skip over this. For those unfamiliar with HTML, it’s basically a page description “language”, a means of describing a page of text, images, graphics to a browser and how to present the various elements of the page, even dynamic elements like Data Driven Documents (D3). We use that to display current sensor data for our block controller.

With Cascading Style Sheets (CSS), we can tell the browser what colors to use, what font/size/color, whether to left, center, or right justify, etc. for every element! Javascript adds another dimension of dynamic interaction between the page and browser without the need to reload everything from the web server for every action, even override the default event handling.

We’ve mentioned a number of HTML elements used. I think the <details> and <summary> tags are self explanatory, but one item of note is the <details> tag has an “open” attribute that, when set, expands to display everything between the <details> and closing </details> tag. Otherwise, just the items between the <summary> and closing </summary> tag are displayed.

More Details

A division tag, or <div>, is a sort of container, meaning everything between the <div> and closing </div> it to be treated in a similar fashion. Generally it will have a CSS class or classes associated with it, sometimes even an id. The corresponding CSS  describes how to present these items to the browser, even whether to display or hide the entire division.

The unordered list <ul> and list item <li> tags are a means of grouping similar items together, like a list of bullet points. CSS can describe exactly whether you want bullets, squares, triangles, or nothing at all in front of each list item. Unordered simply means it’s not a ordered (numbered) list <ol> type, which has it’s own styling settings.

Each list item can have its own child element(s), like the <span>, or even another unordered list, with its own list items, in nested fashion. Each level in the hierarchy can have its own presentation style described with CSS. For example, present the highest level items with a light red background color, the next level down as light yellow, the next light green, the last light blue.

Even better, CSS can tell the browser to invert the item when “moused over”, swapping the color of the background and the font, without having to write javascript event handler code to monitor for when the mouse is actually over the item. Same with currently “focused” items. More complex CSS “selectors” can provide finer control over browser actions.

Developer Tools

If you’d like to learn more about HTML, CSS, and javascript, there are plenty of resources available online for free. For example, W3 Schools, has tutorials for just about anything you’d like to learn about coding. I find it to be an invaluable tool for HTML, CSS, Javascript and jQuery, Python, SQL, etc.

If you’d like to see what’s happening “under the hood” of your browser, try opening the “developer tools”. Each different browser has its own way to enable this mode, but in Chrome, my browser of choice, simply press the F12 key. I use it to monitor and debug my code ALL THE TIME!

Here’s where I spend most of my time when adding and troubleshooting new features. The screen shot shows the developer tools inspecting the javascript “Console” log. Starting at the top, it captures the tail end of the Connect message response from the backend, including the playlist and themes data used to build the UI presentation.

I2S Audio UI Developer Tools
I2S Audio UI Developer Tools Example For Javascript Console

Below that is the beginning of parsing the JSON message into actions and dispatching to those specific action handlers. The repeated “WebSocket.js:254” message demonstrates the looping behavior as each new action is dispatched, in this case power, then version, then volume which is dispatched to its corresponding handler.

It lives at “WebGenAudio.js:108”, or line 108 in the WebGenAudio.js file. This handler was “registered” with the main WebSocket.js handler for all web socket communication between the front end (UI) and the backend (Arduino). The power and version messages are common to every project because they all have a Power button and a software version field in the Settings.

Not every project uses audio though. All the audio related processing is contained in the WebGenAudio.js file. Similarly, all themes based processing is contained in the WebThemes.js file and again, action handling for themes is registered with the main WebSocket.js web socket handler.

This amount of information ion the console log is obviously very verbose. Not to worry, there are a number of predefined “log levels” that are turned on or off with the flip of a “switch” at the top of code. Turn them on as needed to troubleshoot then turn them off for “production” code.

Styling Tools

All the audio related styling is contained in audio.css rather than clutter the main.css file with styling only useful to audio projects. The themes module has a livery.css file to describe the various color choices available. It is included by the main.css by default, available to all subsequent styling files.

This is deliberate and part of our modular architecture. If you want it, include it. If not, don’t. Themes is really the only “baked in” choice, but if not wanted or needed, a default livery.css file can be provided or its inclusion in main.css removed altogether.

The developer tools allow you to view all the HTML elements AND their associated CSS styling in the HTML “Elements” tab, just to the right of the javascript “Console” tab. The secret magic trick to using Elements is the “select” tool at the very left of all those tabs. Click it to enter select mode, then go and click on the element of choice and it will take you to that part of the document.

If you don’t make a selection then wonder why clicking isn’t working the way it should, it’s because the browser is still in select element mode. Click the “select” tool again to exit selection mode. Don’t ask me how I know…

I2S Audio Developer Tools Elements
I2S Audio Developer Tools Elements – HTML And CSS Selectors and Properties

CSS Selector Tools

Earlier I mentioned CSS “selectors”. Essentially these are a shorthand for telling the browser, when you see this, do this. For example, we generally assign the “button” class to a button declaration in the HTML source file. The corresponding selector would be “.button” in the CSS file.

If different buttons have a different id, e.g. id=”play” vs. id=”pause”, then “#play” and “#pause” would be the corresponding CSS selectors. These are simple examples, but there are much more complex selectors available, like providing a visual “highlight” when the mouse travels over an element or dimming a button when it’s disabled.

We use these constructs and even more complex ones to transform those awful looking default “radio” buttons like like the classic car, old style radios with mechanical pushbuttons. We even override the awful “File Upload” to match all our other button styling. And it’s all done with a CSS definition. And it’s all handled by the browser! NO OTHER CODE REQUIRED.

The developer tools Elements above displays both the selected element HTML, and its associated style information below in the “Styles” window, including the selectors used to determine how to present it. You can even poke and prod values into the element style to play with various settings without having to edit, save, and reload the page. Very powerful and I use it quite a bit.

 

A LOT More History

We started looking at “sound enabling” our equipment years ago. January of 2020 to be exact. The idea was to couple and Arduino and one of those “cheap” MP3 player modules as a low cost sound option. When compared to the cost of sound offerings available, often for hundreds of dollars more, the motivation is obvious.

If I can throw together something acceptable feature-wise for a handful of dollars, it’s a no brainer. The emphasis here is a fairly limited feature set. The cheapo depot MP3 player modules are meant for one thing, and one thing only. Controlling an MP3 player with a minimum parts count.

It provides a built in amplifier with 30 level volume control to directly drive a speaker, and it is LOUD! It also has a micro SD card slot for storing the music files, inaccessible from the Arduino using a dreadfully slow and antiquated 9600 baud serial connection, and a minimal interface for standalone operation via a handful of external components. And they’re JUNK!

Originally just an ESP8226 was used for the MP3Player project, more than adequate to communicate with those POS modules over a 9600 baud serial connection. I remember owning a number of 9600 baud modems back in the ancient times, but seriously, that’s how bad those modules were to work with.

If you’ve ever lost a 9600 baud modem connection back in the day while downloading a file, and had to restart all over again when it happened, you know how unreliable they are. Same with these modules, with the same lack of warning.

ABSOLUTE JUNK!!!

That’s right, these DFPlayers are ABSOLUTE JUNK!!! After spending months on end working with these things, it was apparent they would NEVER run reliably. If there is a way, I certainly couldn’t find the magic combination of software and hardware to make them work without constantly getting into a “zombie” state.

Once they’re “zombies”, the only way to bring them back to life is a hardware reset. It appears that the digital noise from the Arduino side of things is just not conducive to reliable operation. I never tried them in stand alone mode, but then again, that’s not the mode of operation we require. I’m not building a “Walkman™”.

It wasn’t all wasted effort though. I did eventually manage to create a workable user interface built around their feature set, and some of those features are rather impressive for the price, like built in equalizer modes, e.g. Classic, Rock, Jazz, etc. Another useful feature is the looping capability. Now if they just worked…

Mothballing The Project

It was quite an effort to get as far as we did, and it left us with a reusable software implementation based on the concept of a “playlist”. The backend (Arduino) serves up the playlist in JSON format to the front end, a browser based user interface (UI), served up via WiFi from files stored on the backend.

The UI relies on HTML, CSS, and javascript to render a modern presentation. The playlist is presented in a hierarchical “tree” fashion, e.g. Genres, Artists, Albums, Tracks. The front end communicates with the backend via a “Web Socket” connection, essentially a bi-directional communication channel that “sits on top of” the HTML connection.

But unlike the HTML connection, immediate updates to the UI can be made without having to “refresh” the page and wait for everything to load, all the files served from the backend again. A “click” to play a track from the playlist in the UI is sent via the web socket to the backend, it starts playing the track, then responds to the UI to keep things in sync.

 

Gratuitous Starship Troopers Reference FTW!

Want To Know More?

If you’d like to know more about this or other Barkyard RR projects, leave us a comment! You’ll need to create a user first though. In this day and age, it seems like every grifter and con man is constantly spamming sites to the point where we’d spend more time moderating the comments than doing anything useful. We hope you’ll understand.

The only way we have to get around the spam is to ask for a verifiable email address. Until you verify your address, your account remains in limbo, so to speak. We’re not selling your data, that’s not why we’re here. We’re not “monetized” in any way. But if you’re concerned, please refer to our privacy statement.

If you’d like to see more of this type of content, please let us know. If you’d like to get a look at the sketch code or the web page code or need links to what parts we’re using or just have a general observation, please, feel free to drop us a comment. We’ll get back to you as soon as we can.

If that isn’t your cup of tea, then use the Contact Us page. You’ll still need a valid email address though, especially if you want a response! This will take longer since we have to actively moderate submissions vs. the automated user account and email activation handling.

Thanks for following along. Stay tuned. We’ll have more soon!

 

Latest Evolution Lighting

This will be a combination lighting controller and latest acquisition update. It all started when I was searching for a USA Trains GP9 like the one I bought years ago. When I bought the SD40s, I also bought some spare trucks, with the idea of modifying the 4 axle GP9 into a 6 axle SD24. When I first bought the GP9, they were plentiful. But now that I want another, good luck finding one!

The same thing happened with the 2-6-6-2 Mallet. What used to be plentiful was no longer available anywhere. Perseverance paid off. I finally managed to find the Mallet, but so far, no such luck with the GP9. What I did find was a Bachmann full baggage car for both the green and creme “Pennsylvania Limited” set and the B&O “Royal Blue” set.

I was always somewhat disappointed that there were only two cars with our first B&O “Royal Blue” set, so I was really excited to see there was another car that matched them. Beyond that, the three green and creme “Pennsylvania Limited” cars were obviously matched, right down to the combination car only having the creme for the passenger half.

Royal Blue Baggage Car
Royal Blue Baggage Car

But that left the two solid green LGB coaches looking like oddballs sitting ahead of the combination car. Now with the full baggage car, it will balance them, perhaps as economy coaches? Or the three matched cars can be used for one train while the solid green full baggage and two solid green coaches can make up another train.

Pennsylvania Limited Baggage Car
Pennsylvania Limited Baggage Car

More Acquisitions?

Regardless, half of them have our next gen lighting controllers installed, and the other half don’t. In fact, the last car I installed the latest version in was the combination car. I had replaced the existing oversized battery box installation with a smaller version that fit entirely in the original 9V battery case. But let me back up and explain where I was going with that.

The 3D printed ones work just fine, but we don’t really need 11 – 12 hours of continuous operation. That means we don’t really need that size battery either. Some of them boast 2800mAH while others just 2000mAH, that is to say they’re labelled as such. Then again, I’ve seen 2000mAH 18650 cells labelled and sold as 5000mAH too.

The oversized, 3D printed battery box that replaced the original 9V battery case in the first and next gen designs was specifically designed around that battery size (654065, or 6.5mm x 40mm x 65mm), just slightly bigger than the outline of the original 9V case. So the thought is what if we can find a smaller battery that will fit, along with the electronics?

Oversized Battery Box
Oversized Battery Box

I found a number of smaller batteries that will fit in the original case. There are 750mAH, 850mAH, and 1000mAH candidates in various form factors that fit. I bought a handful of each to test with. Turns out the 1000mAH battery fits best, which is nice since it will give us the longest run time as well.

More Lighting Controllers?

The 1000mAH battery fits nicely, with room to spare for the battery monitor/charge circuit board, and an Arduino Wemos D1 mini (ESP8266). Unfortunately, I’ve had nothing but problems with them! From issues with Windows drivers not being able to upload new program versions to failure to serve the web page files reliably via WiFi once programmed.

When they work, they work well. When they don’t, which is most of the time, it’s very frustrating to say the least. Already short on time, I don’t have any extra, let alone two weeks for messing around with, “Why doesn’t this blasted thing work now?” Until the latest round of Windows updates, at least my laptop was able to communicate with their CH340 chip. But no longer!

There has to be a small form factor Arduino that’s much more reliable than these pieces of… junk. I try to keep up with the latest innovations, but with the time constraints already mentioned, can’t be as thorough as I’d like. Thankfully Nick found these “super mini” versions of the ESP32C3 and ESP32S3 Arduinos, even more tiny, and more powerful.

The Latest Evolution Lighting
The Latest Evolution Lighting

Nick had sampled some and gave me a C3 and an S3 to experiment with after telling him my long, sad Wemos D1 story. But my hopes of having a quick fix quickly disappeared after trying to compile the code for the new C3 target. More time chasing gremlins, or in this case, yet another way of doing the same thing in the same family of parts!

More Problems?

How many different ways can they screw around a simple watchdog timer reset function? Apparently as many as the number of different types of ESP32 that exist. My code is now full of #ifdefs around every chunk of code for every different type of Arduino used!

If you’re not familiar with the concept of an #ifdef, it’s a way of including or excluding parts of the code based on whether a flag is defined or not. In this case, #ifdef ESP8266 vs. #ifdef ESP32 vs. #ifdef ARDUINO_ESP32C3_DEV vs. #ifdef ARDUINO_ESP32S3_DEV vs… You get the idea.

After yet another week of fumbling around and refactoring code I was no closer to anything that worked. The lighting controller is based on the FastLED library for the addressable LED strips. Without getting into too much detail, it forces the user to declare what Arduino pin to use at compile time, meaning it can’t be configured later, at runtime, from a config file.

After spending even more time searching issues around using the FastLED library with the ESP32C3, I found a number of different threads with people saying the C3 doesn’t have enough horsepower to handle FastLED and WiFi, saying it can barely handle WiFi! Great! After all this, I still don’t have a working model. But at least it can serve up the revised UI…

Royal Blue UI
Royal Blue UI

Squashing Bugs

Some of those folks recommend using the Adafruit NeoPixel library instead, so in the process of bringing together all the next gen and latest Arduino technology, I decided to refactor our LEDInterface to add yet another type that uses NeoPixel instead of FastLED. But even after the switch, still nothing! I’m beginning to think I’m cursed.

I added reading pins and such from the config file as well. In the process of debugging why it couldn’t correctly pull the default color, I stumble across the issue. Rather than duplicate code, I decided to share the piece that converts a CSS string color value into the red, green, and blue components to set the LEDs to…

Except it always returns black when using the hexadecimal #rrggbb form! For example, the color of the amber glow of those kerosene lamps is coded as #140600, i.e. red = 20, green = 6, blue = 0. But I must have missed a line when combining the two functions because it always returned black (0, 0, 0) and not amber (20, 6, 0). Yep. You guessed it. It was working all along!

Confidence restored, I even found a way to workaround that FastLED limitation of having to know the pin at compile time! You just ask for all of them, then select the one you want to use at run time based on the config file value! Another ESP32 “breaking” change was in the ledc interface, rendering all our code for the 5050 PWM LED strips useless. So I fixed that too.

Pennsylvania Limited UI
Pennsylvania Limited UI

The Latest Evolution

So when we talk about the “latest evolution”, we’re talking about replacing the already small Arduino NodeMCU 12E and Wemos D1 mini boards with these even more tiny, more powerful, “super mini” Arduinos. I’ve been working with a larger version of the ESP32S3 to experiment with I2S sound! I’ve totally reworked to old MP3Player sketch to use I2S and have a working prototype!

If you’re familiar with our “Themes” option, you may have noticed we’ve added a few new ones here. If not, they’re accessed by clicking on the Themes button, which presents a list of the various predefined color schemes based on different railroad liveries to select from. For example, a Pennsylvania Limited Green and Cream scheme didn’t exist. Until now.

We already had a B&O Gold, Blue, and Gray scheme for more modern F units, but we had to create an entirely new B&O Royal Blue scheme. Clicking the desired livery in the list presented sets it as default color scheme for the UI to use. If that sort of thing isn’t important to you, that’s fine. But it’s important to me, and it’s easy enough to add new liveries as desired.

Beyond that, early testing of the new 1000mAH battery yields more than 4 hours of operation. Compared to that, I’d say the 2800mAH markings were closer to the mark than the 2000mAH, but that frees up those batteries for other things, like sound!

I’m really excited about the latest evolution and the ability to add lighting to these Bachmann cars using the original 9V battery case. With just a few mods to add a power switch and charging port, all the electronics fit! And that’s a good thing too, because those other two Royal Blue cars still have the original incandescent bulbs, just begging for an upgrade!

What’s Next?

It would really be nice if we could recharge the battery from track power. Trying to access the charging port in the side of the battery box on the underside of the car can be difficult. I usually end up having to lift it off the track to be able to plug in the USB charging cable. But none of the passenger cars have track power pickups anyway. They would have to be added.

It’s really more for equipment that already has power pickups installed, like the USA Trains “cabeese” that still rely on the archaic 9V battery. Unfortunately, they’re internal and it takes some doing to gain access to replace them when they’re dead. Wouldn’t it be nice if that track power could recharge one of these LiPo cells instead?

But that’s a project for another day. I think I need to get the infrastructure back into running order before I worry about something like that!

Stayed tuned. More to come…

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Latest Acquisitions – Part IV

So here we are again. More acquisitions? What gives? When are we going to turn our attention to track and infrastructure improvements so we can run all this new equipment? Have some patience, we’re getting there! Slowly but surely, we’re creeping up on the improvements necessary to once again run trains. But until then, I can’t pass up a good deal.

I was a bit late getting into large scale. Too late to acquire these items I wanted when they first came out. And nearly too late to grab them now, before they’re no longer available. Period. But I’m disappointed with the choices available nowadays. That’s not to say I haven’t purchased new equipment, be it Bachmann, LGB, or USA Trains. Mostly USA Trains.

I’d love to have the opportunity to purchase another GP9, with the sole purpose to convert it to an SD24, but they’re no longer available! That alone prompted me to act when the GP38s, SD40s, and F7s became available. I’d love to buy more, but the issue becomes where to store them when not operating. Not to mention that without improvements, we’re not operating. Period.

A new heavyweight diner
New Heavyweight Diner

When Opportunity Knocks…

Fresh off my recent scores on eBay, I thought I’d satisfied that desire to fill the roster with more transition era steam power. We have umpteen Bachmann ten wheelers already. More than enough, to be honest. And I still have new drive mechanisms and shells yet to be assembled! The new to me Aristocraft 2-8-2 Mikado and 4-6-2 Pacific fit the bill nicely.

The added bonus of sound for both was encouraging. It’s fun to see these “antiquated” systems, still working, and still in use today! I’m working on an Arduino based I2S audio system to complement the motor/block controller system to replace all that antiquated electronics. But until the ESP32 version of DCC-EX is more mature and I adapt the motor controller to its specifications, that will have to wait.

For now, I’ve been “lurking” on some of the Garden scale forums that still exist, looking for ideas and keeping in touch with the latest in the hobby. That’s an oxymoron right there. Most of the folks in this scale are “antiquated”, just like the technology. And only folks that made it this far have the funds available to afford it! So when opportunity knocks…

Diner Kitchen Area
Diner Kitchen Area

Time To Join

Part of my morning routine includes reading my Facebook “news” feed. We won’t go into the political ramifications of that statement, but suffice it to say I only check in on Facebook once a day. It’s about all the “news” I can take. This particular morning though, I’m greeted by a new post on the Large Scale Central page, a new listing of an Aristocraft heavyweight B&O passenger set, including a 4-6-2 Pacific and tender!

So right away I want to know more, but can’t post until I join! The only drawback of “lurking” on a site. It doesn’t take long though and the moderators added me quickly. Quickly enough to be the first to respond to the post! That post set things in motion and led to these new acquisitions. But let’s go through the steps it took the get this new equipment to my door.

Right off the bat, the only drawback is I already have a B&O 4-6-2 Pacific #5300! I’m thinking that 3 can become an 8 real quick with one of my metallic paint pens. The number boards may take some doing too, but easily within the realm of possibility. Next are the passenger cars. Five absolutely awesome Aristocraft heavyweight passenger cars. The two coaches are duplicates, but with some renumbering, not a problem.

Another B&O Pacific
Another B&O Pacific

This Ain’t Amazon Free Shipping

Well, the name of the coach will need to change too, but… Shipping is the issue here. The price ain’t bad, $750 for the lot, but I’m thinking the shipping is going to kill the deal. At least on eBay you have an idea what you’re looking at going in. This is a total unknown. In fact, that’s how I approached the post, “I’m curious as to the shipping to 32757”.

Our first PMs back and forth are his estimates from another transaction, over $300! But he tells me he’ll get an estimate from USPS and UPS and choose the lesser unless I have a preference. As long as it’s NOT FedEx, I’m fine with whatever’s least expensive. The estimated total is somewhere between $250 and $260. So now I’m looking at a thousand dollars for something that was a deal at $750.

Now I’m wondering if I should have haggled over the price, but his reply was unexpected. The shipping came to $236.39, but he said just make it $200 for a total of $950, with an expected arrival of the day before my birthday! I thanked him for the birthday present and put the check in the mail.

Old School

Wait. What? That’s right. I said “Check’s in the mail”. I asked if PayPal was acceptable or what he had in mind for payment. His reply was “I don’t do PayPal, a personal check or bank check only”. Yep. I can’t remember the last time I wrote a check, let alone where my checkbook is. Like I said, most of the folks in this scale are “antiquated”. I even asked if he wanted a picture of the check to use his phone bank app to deposit it.

Nope. Snail mail is fine… I did manage to find my checkbook. He got my last check! Time order more? Maybe. He got my last stamp too! Definitely time to get more of those. Talking about it now, I totally forgot to get a book when I picked up my prescription at Publix yesterday. Oh well. Next time.

I was surprised that he shipped the whole kit and kaboodle without first receiving the check from me as he originally stated. I dropped the check in the mail to him, along with a letter explaining why the address and phone number didn’t match. I mean after all, those checks are going on twenty years old now. We haven’t had that landline for more than a decade, and we’ve lived here in Mount Dora at least a decade now too. Time flies…

Shipping Box, Poinsettia for Scale
Shipping Box, Poinsettia for Scale

The Unboxening

Except when you’re waiting on the package with your birthday present to yourself that is. But it gets here on time, as expected, and I am totally amazed. This packing job is definitely to be admired! Quite the work of art actually. He actually managed to fit everything into one box! And it’s all padded with precisely cut and constructed blue insulation foam inserts! Definitely a work of art.

One by one I extract each and every item, packed in their original boxes. Everything’s here. An RPO baggage car, two coaches, an observation car, a diner, the 4-6-2 engine and tender. All in the B&O “Royal Blue” livery. Time to inspect my birthday haul.

The first item is the diner. After all, he did say the sink counter was loose, so I figured I ‘d better have a look at that first. Sure enough, it’s loose and rattling around inside. Not only that, but the interior lighting doesn’t appear to work either. Time for a closer look.

The Fixening

These Aristocraft heavyweight passenger cars are somewhat complex. To get to the screws that hold the roof to the car, the car ends first need to be removed to gain access, with another set of screws that hold them to the car body. Once the roof is off, the twin power rails that line it and provide power to the four incandescent bulbs are visible, along with the spring contacts on the body that connect them.

I test the bulbs with the bench power supply and they’re all in working order. The same can’t be said for the LED table lamps in the dining area. Near as I can tell from what little I’ve found online about these cars, there’s a circuit card between the underside of the floor and the actual car bottom. And of course no user serviceable items there. The remedy is to send the car to Aristocraft for repair.

Yep. Not an option. Guess I’ll have to take my chances not screwing everything up. I decide to take the time to map out the three floor sections and create a schematic diagram of the electronics on that small, square circuit board, sandwiched between the floor and car bottom. Essentially it’s a full wave bridge rectifier and a pair of current limiting resistors.

 

Small Circuit Card
Small Circuit Card

Not What I Expected

I was thinking one of the diodes on the circuit card was either open or shorted, but that wasn’t the case. Feeding power to it in both polarities, the table lamps’ LEDs lit right up. Feeding power to the trucks, the LEDs light when the power switch is on. Hmmm… I wonder if it’s those contacts between the floor segments causing the problem? Only one way to find out.

I say the LEDs lit right up. But in actuality, the LEDs are all in series with one another. Four of them are on one floor section and the other four on another. I had to jumper them to complete the circuit to get them to light. But they did light. So everything is working. The only electrical item in question is the contacts between the floor sections.

With the necessary information collected, I reassemble the floor sections, paying special attention to ensure the contacts are in place and aren’t bent the wrong way or otherwise malformed. But even so, nothing is lit! I carefully use a jewelers screwdriver to bridge the contacts and find one that isn’t connecting, even after taking special care. Copper tape to the rescue!

Floor Segments And Contacts
Floor Segments And Contacts

Making It Work

I use scissors to cut the ¼” wide copper tape into two ⅛” pieces. Wrapping one of the pieces over the end of the jewelers screwdriver, I insert it into the gap between the two contacts. Lights on! Well, table lamp LEDs anyway. The bulbs along the roof still aren’t illuminated. After taking the roof off again and bending the spring contacts up to make contact, the ceiling bulbs are now working too.

One last issue to resolve with one of the truck pickups. Once again using the jewelers screwdriver, I identify the culprit contacts and insert the other piece of copper tape. There. Now everything works as expected. I can set the car on a piece of track and apply power to just the track and have everything illuminated.

Now for that sink counter from the kitchen prep area. I’m thinking it may look more like stainless steel with a coat of that Molotow chrome paint. Not so much though. Even so, I get out the hot melt glue gun and secure it over the two floor sections where it belongs. I don’t have much confidence in how long it will hold though since it was previously attached with hot melt glue that failed.

Sink Counter Reattached
Sink Counter Reattached

Checking The Rest

One by one I check out the remaining passenger cars. Both the coaches are missing windows in the vestibule door as well as the diner. Some are tumbling around, loose in the boxes, but in the end, two are totally missing. I use a toothpick to apply some wood glue along the top and bottom gaps of the windows I do have to keep them in place, allowing enough time for the glue to set up before reassembling.

The RPO baggage car is a disappointment. It must have been a newer model because those gawdy, awful looking 14V bayonet base bulbs and sockets just aren’t scale. The fact that they’re visible from the clerestory windows and it’s obvious what they are is just the beginning. Why they chose 14V bulbs instead of what appear to be 24V bulbs in all the other equipment is a mystery.

The engine is operational and all the detail parts are included and still in the original packaging. The only thing missing is the air compressor. All the plumbing to and from it is there, just no compressor. Thankfully the other Pacific has it and can be used to design a model to 3D print a replacement. Eventually. I’m thoroughly pleased with my purchase and can’t wait to get them out on the rails and running. Someday.

All About Me

That’s pretty much what everything boils down to. It has to wait on me to do it. As much as I’d love to have help, it’s just me doing most of this. Ann does a good job on the garden side of things, but ever since we took out the pond and the waterfall fell into disrepair, it’s been the opposite. She actually cut down the trees that had grown to just the right scale size, all because she couldn’t see past them!

And it’s not like I had a say in the matter. There one day, gone the next! Oh well. Without them to protect the bridge and abutments, those were soon destroyed by the pups too. Now we have nothing to replace that span. Nothing but a giant, empty gap remains! Working on a way to hide that pond and use it as a reservoir for a new waterfall and waterwheel driven mill off the end of the deck.

Still quite a bit of “imagineering” needed here though. Add it to the list of things for me to do… Someday. If this all sounds a bit depressing, to a certain extent it is. When most of my day goes toward making income and not making my dream railroad come true, it’s bound to be slow going. But even slow progress is progress!

More to come. Stay tuned.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Latest Acquisitions – Part III

Charging Port Behind Ladder
Charging Port Behind Ladder

Back at it again! This time it’s just a tender all by itself. I normally wouldn’t buy just the tender, but for this eBay auction, the pictures showed some unique features. The first thing that caught my eye was the toggle switch protruding from the bottom of the tender floor. Next was what looked like a reed switch, presumably to sense speed from one of the axles for a sound system.

Another feature was what looked like a charging port on the rear bulkhead, which would imply some sort of battery power scheme. Unfortunately at the time, there was no separate engine listed without the tender that may have matched up to it. Hoping there was to piece together the mystery of what lies within. Oh well, for the “Buy It Now” price, it’s worth the gamble.

The hope is there’s another Phoenix sound system inside at the very least. Battery power would be an unexpected bonus. Although this is likely all very old technology, it’s new to me. And what better way to learn about these older, no longer manufactured locomotives than to buy a few, investigate, and experiment with them?

Evidence Of Sound System
Evidence Of Sound System

Surprise!

When it finally arrived, the initial inspection revealed it was dirty. Just like the other items, it looked like it was placed in the box, straight off the rails. Not like it just sat on a shelf long enough to gather dust, this is last run outside and left to sit stored there, like part of an estate sale score or something. Could very well be. And like the other tenders, the shell came off and got a good scrub.

But not until finding a few surprises! The first is the weight. This thing is HEAVY! Next, the toggle switch isn’t the momentary on, center off, momentary on style expected, but rather just a standard, two position toggle! Hmmm… Guess that means I didn’t get the Phoenix sound system I was expecting. Not sure what to expect now. Time to get that shell off and see what’s really inside there.

Where to start? There’s a LOT more packed inside here than what I expected. First is a large, HEAVY, NiMH battery pack from Cordless Renovations. That’s connected to a small circuit board with that toggle switch on it. That’s also connected to what looks to be a three terminal voltage regulator on a substantial heat sink. Guessing this is the power supply and that toggle selects between charge and run.

Packed Full Of Goodies
Packed Full Of Goodies

Score!

From there, the power supply feeds what looks like a large interface “breakout” board with four slide switches labelled track/battery, on/off, smoke on/off, and lamp on/off. There are numerous connectors, some with something plugged in and others empty. There are a few pads labelled but not populated with any connectors at all. We’ll get into more detail in a bit.

The biggest thing of note is the daughter card, piggybacked on the interface card, labelled with a 2.4GHz FCC ID and a short, straight wire antenna. This has wireless remote control! Another big surprise is what looks like a sound card. It has the expected momentary toggle switch pigtailed to it. Could it be the volume control switch for another Phoenix sound card?

This is exciting! For the cost of a sound system or a wireless remote system or a battery pack or even just a tender alone, we get them ALL! It’s going to take more sleuthing to figure out what we have exactly, but this was more of a score than I ever expected. Is this another one of those seller didn’t know what they had items? Or knew what they had but also knew it didn’t work?

Whatzit?
Whatzit?

Many Questions

I feel like a kid in a candy shop! But now it’s time to answer some questions. My recent success with Google’s search by image feature prompted another try for that wireless remote control. It’s a 2.4 GHz Revolution Train Engineer receiver with sound! Wow. Now all we need is the transmitter. And the programming software. And Crest or Aristocraft to still be in business to get them.

The transmitters can be had on eBay, and even some online dealers still list them, albeit as back ordered or out of stock. The good news is they can be had for a price, somewhere between $150 and $200. As for the programmer and the software, that may prove to be difficult to find, let alone acquire. Unfortunately it’s one of those “need one to reverse engineer one” situations.

The next question to answer is what sounds system is this? For the first time the search by image has let me down. Time to take a different tack… Searching for Phoenix together with the patent ID labelled on the card turns up a link to a Big Sound 2K2, like the one I already have. But this one doesn’t look like it, It’s smaller and has a different configuration. Thankfully the link also has others listed.

Phoenix Whatzit?
Phoenix Whatzit?

The Search Continues

The next in line is the P5 model. This appears to have the same pinouts, but the picture doesn’t quite match the configuration of the components. It’s difficult to know for sure since the entire card is protected by a large piece of heat shrink covering everything except the connectors on either end. And there’s a piece of sticky backed Velcro™ stuck to that, together with its mate holding it to the tender floor.

Next up is the P8 and what looks to be the perfect match. Same pinouts as the P5, except this one warns that without some connection to the speed sensing input, which there aren’t, there won’t be any sound. Bummer. But it also says that it should provide background steam sounds or diesel startup sounds when idle. So which is it. Idle sounds or no sounds? Guess we’ll see when bench testing.

Looked up the battery too. That particular model is no longer available, but other styles are, so all is not lost. A more more modern lithium style battery would be preferrable to the older NiMH technology, but beggars and all that…

Bench Testing

Now to find out if it’s worth the money spent. Since the run/charge switch position isn’t labelled, it seems prudent to remove the battery leads from the circuit card and deal with it separately. Thankfully the connections are all screw terminals, labelled even. I don’t have any charging equipment for that multi-cell style battery pack, just single cell chargers, usually four cells at once.

Using the bench supply and closely monitoring the voltage and current should provide a good enough indication of charge rate and completion. The label says 18V, but it requires more like 22V before any appreciable current begins to flow. We’re talking an amp or more vs. tens of milliamps. The charging current continues to fall as the battery voltage increases. The supply voltage must be increased to compensate.

The goal is to keep the current above an amp without requiring excessive voltage. Charging is complete once the current falls to less than 100 milliamps at full charge voltage, which in this case appears to be ~22V. Without doing the math to add up cell voltages in series, we’ll call that good enough. It’s taken several hours already and should provide enough power to do some testing.

Bummer

Flipping the switch causes the battery voltage to drop from ~22V to ~2V? What is going on here? Did I somehow create a short when I broke the charging connector trying to remove it from the tender shell? Well shoot! Is it that 5V regulator? Is there something else going on with the sound card? Is the battery pack weak? Without jumping in and disconnecting and testing everything individually, who knows?

A first pass through everything looks like the charging connector is shorting the battery when switched to the apparent charging position. With that connector disconnected, the battery voltage remains the same with the switch in both positions. Maybe it just expects the charger to be plugged in before switching to charging? Dunno. Guess I’ll need to fashion a charging plug for the bench supply to find out.

Time to totally eliminate that little power distribution circuit card from the equation. The charging port is now disconnected as well as the battery leads. That leaves just the power feed connections to the Phoenix sound card and the wireless remote interface card. Thankfully they’re screw terminals as well. Time to isolate the sound card and remove those power leads too.

A Sound Success

As a precaution, even the miniature JST connector is unplugged, presumably feeding all the external triggers to the sound card from the wireless remote control. The bench supply is set to 12V. As the test leads are connected to the power wires of the P8, it hisses to life! It’s the steam startup sequence. Another working sound system. It looks to be more modern and smaller than the Big Sound 2K2 unit in the Mikado.

Rather than just jump in and try to power the wireless remote card, it seems prudent to reverse engineer that small run/charge switch card. Time to draw the schematic and hopefully get a better idea how it interacts with the charging socket. It’s the 2.5mm variety and doesn’t need the 2.1mm adapter. It does rely on the charging connector to complete the circuit when no plug is inserted.

Time to check the health of the 5V three terminal regulator. At this point, if that’s not the problem, then that leaves the wireless remote control card. Nope. Not the 5V regulator. Just briefly touching the bench supply to the battery input leads causes the voltage to drop and current limiting to engage at 10A! It almost welds the wire to the test lead clip!

Running Out Of Options

Switching to track power doesn’t seem to have any effect. That is to say, regardless of where the test leads are connected, the power doesn’t seem to get past the wheels. It seems to have pickups that connect through the wheel bearings, but with one wheel isolated from the axle, it amounts to just four wheel pickup, not eight.

A bit more fiddling reveals that the short is polarity dependent. There should be an assumed bridge rectifier to convert to the proper polarity but seems to be expecting the correct DC polarity. Turns out the track inputs do the same thing. Nothing for one polarity, dead short for the other. Guess I just managed to find the correct polarity the first time around.

Buzzed out the diodes on the interface card and they all act like diodes, none conduct in both directions. Removing the wireless card cures the short. Well, that’s that. Something’s wrong with the wireless remote card. Bummer. Glad I didn’t already spring for that transmitter! One thing left to check, the underside of the interface card, in case it’s double sided. Nope.

Fresh Fried Circuits

Throwing in the towel this time. The plug in wireless remote control card is fried. Unfortunately, it also has the motor control drivers on it, eight power transistors under a heat sink. Without it, about the only thing battery powered is the sound system. It’s a little disappointing, but I put enough of it back together to be able to do just that, battery power the sound system by flipping a switch.

It’s a good jumping off point though. This will allow experimenting with the different motor controller setups we have, only this time they’ll be built into the engine itself. Going to need some sort of full wave bridge if running track power though. Next steps would be charging from track power. That’s something I’d like to add to the passenger car lighting and the old style 9V powered cabeese marker lights too.

 

Latest Acquisitions – Part II

It had been nearly a year since we added to our equipment roster, until our recent addition of a Mikado, described in our first installment. This time around, it’s an Aristocraft Pacific. It’s as good a deal as could be found. Not as good as the Mikado, but close. It’s a little more expensive and a little less impressive, but only because it’s the early version with plastic side rods and such.

It does have the original sound system in the tender, and it still works. It’s missing the whistle and the bell, but the bell harp is still there. It does have the “cow catcher”, unlike the Mikado. The one big feature it sports is it’s in the B&O Royal Blue livery. And like its ten wheeler predecessor, it’s a bit on the wobbly and unreliable side. But there’s hope for it. It should be fine after a much needed tune up.

Being the early version, it still has the “glowing firebox” feature, no longer present on the more recent Mikado. Best I can tell, the Pacific is pre 2003 and the Mikado 2003 or later. The difference is the Mikado has an added Battery vs. Track Power switch stacked with the Motor On/Off switch in place of the glowing firebox door in the Pacific.

The Pacific has Motor On/Off on the cab floor, along with the Lighting On/Off switch, also on the floor of the Mikado. The Pacific placed the Smoke On/Off switch at the front of the engine on the pilot frame. The Mikado has its Smoke On/Off switch on the cab floor, opposite the Lighting switch.

B&O Royal Blue Pacific
B&O Royal Blue Pacific

Initial Findings

I did manage to find the manual and more information on various large scale sites. It appears to match the “Old Pacific” manual. And now my searches are turning up the ART-5400 PWM controller for use with it. Still haven’t found the “magic words” for the search to find the waveforms. But then again, that was probably a closely guarded bit of secret information (read intellectual property) when they were still in business.

I won’t go into all the details of our foray into PWM motor controllers here. It’s pretty much covered elsewhere. The long and short of PWM, for me anyway, is the annoying buzz at anything in the audible frequency range, and the lack of response from any built in constant lighting circuitry at any frequency greater than a few kilohertz.

Considering this locomotive also sports its own track powered sound system, not sure how Aristocraft managed to get the PWM concept to work, let alone together with it. It does require a fair amount of voltage before anything works. IIRC, the wheels didn’t even start turning until around 8V.

Original Aristocraft Sound Card
Original Aristocraft Sound Card

We Have Sound

It took some doing to figure out how this sound board works. When I first opened the hatch on the tender looking for a battery, not only did I not find one, I didn’t even see the 9V battery clip laying inside there on the very bottom. It became very apparent when I removed the tender shell to get a look at what was going on inside.

At first glance I can tell this is old technology, likely from the ’90s judging by all the discrete components surrounding four Dual Inline Package (DIP) style integrated circuits. One’s a quad comparator op amp, one’s a decade (÷10) counter, another’s a hex inverter/buffer, and finally a dual channel audio amplifier. I finally got rid of most of my DIP style parts recently, deciding I’d never be using parts that were at least 30 years old in any design.

Of course the first thing I have to do is look up which post is which on a 9V battery so I can attach the bench supply with the correct polarity. Let’s try not to let out the magic smoke, shall we? So with that knowledge in hand, I power on the bench supply and… Nothing. Adjusting the voltage has no effect. Neither does adjusting the current limit. What about spinning the wheel with the sensor on it? Nothing.

Or Do We?

All this is going on while trying to record a video of it, and paying more attention to that, the lead that fell off the bench supply goes unnoticed at first. Not sure what the first clue was, no current draw perhaps? With the power now connected, the faint sound from the speaker of amplified noise together with one of those old style analog bell resonator circuits, right on the edge of ringing, riding on top of the noise can be heard.

Adjusting the volume knob has the expected “crackle”, another remnant from analog days where any DC voltage present on the adjuster arm detects every speck of dust in its path and creates a loud “pop” in the speaker when it finds it. But the real payoff comes from spinning the wheel with the sensor on it. The bell comes to life, then the chuff, chuff as the wheel spins faster.

It does manage to make reasonable bell, chuff, and hiss sounds, but will be replaced once the I2S sound sketch is up and running. The short exposure to that Phoenix 2K2 card spoiled me. It’s less than half the size of this thing, makes much better sound, and can be controlled simply by connecting external reed switches or programmatically via DCC or other means. And even that one’s obsolete!

 

Does It Run?

Jumped the gun describing the sound system first though. Once the tender’s open, it’s obvious more research is required. Testing out the engine came first. I set it on a short stretch of track and connected the test leads from the bench supply. It does run, if only for a short time before it runs off the end of the track. Reversing the polarity sends it the other direction.

So it does run, but how well is unknown until the first set of run in stands is finished printing and assembled. It takes six for just the three driver axles. Those together with the other ones I already had printed and assembled should be just enough… If the mix matched colors isn’t an issue. That set took all but the last one of the roller skate bearings. Time to restock those and the other hardware.

It probably wouldn’t have taken as long if the assembly steps hadn’t been recorded as well, but at least they’re finished. Once on the run in stand, it’s obvious this has a lot of slop designed in, most likely for tight radius curves. There’s at least a quarter of an inch (~6mm) slop side to side in each of the driver axles. Couple that with the middle axle being driven only by the plastic side rods and it’s a wobbly ride!

 

Death Wobble?

Don’t know if it’s “death wobble”, but she’s certainly a rockin’ back and forth and side to side! With a slight tug on the cab the wobble is tamed somewhat, but not entirely. While the first and last axles are physically linked together by a shaft to the motor, that middle axle is free to “float” between the side rod links. There are two of them, not one solid single side rod like on the ten wheelers.

One link is connected between the drive pins of the middle and rear drivers. The other connects to the that link and the drive pin of the front driver. The connecting rod from the piston and cylinder shares the middle driver’s pin with one of the side links as well as the arm to the valve rod. The sector arm rocks back and forth around a centered “Johnson bar” with the valve rod action.

That’s the extent of valving action. I’d like to draft up a CNC design to mill out metal side rods and operational valve links with prototypical reverser action. Unfortunately, the Mikado suffers the same valve action limitations with rigid cast plastic in place of the expected moving mechanism. Just now thinking about, it may be possible to borrow valve parts from the ten wheeler replacement mechanisms. Hmmm…

Saving The Best For Last?

More like saving the boring for last. The first installment of this series focused on catching up with where we’re at and why expanding the roster wasn’t a priority. Then it moved on to how most of these historic items are no longer available except for those rare offerings on eBay. The occasional item may pop up in an online dealer’s list of previously owned items, but they’re usually way overpriced.

With that being said, the particulars of the deal were held until the last this time around. This particular acquisition was one of those buy it now or best offer deals on eBay. Most of those available were in the $750 – $1150 “Buy It Now” price range. Not sure what the original price was back when Aristocraft was still in business, but even so, that’s pretty steep.

The offer was half the ask, and the seller countered with an extra $50 tacked on. Combined with tax and shipping it was a little over $500 all told, not quite a hundred dollars more than the Mikado deal, where the tax and shipping together were still less than just the shipping here.

Stupid eBay Tricks

Guess it’s a common “trick” eBay sellers use to avoid having to pay more of a surcharge or lose as much when some buyer tries to rook them, but when I see shipping costs of more than a hundred dollars, it better be hand delivered, straight to my hands, and not tossed around by the postal system until it’s dropped at my doorstep. Literally.

One thing I didn’t cover in the first part was all the offers I got from sellers I hadn’t extended and offer to… Way to scare me off. Folks I’ve never met nor reached out to, already “leaching” out to me. I already think what they’re asking is overpriced to begin with. Those offers only put the price in the ball park of other sellers, before I make any offers. No thanks. I’ll keep looking.

I know what these items are worth to me, regardless of what the sellers think they’re worth. “No lowball offers. I know what I got.” comes to mind. But enough about eBay sellers and tactics. I bought the item I wanted for a price I was willing to pay. Granted, it’s not what I thought I was buying, but it’s a good enough start to know better next time. Who knows? Maybe I’ll design my own CNC version of the mechanism and 3D print the rest.

The Best Part

The best part is all the video material recorded while exploring these “new to us” models. It’s been way too long since we’ve posted any new videos to our YouTube channel. They pretty much stopped when our beloved Brigel crossed the Rainbow Bridge mid 2022. There’s a short of Brigel’s last days with us to mark the anniversary of his passing, but nothing since.

That’s not the only reason, but it definitely took its toll on us. Another source of concern was the aging computer system we use to edit and render the videos. It was a real screamer in its day… A decade ago! Now its age is definitely showing. Nick gave me an older video card he had that was still more powerful than the one I built the system with. That’s helped for a while. But the old girl is tired…

But not retired. That system has roughly 20TB of storage. Some of it SSD, most of it spindle drives. It provides network access to all our collected works, knowledge, and projects. When we lost two of the 2TB drives, meant to be backups of each other, we lost most of our pictures from 2013 and parts of 2014. It was the motivation to pull the trigger on a new machine.

A New Hope

The new system is more than capable of creating videos. There were some hiccups along the way, like when the boot SSD failed, and it could have been bricked for more than two months. And all this just after finally getting everything squared away and ready to go. Seemed like we just couldn’t catch a break. I took the opportunity to rebuild a new boot drive without all the extra fluff included with Windows 11.

Back up and running, all the while waiting on a warranty replacement SSD. At first it was a struggle just to figure out who was on the hook for the warranty. Once that got resolved, things didn’t improve much. Not until I finally convinced someone in support that having a new computer that’s essentially a brick sitting under my desk for the last two months wasn’t the user experience I expected when I bought it.

He sent me a new 2TB boot SSD express! The best part was I got another 2TB replacement SSD a week or so later through the standard warranty channels! So I bought a set of USB drive cases and now have two external 2TB SSD drives for portable storage. The new computer itself was already treated to an upgrade of a second internal drive, a 4TB SSD!

A New Video

With all that being said, it’s time to start putting out the videos again. I managed to collect up all the relevant material in a “starter” project I can “save as” to any new video project, then just remove the content that’s not related. Maybe I should just export all the bins and import just what I need into the new project. Guess I’ll try both ways.

I use DaVinci Resolve for making videos. It’s just the free version, but has plenty of features even so. Microsoft was pushing their latest Clipchamp “freebie”, but it’s barely capable of editing out the unwanted parts just creating a short excerpt video. Guess I’m spoiled. I’m using version DaVinci Resolve 18.6, but they’ve already pushed out the new 19 release.

The short video clips in these new posts were created just for them, saving the full up content for new YouTube postings. All we need now is that “flashy” intro for the channel. Maybe even a trailer to boot. Just need the inspiration…

Much more to come. Stay tuned!

 

 

 

 

 

 

 

 

Latest Acquisitions – Part I

It’s been nearly a year since we added to our equipment roster, choosing instead to concentrate on infrastructure improvements, organization, and storage. While I’d like to say we’ve been busy doing that, progress has been almost nonexistent. If anything, we’ve taken a few steps backward. The latest setback is preparations for hurricane Helene, hurriedly cramming everything in the garage, and making a shambles of any progress organizing it.

One great feature we added long ago is the storage drawers for the old Bachmann ten wheelers and passenger cars. More recent acquisitions concentrated on diesel equipment, mainly freight oriented, but the USA Trains heavyweight passenger car set upstaged all the Bachmann passenger cars. And while those ten wheelers are well suited to the Bachmann cars, the heavyweights would look out of place behind one.

Most of the other steam engines we have are more suited for logging applications, like the three truck shay and mallet. There’s that 2-6-0 we were going to modify to match the “Orange Blossom Cannonball” that we used to ride from Mount Dora out to Tavares and back, then realized it was the wrong prototype to start with and would require massive modifications. It would be much better to start with something closer, but the original has long since ceased operation anyway.

Limited Choices

Few manufacturers make anything more than “novel” steam engines. LGB is one of the few remaining, but predominantly European designs. USA Trains has one offering, the UP FEF-3 Northern, with a price tag of $4,000. Not for the feint of heart, or pocketbook. Considering the only other offerings are live steam, usually in the $5,000-$7,000 price range for just a little 0-4-0, pretty slim pickings if you’re in the market for a modern steam engine.

Before they went out of business, Aristocraft used to make some decent modern steam engines, like a 2-8-2 Mikado, and a 4-6-2 Pacific. LGB also had a 2-8-2 Mikado offering. No one makes them anymore, which leaves the aftermarket, be it eBay or online dealers. Of all the hobby shops I used to frequent, I can only think of one that may still be in business, and it’s paired with a photography store. Trains on one side, cameras and such on the other.

There was one time way back, when we were shopping after going out to dinner, we thought we found a new one. Walking in we were told they just sold all their inventory to another dealer. I don’t want to call those types of deals “predatory”, so let’s just say the online dealers I’ve seen, brick or mortar front or not, seem to want exorbitant amounts of money for what’s left of those “rare” items.

Caveat Emptor (Buyer Beware)

Don’t get me wrong, I’ve found a few good deals online, but not many. That leaves eBay. My experience with eBay has been mixed. If you’re looking for deals on eBay, you really have to know what it is you’re looking for. You need to “do your homework”, so to speak, and go in with “eyes wide open” as they say. Many of the sellers are established, and most are fair and honest and want your return business.

But even though some sport good overall ratings, they’re shady nonetheless. Back when I was restoring classic motorcycles, I had a seller refuse to refund my money when he had obviously posted a deceptive offering. When I gave him a poor review, he retaliated and said I was the one that was lying about the whole deal and trying to get something for nothing. Live and learn, and NEVER deal with them again!

Sadly, the best deals I’ve found is when the seller doesn’t no what they have, offering the item for much less than it’s worth, or mislabeling it where most others looking for the item wouldn’t think to look at that auction. Long gone are my days of sniping items at the last second. I’m more of a buy it now type these days. I know what I want and what I’m willing to pay for it. These latest deals were one of those “Make an Offer” types.

Milwaukee Road Mikado
Milwaukee Road Mikado

Shiny and New?

From eBay? Nope. As luck would have it, I got a great deal on an Aristocraft Milwaukee Road Mikado from an online dealer! Listed as “Very Good” and in the box, the price was already lower than anything I’d seen on eBay for similar items. Couple that with a 10% off coupon and it’s a deal. That 10% almost covered the tax and shipping. I think they priced it low because the tender had been modified with some sort of aftermarket electronics added to it.

Talk about a deal! I’d even call it a steal. The only way I knew there was something in the tender from the pictures was the handle of a toggle switch protruding from beneath the floor. I wasn’t sure what to expect, but knew it was some sort of electronics. For less than $450 delivered, I had a “new to me” Mikado. Of course the first thing I had to do was see if it ran. Normally that would be as easy as applying power to the wheels. Not this time though.

I did a quick internet search for the manuals and such. Near as I could tell, the plugs and wires I could see kind of matched the schematics? The front pilot was fitted with an Aristocraft coupler and the “cow catcher” was missing. One of the cast steps from the tender was broken off and missing too. There were other loose parts floating around, like the whistle and rear pilot, but not those parts.

Oh well. For what I paid, I can’t complain, although I might argue with the “Very Good” rating they gave it.

A Peek Inside The Tender
A Peek Inside The Tender

Such a Deal

One of the first things I did was take the shell off the tender to see what electronics lurked inside. Not that I’d know what I was looking at mind you. There’s a built in circuit card, and additional circuit card, a speaker, a small battery pack, a couple of switches, one in the tender floor and one in the tender shell, and a bunch of mix matched wiring, complete with wire nuts. Ugh. Thankfully there’s a connector to the switch in the tender shell.

The additional circuit card uses “modern” surface mount components. It has one large, apparently custom chip, with 40 – 50 pins and a large “sticker” on it.  I try Googling the numbers from the sticker and other components but not getting a good match from any of them. I’ve never used the image search feature… Until now. That’s what it takes to get me a valid match. Turns out it’s a Phoenix sound system! Nice!

At least that’s what I thought, until I tried to find more information. It’s a BigSound™ 2K2, short for model year 2002 I’m guessing. But I’m too late to the party. They went out of business more than a year ago. Even though I’m able to find a saved version of their website on the “WayBack Machine” site, looks like none of the PDF or MP3 files were saved. Damn! That means no manuals, no sound files, nothing.

Now What?

I did manage to find the manual and more information on various large scale sites, and one user even brags he recently made a copy of the Phoenix site, but advises to just throw them in the bin. Great. Thanks for the help. Any information gleaned from a site no longer available, that might help support others willing to take the time to keep these things working, would be greatly appreciated.

If you’re reading this and have the sound files, and are willing to share them, please let me know. If you have the programming interface and installation CD, even the schematic, I’m interested in those too. The bottom line is I have one of these sound systems and it still works fine. I’d like to keep it working and not just throw it away because there’s something newer and better.

The good news is IT WORKS! Let me see if I can figure out a way to embed a video player here. I may need to link to one already deployed on the web site itself. It has chuff, dynamo, automatic whistle, cylinder cock steam hiss, and bell on first motion. The chuff must be speed sensitive since it has some sort of magnet/reed switch sensor on one of the tender axles.

Sound Works, But Does It Run?

One of the first things I did after diving into the sound system was to take the engine apart, both to clean it and see if I could just apply power to the circuit board and get it to run that way. I was able to download the manual and parts diagrams for it along with the schematic. It shows a “jumper board” that can be replaced by DCC or other means of remote control. It’s nice that one end has the power connection and the other end the ground.

It has a built in switch to select battery power or track power, but applying power to the pickups on either of the pilot or pony trucks doesn’t work, regardless of the position of the switch. That small battery pack is just to keep the sounds playing when track power is removed. I was hoping it was some sort of battery power arrangement for running the locomotive too, but no such luck. With the shell removed, I have access to the circuit card.

Connecting the adjustable bench supply using a set of test jumpers, I slowly increase the voltage. With the base of the engine laying on its side, the drivers slowly begin to move. IT WORKS TOO! Wahoo! Not sure why the power pickups on the engine aren’t working, but at least I know once it gets power it will move. Would hate to think it relies on just two axles on the tender for power, but a battery power conversion will fix that.

It’s Alive!

I am absolutely thrilled with these results. The next step is to get things working reliably. To that end, I begin disassembling the drive mechanism. This is a strange beast to behold though. Each axle has its own dedicated gear box, all connected together by drive shafts, with the last axle also connected to the motor by drive shaft. I start with the lead axle gearbox, carefully removing the side rods and the the gear box itself.

Or should I say rod? That’s when I find the engineer’s (right) side is missing the link between the first and second axles. Bummer. I can probably design and 3D print something that will fit, but these are all metal side rods, and I’d rather fashion something from metal than plastic. What are the odds of finding that replacement part for a 20 year old engine? Slim to none I would wager. Disappointing, but not a show stopper.

Digging deeper into the first gear box, I realize at least one of the wheels will need to come off to split the gear box halves and expose the innards. The gear box itself is plastic, the halves held together by two screws each on opposite sides. The worm is metal and the drive line components have ball bearings on either end of the worm shaft. The axle also has ball bearings. The weird thing is the wheel and axle is taper fit. Never seen that before.

Missing Side Rod Link
Missing Side Rod Link

Replacement Parts

Generally wheels and axles are keyed to each other in some fashion to ensure quartering is maintained between sides. This design relies on the taper fit to wedge the wheels to the axles. The tighter the wheel retaining screw, the tighter the fit to the axle. Again, not a show stopper, but I realize it’s going to take some sort of quartering jig to maintain ALL the wheel positions relative to each another and decide to stop with that first axle.

The ball bearings looks to be single sided metal shielded, and the one at the front of that first axle gear box is pretty rusty and crusty. Its movement feels rough too. Time to replace it, but I don’t have any bearings on hand that will fit. Time to grab the measurements and see what’s available. The nice thing about bearings is they’re standardized and can be identified with just the measurements.

I ordered a pack of 10 for when I finally decide to get in there. I’d do a total refresh of the gear boxes and such, but for now, it will be easy enough to just replace that front bearing without having to tear the rest of the driveline apart. Until I come up with a quartering jig, there’s no way I’m tearing it all apart. The goal is to get it running “good enough”. It would be a good thing to get the track good enough to run on first.

Next steps

As luck would have it, there are just enough spare run in stands to assemble together for the engine to sit on, and in matching black no less! It takes every last one I have that isn’t dedicated to another engine type. I’ll need to 3D print and assemble 8 more for the tender, but considering it can just sit on the rails with no moving parts, there’s no great hurry or need. For now, we’re all set.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

A New Lighting Gadget

Another lighting gadget? Why? Because it’s necessary. If you’ve read the post about the office refit, you’ll know why “Data Central” needed a new lighting gadget. If not, let’s get you up to speed. Recently the office got a “facelift”. To be more precise, many of the issues with the office arrangement were addressed. In fact, this new gadget addresses an issue that way caused by the refit.

We added a new shelf over the monitors on the desk. Those monitors shared space with lamps hidden behind them. The lamps shone upward and bathed the white ceiling with light, then reflected and scattered back into the room, softly illuminating it. That is, until the shelf effectively covered them.

Well, it didn’t exactly cover the lamps, but it effectively blocked their light from doing anything but backlighting the monitors. And the monitors don’t need backlighting. The overhead light on the ceiling fan is too bright. The LED fixture over the gadget bench is WAY TOO BRIGHT. Now what? We need a new light.

Inspired by my latest lighting adventures controlling lithophanes, I decided to dig out those LED strip corner frames I bought years ago to use for the train station lighting. The train station we no longer have, lost when we removed the raised bed planters along the patio. Anyway, the idea is to place the corner frame along the back of the shelf over the monitors, facing toward the ceiling and out into the office.

Those corner frames have a face at 45º to either side, meant for the LED strip to stick to, and a snap in diffuser over top of it all. While I didn’t really need the scheduling additions from the lithophane lighting sketch, I did want all the updates and bug fixes that came with it. I also expanded the “build from config” feature to get us closer to not having to create a dedicated HTML page just to control all the different lighting arrangements.

ESP32 Arduino Testing LED Strip

Designing The Fixture

The picture shows the ESP32 I’m using to test the sketch, connected to the first 55 of 110 LEDs. The shelf is 72″ long, so I cut two of the meter long (39.36″) frames and diffusers to 36″ each. The plan is to connect the two at the middle to make a 72″ long fixture of sorts. But to do that I’ll need to design some sort of end caps that emulate those that come with the frames.

At full intensity those 110 LEDs will consume 60mA * 110. That’s 6.6A! I don’t think even the powered USB 3 hub will handle that much current. Time to order a dedicated power supply for this project. All I can find is 6A and 8A, but the 6A version will take too long to get here, so I go with the 8A version. It may be a bit overkill, but I’d rather have too much than not enough.

The frame extrusion is hollow behind that 45º face so the plan is to power one end and run the wiring through that hollow space to the middle to evenly distribute power between the two halves. The difficult part is trying to shoehorn an Arduino as well as the power connector into the smallest box at one end.

LED Strip Illuminated Running “Flicker” Effect

Baby Steps

Sounds easy, right? Let’s start with copying the end “stopper” to get the dimensions correct. It takes a few tries, but eventually the part snaps right into the end of the extrusion. From there, it’s a new design to snap over the extrusion rather than snap into the extrusion. The reason is original has a long “snout” that fills the hollow space we want to run the power wires through.

We need the snap over design to provide a “window” for the wires to pass through where the original snout would be in the way. That much is a no brainer, but it still take a second try to get it right. The next step is to figure out how to reduce the size of those “default” 3 pin connectors. For the life of me I cannot find a name for those standard black connectors.

But it doesn’t matter because they’re too big to use anyway. One of the JST connector styles in one of those assortments may work. Turns out an XH3 works just fine. Three pins on tenth inch (2.54mm) centers. Add that to the cap design, one opening for the power lines and one for the XH3 connector. We’ll need one on the power supply end and two for the connection between the two halves.

Making It Fit

Now all we need is some sort of box to house the power connector and the Arduino. The ESP32 we’re using is too big and way overkill for what we need it for. Even the ESP8266s we normally use is too big. One of the WeMos D1s ought to work. It’s the smallest we have that still uses the ESP8266 core.

Starting with the power connector for initial dimensions, the design is just the box with a hole in it for the connector. It takes two tries just to get the dimensions of that hole correct. Rather than design some elaborate attachment scheme, it’s assumed the control box will be glued to the end cap. For now the goal is to fit everything inside the box.

Shoehorning the Arduino in there pushes the dimensions a bit larger than desired, but it’s still roughly a ½” deep by a little more than the dimensions of the WeMos D1. Why ½” deep? Because there’s not much more space left between the wall and the doorframe to fit anything else. After capping the shelf with ¼” thick screen mold, it’s already 72½” long anyway.

End Cap and Control Box Design

That much is done. Now we need to modify the design to add a snap on lid that we’ll glue to the end cap to keep everything attached to the end of the fixture. The snap effect is decisive and holds tighter than the end cap snapping over the end of the fixture. Considering that control box will rest up against the wall that shouldn’t be an issue.

Not shown is the access port for the USB micro connector on the Arduino. It serves two purposes, the first of which should be obvious, programming access. But the real reason there’s an access port at all is to help align the Arduino and keep in in place as well as reducing the overall length of the box since the connector extends beyond the edge of the circuit board. It’s a small amount, but not negligible.

Joining The Fixtures

Seems like this should be the easiest to do, after all, we’re just sticking them together, right? At first I was thinking just a pair of connectors, one on each end, and maybe some sort of back to back plugs to connect the sockets together. That went out the window with how much the connectors would extend past the end.

The next idea is to allow a single connector from one end to extend through the opening in both and a plug with a short pigtail from the other end to connect them. The only concern now is how short of a pigtail and will it interfere with any of the LEDs. Sounds good. Until considering the power leads, or rather, failing to consider them.

Rather than take the time to drill holes in the aluminum extrusion, it’s quicker to just drill a couple holes in the 3D printed plastic end cap, then loop the wires from the bottom hollow section up and through the holes to solder them to the power traces on the LED strip. There are copper “pads” every LED, so the connector will solder to the pads at the end of the strip and the power wires to the next set of pads.

Adding The Controller

It’s a bit of a hack, but it works. With all the wiring work done for connecting the two fixtures together as one, it’s time get to work on the controller end. Time to “ohm out” how these fine Chinesium power jacks work. Three terminal, only need two, but which? There’s usually a set of switched contacts that provide continuity until contact is broken by inserting the power plug. Then only one of them is in contact with the plug, breaking the connection with other.

Generally the power connection would be switched, but in this arrangement, it’s actually the ground. Tip is power, ring or shroud is ground. Before all that, the lid needs glued to the end cap. Then the power lines can be run through the opening in both and soldered to the power jack. The jack can then be mounted to the control block, passing the wires through the lid unit.

That leaves the connection to the Arduino. And that means crimping the pins for the plug of the “harness” to the Arduino. Unfortunately, the crimper is loaned out. There’s a “backup crimper” that sort of works, but just as many pins are wasted as there are good crimps. There isn’t room for pin headers to be soldered to the Arduino, so the harness wires are soldered directly to it.

First Test of Assembled Lighting Fixture

The sketch is already loaded on the Arduino and it’s ready to go! The Arduino fit in its space, plugged in, and the box snapped on, all that remains is to plug in the power supply and wait for everything to come to life… And it does! WooHoo! Just had to try changing effect right off the bat. Christmas TruTone® effect, complete with blinking! Looking good!

Now to see if everything will fit on the new shelf over the monitors and continue to work. A few last minute tweaks to the sketch, including setting up the config for a warmish white. Well, try as I might, these LED strips are the finest quality Chinesium and it shows. There is just no way to make these things look warm. It’s either that pinkish “grow light” white or a harsh blue white, but at least it’s ready to deploy to the shelf.

Well, at least it’s sitting on the shelf and operational. Fully deployed would mean clips attached to the shelf or the wall to snap the fixtures into. And that sounds too much like work at this point. We’ll save that for later since the shelf will be taken down to stain and finish in the near future. It makes more sense to wait and do it then, if at all.

If anything needs done, it’s adjusting the brightness and tone of the light to match the desired lighting for the room, and that takes some doing. These LED strips probably weren’t the best choice. The red power and green power don’t seem to balance out to a warm yellow or amber. It’s either way too green or way too pink, with no happy medium between the two.

New Lighting Fixture Deployed on Shelf

Future Changes

Having spent hours trying already, it’s time to look for a better LED strip. If anything, those LED strips need swapped out with some quality Alitove strips. The problem is there are so many different “brands” available, most of which are cheap knockoffs, that it’s difficult to know what you’re buying beforehand. Paying for quality counts.

There seems to be a bug with the power button in the UI as well. It works fine after short delays up to hours, but overnight it somehow only enables the red of the first pixel. Turn it off then back on again and everything’s fine. Must be something in the loop handler for the power, or the effect, or both. For now, it works well enough to use as office lighting.

I’d really like to finish the “build from config” feature to get get away from having to create a dedicated HTML page for every gadget that has to address every minute detail of controlling it. There’s really no way to avoid having a dedicated page though. For example, favicons will differ along with files included based on what is being controlled.

But automating the control portion of the page based on configuration and what is being controlled will save plenty of time

New Office “Grow Light” White Lighting

If anything else is lacking it’s an Amazon Alexa interface. A quick and dirty way to enable that would be to just plug the power supply itself into a already Alexa compatible smart outlet. Eventually I’ll figure out what it takes to add that to the Arduino sketch. More like once there aren’t so many other pressing issues on the Barkyard.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Office Refit

This post is a bit off the beaten path compared to other posts about the Barkyard itself. Why a post about the office? We’re refitting “Data Central”, the heart of Barkyard designs, gadgets, and posting of course! Just about everything associated with the Barkyard starts here in Data Central. An idea starts here and grows here. Whether it’s online research or Arduino coding, it all starts here.

What used to be drawn up with pencil and paper is now captured electronically, and has been for years now, decades even. And over those years, the applications used have changed, many so old they are no longer supported by modern operating systems. For example, while my favorite Windows 95/98 programs continued to run on Windows XP, they absolutely will not run on Windows 10 or 11.

What does all this computer speak have to do with refitting the office? Everything. Within reach of my office chair are two servers and three laptops. The two servers share physical keyboard, mouse, display, and USB devices via a KVM switch. While not really necessary, it certainly comes in handy when we can’t reach the Internet for whatever reason, when I can’t use Chrome Remote Desktop to access the other server.

The Start of Good Things To Come

Computers Are Great… When They Work!

These posts are created on the new computer, with a brief hiatus while the failed boot drive was replaced. Short version is just before the year warranty ran out, the 2TB SSD failed miserably and the computer refused to boot. I put in a warranty claim, then waited months before I was finally able to talk to someone who cared, and he express shipped a replacement SSD to me.

What’s the kicker? By the time the normal warranty chain played out, they ended up sending me another replacement SSD a few weeks later! As much as I complained about their cumbersome and exasperating support process, or lack thereof, it serves as a striking example of how not to do things. But it paid off for me in the end! I’m still chuckling about it.

Whether designing a new gadget or coding a new Arduino sketch or writing a new post or just plain research for the Barkyard, computers are a vital part of it. The older server provides large data storage and backup, both for applications and data. The new server is optimized to compose and render videos, perform CAD/CAM, and provide enough local storage to save all the collective research.

A Bit of History

There are two work cells, one devoted to personal servers, the other a gadget work cell “around the corner” from the first, now shared with work computing. That’s where the laptops come into play. When I started back to work more than two years ago, I needed another computer work space, separate from my personal computing space, for the work laptop and its associated devices and monitors.

The original gadget workspace was a set of cabinets, one 42″ and one 36″, that supported a ¾” cabinet grade plywood top. The 42″ cabinet forms an “L” with two more 36″ cabinets along the back wall facing the Barkyard. All in all, it’s a Galley style arrangement when the computer desk is added along the opposite wall.

I wasn’t pleased I had to share my gadget assembly and testing area with my work computing. Work by day and projects by night? Sounds good until there’s a project laid out that can’t be put “back in the box” the next morning when booting the computer and getting back to work. At least it pays the bills.

Preparing to Install the Split Unit

Original Rework

The makeshift computer work cell using the original 42″ cabinet was not optimized for computing. For that matter, it wasn’t meant for computing at all. The cabinet sat on the floor, which runs downhill toward the back wall. Originally this was the sleeping porch, now closed in and under air. In fact, it has it’s own dedicated split unit now to handle all the heat those computers and printers throw off. But I’m getting ahead of myself.

About the only thing that can be said is it’s level so things don’t roll off it. It’s home to all sorts of electronics and parts assortments and Arduino kits, haphazardly arranged on a custom shelf arrangement that was previously meant to store CD jewel cases. Thankfully the top shelf is just wide enough to hold up another set of monitors.

It doesn’t take long to realize that not only is it not optimized for computing, it’s in no way ergonomic either. The pain in my back, through my hip, and down the side of my leg is telling me something has to change. Assuming it’s constantly fighting that tendency to roll downhill since the pain is on that side. Of course, having to keep my feet up in that cabinet probably doesn’t help.

That 42″ cabinet has to go. Go where? Out. It doesn’t matter where. But that doesn’t help fix the downhill slope of the floor. The plan is to lay down a 4×4 sheet of ¾” plywood, strategically supported to keep it level. The only problem is that 36″ cabinet, but there’s nowhere for it to go. Now what? There’s just enough space to push those other 36″ cabinets along the back wall far enough to spin that 36″ cabinet around and inline with the other two.

Long story short, the floor is now a level sheet of plywood with a nice rug to cover it and the gadget workspace is now a dedicated counter supported by a set of custom brackets. Custom brackets that used to support my HO scale layout at the old house, sitting in the garage waiting to be useful again nearly as long as we’ve lived here.

Data Central Two Years Ago

The Problem

Well, there’s more than one problem, but the main problem now is the haphazard arrangement of everything in relation to everything else. There are five 27″ monitors, and no two sets of them are at the same height. The two monitors dedicated to personal computing are at just the right height off the desk, sitting atop its “Pidgeon hole” cabinet, roughly 9″ at the base. The middle of the screen is just at eye level. No neck strain.

The base of the single monitor dedicated to the surveillance system sits right on the gadget counter, but that sits about 3″ lower than the desk, about 12″ lower than the first set of monitors. And even though that counter is lower, the custom shelf arrangement holds the base of the two monitors dedicated to the work laptop at a good 6″ – 7″ higher than the personal computing set.

As if that isn’t goofy enough, the counter isn’t long enough to complete the “L” with the desk, so there’s a gaping 20″ chasm between the wall and the edge of the counter. That monitor for the surveillance system teeters precariously over the edge and the USB hub sitting next to it is always falling into the abyss. What should be a Galley style arrangement isn’t. The issue is the metal and glass shelving unit that promised to be more useful than it turned out to be. All it does is collect dust and it needs to go away too.

Another problem is the loss of storage space with the loss of that 42″ cabinet. To that end a drawer was added under the counter and between the custom brackets. But because it wasn’t well thought out when installed originally, a compromise was made. More like a complex set of pieces were needed to force the drawer and slides to fit, even after it was cut down from its original wider size. Between that and constantly banging my knees against it, that will need to be addressed as well.

The Solution

The solution to these problems and more is a refit. That is to say a retrofit to re-fit everything together in a more purposeful, organized fashion. I’ve been updating my office layout in SketchUp, mainly to try some “what ifs” without having to tear everything apart to test fit ideas. It definitely helped me figure out where that 42″ cabinet would fit, along with the rest of everything else.

I’m not going to lie. Part of that effort was to catalog and look at some “what ifs” for placing the old HO scale layout sections in a bookshelf layout arrangement, fitting and reusing the various shapes and pieces of ½” plywood sub base that’s been waiting to become useful again along with those custom brackets. But that’s on hold for now. More pressing matters to address.

More pressing matters like continually deteriorating infrastructure and soon to be installed fiber service. That’s right, it’s finally here. Nearly twenty years after we were originally promised fiber at the old house, and by the same company no less! It’s probably a good thing I didn’t know that until their trucks showed up out front or I would have told them to pound sand! But that’s another story for another time.

Not that we were unhappy with our service provider, 250MB per second download speeds are nothing to sneeze at, but we’re lucky to get 10MB – 12MB per second upload speeds. The one and only time we tried to go live failed miserably because of those limited upload speeds. With fiber we can speed less and get more, like 1GB per second down and up! In fact, we can cut our costs further by going with the 500MB per second plan.

Before Slicing and Dicing
After Slicing and Dicing
Plywood Sheet Conveniently Cut Into Shelves

The Refit

That’s the motivation for the refit, and the motivation to get the refit done now, before they come to install the fiber. So what exactly is the refit? Good question. Glad you asked. To boil it down into its most condensed form, it’s slicing up a 4×8 sheet of ¾” furniture grade plywood into dedicated shelving that solves all the disparities already listed.

  • A new counter section that not only fills the missing gap, but also adjusts the height and solves the constant knee banging.
  • A new shelf to align all the monitors at the same eye level height along with increased storage space.
  • A new shelf along the wall over the personal computing and surveillance system monitors for more storage space.

It begins with the shelf over the monitors so there’s someplace to put the Gramazon, and the track and rail cars sitting on top of the work monitors, and anything else that needs a temporary home while fitting the new counter and the other shelf. The shelves are cut 12″ deep for the 8′ length of the sheet. That leaves the remaining 24″ for the new counter. All that remains is fitting to length and capping with screen mold for a clean, finished look.

“Hidden L” Brackets

Originally I was going to make custom wooden brackets for the shelves but the more pressing need to finish before the fiber is installed put an end to that idea. Looking at various options online, I came across the “Hidden L” arrangement. Essentially a thick, flat piece of metal with an attached mounting bracket at a right angle that is partially hidden by the shelf it supports. My only concern is how much they’ll sag under load.

The Rethink

The shelf for over the monitors is shortened to 6′ to fit the available space between the wall and the door frame. Then the screen mold is glued and brad nailed into place. Finally the piece is sanded smooth and ready for placement. After attaching the brackets to the wall at every stud, 16″ on center, the shelf is set in place. I can pull the shelf down at least ½” applying a lot of force. Even though they’re rated for 100#, I imagine I could bend or break the brackets if I hung my full weight on them.

I’m pleased with the fitment and the resilience of the brackets but soon realize I forgot to cut the angled notch out of the corner for cord relief. No matter, there’s enough clearance on either end that only the fattest power cord wouldn’t fit. Considering the only power cord so far is for the amazon dot and it could fit in the space between the bracket mount and the back edge of the shelf, roughly 0.2″ thick, it’s not a big deal.

The New Counter and Monitor Shelves Waiting For Trim In The Garage

The office isn’t quite 8′ wide, roughly 90½” from the inside wall to the outside wall. The original plan was to place the counter from wall to wall with those 36″ cabinets lifted and levelled to match, mainly to allow access to the floor plywood to rework the levelling supports beneath it to firm things up. Best laid plans…

After seeing how the wooden bracket that supports the 3D printer shelf would interfere with the back runner on the cabinet and how much trouble it was trying to maneuver the new counter into place, the plan to make everything level was quickly abandoned. Cutting to fit wall to wall turns out to be a bad idea, an awful idea in fact.

After multiple back and forth trips to trim the length it’s still a bear to get the thing maneuvered into position. Short of nearly standing the thing up just so the corners clear when rotating it into place, it’s nearly impossible to clear what used to be the porch banister, still a major structure on that wall. Add to that the overhang sagging on either side of the custom brackets and we need a new plan.

The Replan

More like we need a replan. We can add another one of those custom brackets on the end by the desk, but we’re out of luck on the end over the 36″ cabinet. The decision is made. The counter will be cut to fit up to but not cover the 36″ cabinet. That is to say we’ll remove 24″ from the 90½” length. We’ll also add that third custom bracket near the inside wall to support the sag on that end.

Next step is to rework the mounts for the drawer slides. Starting with a 1×4 doesn’t give enough clearance for the contents of the drawer. The big offender is the mixer board, stashed there until needed. The idea is to leave it connected and just pull out the drawer when we want to use it. Switching to 1x6s. My knee aren’t smashing into the drawer anymore, just the corners of those 1x6s!

The new shelf for the other monitors is cut to fit wall to wall, which is still a bad idea. After multiple back and forth trips to trim the length it finally fits. The biggest issue this time is it deviates from the plan and there’s not quite enough space for the surveillance system monitor in its planned position.

New Counter and Monitor Shelf, Complete With Third Starship Liftoff!

The picture above shows the halfway point so to speak. This is the work laptop setup. On the left in the foreground, glowing green, is the new power supply for the audio amplifier. Behind that is the surveillance system, it’s PoE ethernet switch for the cameras, and the battery backup (UPS) for those and the amp. The monitors and the laptop itself have their own dedicated battery backup (off screen to the right).

The keyboard and mouse sit atop a piece of 1×6 that spans the front of the drawer and acts as a keyboard shelf. The dedicated microphone and audio amplifier for the associated speakers is visible on the right, left speaker visible on shelf to left. The surveillance system monitor has been relocated to the right side of the work monitors. Regardless of its placement, the work monitors must shift one direction or the other. Time to go back to plan.

The original plan calls for a “round the corner” fitment for the shelf on the left end, pretty much where the left speaker and Gramazon are sitting. What’s a Gramazon? Good question. Glad you asked. See that blue thing there that looks like a gramophone? The base contains my Amazon Dot 3 and the gramophone part guides sound to and from it. It’s one of the first 3D prints I made, starting with one for Ann’s Dot 2.

“Around The Corner” Shelf And New Fiber Modem/Router

Time’s Up

Because they had to locate the utilities, pull the permits, and trench in the new fiber before they could connect us, it gave us a bit of a reprieve of maybe a week or so. The picture above shows we’re still working on getting the refit finished. It didn’t stop the installation or even slow it down. Having to go through three different fiber modems set us back more than our refit, still in progress, but at least they figured out what was wrong with their system and fixed it.

You can see the fiber modem/router in the picture above, white case with a green light. I dressed out the ethernet cables from the surveillance cameras using short lengths of Velcro® looped around on itself, and the excess length coiled beneath the fiber modem. To the right of that and under the square chunk of shelf is the surveillance system (NVR) and the PoE switch to manage all the connections.

At least this time I remembered to cut the cable relief in the back corner of the shelf. Still missing is the planned angled cut on the front corner facing out of the picture. The plan called for an 18″ square piece with a 6″ triangular relief cut from the front corner. That plan was modified to avoid having to move the shelf bracket. So 16½” it is. Hopefully that will provide enough space for the surveillance system monitor to sit above it.

Installation Finished

Both the fiber modem and office refit are installed and we’re happy with both. It certainly took some doing though. What started with dropping the Internet connection a few times a day turned into swapping modems twice, each time getting worse, not better. The last attempt and we had maybe ten minutes of connection before dropping again. Totally unacceptable! Now I’m wondering if we haven’t allowed the same company to totally screw up our Internet once again.

Both Ann and I have 100% remote jobs that require a reliable Internet connection. At least Ann has an Air Card supplied with her work laptop. Me? Not so much. I had to tether through my phone until they fixed it! They had to replace some “filter” downtown at the office just blocks away from us. This played out over the course of a week or more.

I must admit, now that it’s working reliably, 540MB per second speeds both down and up is really much better than we had before. Maybe we’ll try one of those livestreams again to really test it out. It certainly was a distraction from more pressing issues, not to mention the extra stress of having to deal with it at all. Now back to the matter at hand, the refit.

Refit Installed, Monitor Shelf and Counter Shown

A place for everything and everything in its place is the ultimate goal for the refit now that the new counter and shelves are installed. Even the idea of hanging the battery backups from the underside of the monitor shelf panned out. Most of the project “pencil boxes” are back where they sat on the counter, but all the parts kits and such are still sitting in a large tub in the corner of the office, their place yet to be determined.

The picture shows one of the benefits of having a second computer space for laptops. That’s my personal laptop, but it can share the same docking station that came with my work laptop. Convenient. Very convenient. Both are ThinkPads, but my personal one has the super sized screen, which is why it’s folded down to fit on the counter. I do like having three screens for sure.

As an aside, the Windows 11 driver for the CH340 serial controller doesn’t work, but the Windows 10 version does. You’ll never guess what’s running on the new computer. Good thing I can connect the laptop and have it talk to the Arduinos that use that CH340 chip! In fact, that’s pretty much what’s going on in the picture.

New Gadgets

Speaking of Arduinos, the refit inspired a new gadget. A new lighting gadget. You can see the first cut at it above running the “Christmas Tru-Tone™” effect. A little setup first might help. The monitors aren’t the only things sitting on the desk “Pidgeon hole” cabinet. Behind the monitors at each end of the desk are a set of lamps. Those lamps have Amazon Alexa compatible smart plugs attached so I can say, “Alexa, turn on Office 1” and the lamp on the left will light.

Convenient. Much more convenient than having to run the lamp cord by hand just to find the inline switch every time I want to turn one on or off. Unfortunately, the new shelf over the monitors on the desk blocks the light from the lamps. What used to illuminate the white ceiling and cast light throughout the office now provides just a backlight to the monitors. An unwanted backlight. We need something to replace the light we lost.

Inspired by my latest lighting adventures for controlling the lithophanes, I decided to dig out those LED strip corner frames I bought years ago to use for the train station lighting. The train station we no longer have, lost when we removed the raised bed planters along the patio. Anyway, the idea is to place the corner frame along the back of the shelf over the monitors, facing toward the ceiling and out into the office.

Those corner frames have a face at 45º to either side, meant for the LED strip to stick to, and a snap in diffuser over top of it all. While I didn’t really need the scheduling additions from the lithophane lighting sketch, I did want all the updates and bug fixes that came with it. I also expanded the “build from config” feature to get us closer to not having to create a dedicated HTML page just to control all the different lighting arrangements.

I’ll save all the exciting details for a separate post. Suffice it to say that it took some doing, both in hardware and software. The end product does what I want, provide a soft backlit atmosphere for the office, perfect to see what you’re doing but not so bright that I have to squint. This picture shows the shelf over the monitors. You can also see the split unit and the Gramazon on the right.

Let There Be Light! The New Office Lighting Gadget In Operation.

Finishing Touches

If anything remains to be done it would be to apply a finish to the new shelving. I think I’ll save that for when I have a week off of work and can take the counter and monitor shelf offline long enough to stain and finish them. I can take down the shelf over the monitors pretty much anytime I want, but I’ll probably wait and do them all at once. Who knows? Maybe I’ll get motivated to stain, finish, and level those 36″ cabinets too!

I may even break this into two parts, seems kind of long winded, even to me. Let me know what you think in the comments.

 

Back To Work!

My First Day Back To Work!

After an extended time off, I’m finally back to work. And it’s good to be back! Now the money for new trains and other Barkyard related items will come pouring in! Just in time for USA Trains to start producing their F7A-B units again! And I threw a couple of GP38s in the order for good measure… Pent up demand I suppose.

It’s nice to not have to worry about spending the money again. I was laid off back in May of 2021, so the “reserves” were running low, so to speak. This opportunity just fell in my lap! And the timing was right. Providence and all that I suppose.

I was hoping to have the Barkyard self sufficient and operational by now. Life’s what happens while you’re busy making other plans I suppose.

Just when we got comfortable with Rocket and his special needs, just when we thought it was safe, Brigel is diagnosed with a heart arrhythmia. His right atrium is three times normal size, and his heart will eventually fail. And to top that off, his digestion is hit and miss as well lately. Some days he has no appetite. Other days he’s fine. Could be worse I suppose.

Thankfully this is a one hundred percent remote position, although I did have to travel to Lakeland PD for a Go Live after my short one day stint on Jury Duty here in Lake County the day before. Everyday is a winding road… And I took them home from Lakeland. All two lane and back roads. It didn’t take much longer than taking the super slabs and toll roads would have either. Less stress I suppose.

They sent a docking station and a 24″ monitor along with the laptop. I had another 24″ monitor dedicated to the surveillance system, but decided to double it up with the one they sent. I’ve been using my son’s spare 27″ monitor as a third with the server, but reallocated it to the security cameras. I ordered a new tactile keyboard and trackball dedicated to the work system. The only drawback is sharing my project bench space. It’s not so much shared as reallocated since I have to stash the projects out of the way. But it keeps me focused on work I suppose.

Data Central

I’ve renamed my office “Data Central”. What else would you call six computer screens staring at you 24/7? I exaggerate of course. Come close of business Friday, the work laptop gets stashed until start of business Monday morning, freeing up the project workbench for the weekend. I’ve already splashed the liquid cement I use to bond the 3D printed PLA pieces on the track ball, leaving discolorations on the right button. Now I stash it too. Learned my lesson I suppose.