Smoke generator for LEGO Powered Up Train

Este artigo é a parte 1 de 2 da série  Gatto Negro

A few months ago I have made my own version of Holger Matthes’ BR80. It was not a full replica because I didn’t have all the pieces required so I had to improvise. I also opted for an all-black version instead of a black+red combination.

I decided I needed a steam engine after some experiments with a MINDSTORMS EV3 setup with a train turntable, two rail switches and a pseudo train with SBrick and RFID:

After I added a mechanism to disengage the train engine from the cargo wagon I decided I needed a steam engine since modern trains don’t need the turntable to operate.

As the SBrick had 4 outputs and I was only using 2 for the motor and the lights I wonder what else could I add to it. Choosed two extra functions that would look good on a LUG exhibition:

  • a smoke engine
  • a horn

The initial project was dismantled but I’m now returning to it with a MILS-based layout to use in larger dioramas with other PLUG fellows:

Currently the turntable and the rail switches are still manually operated but at least I now have a steam engine. With real smoke:

This is ‘Gatto Negro’. It means ‘Black Catt’, I’m using the extra ‘T’ because in Bluetooth Low Energy jargon ‘GATT’ means ‘General Attributes’ and I’ve been using a lot the linux command ‘gatttool’ to quickly test my BLE devices.

Of course ‘Gatto Negro’ is also BLE – it uses the new LEGO Powered Up hub and the PUP version of the LEGO Medium motor instead of the Power Functions IR Receiver, LiPo battery and M motor.

Unfortunately with the current firmware of the PUP Hub using a M motor isn’t the best option: the remote BLE Handset doesn’t hold the speed setting so we have to control the train with short or long button presses, always at full speed. Same happens with current LEGO App because LEGO programmers decided that only a train motor should be used for trains (each PUP device has an unique AutoID and the App was made to use train motors with train controls and non-train motors with car controls).

So I made my own ‘Gatto Negro’ aplication, with MIT AI2.

Next posts I’ll write about the smoke generator and the App.

The Powered Up Smoke Engine

Este artigo é a parte 2 de 2 da série  Gatto Negro

I will now explain how to connect a smoke engine to the Powered Up Hub – a method that can be used for several type of electric or electronic devices, not just a smoke generator.

First we need to remember the pinout. I show here the female plug on the hub, it’s easier to see the pins:

Powered Up female connector

Thanks to JopieK who opened up is PUP Train Motor for the good of science we already know the names given to each pin by LEGO:

1 – M1
2 – M2
3 – GND
4 – VCC
5 – ID1
6 – ID2

These are the names from the Train Motor side, not necessarily from the Hub side (some of us suspect that pin 5 and pin 6 combine Analog Input and UART functions). For this post purpose these names are enough.

So to emulate a PUP Train Motor we just need to short ID1 to VCC and ID2 to GND and use the M1 and M2 pins:

Powered Up cable hack – train

So I used a PF2 available cable (don’t ask) and stripped the insulation off, joined wire 3 to wire 6 and wire 4 to wire 5 and soldered these two junctions:

Powered Up cable with Train Motor AutoID

Then used heat shrinking tube to isolate these junctions:

The two remaining wires can now be used to control anything we want with a PWM signal of  near 9 Volt (from M1 to M2 or M2 to M1, depending on the direction we choose for the “train motor”). This is the same signal of Power Functions so if we want to connect a LEGO PF motor we just need to connect these two wires to C1 and C2 of a PF connector.

But I want to use a Seuthe Nr. 99 smoke generator for H0 scale trains:

This little device operates with a voltage between 8 and 14 Volt and consuming around 140 mA. My previous experiments with PF revealed that I would need more than just 8V so direct attaching it to a PF cable wasn’t enough, I needed a boost circuit to raise voltage a bit – I used a small circuit and trimmed it to ~11.2 V.

It worked quite well with my PF version of the BR80 so I just reused the circuit, replacing the PF cable with this PUP cable:

Final cable

The circuit is very simple, just a small rectifier bridge and a pre-assembled small boost circuit (Pololu Adjustable Boost Regulator 4-25V, item #799):

The rectifier bridge’s function is to prevent damage to the boost circuit that don’t work with negative voltages when we reverse the direction of the “motor train”.

So how does it work?

Since we are using the same AutoID of the PUP Train Motor, the Hub will notice it as such when we connect this PUP Smoke Engine. So if we use a PUP Handset we just need to press + or – button a few times until the “train motor” receives enough voltage for the boost circuit to work and heats the Seuthe to produce smoke. Same if we use the LEGO App… unfortunately with my BR80 the App doesn’t work because the PUP M motor is not accepted as a valid train motor.

So I made my own ‘Gatto Negro’ App.