Using Lego to Try to Take Over the World!

phipli

Tinkerer
Sep 23, 2021
200
155
43
Last couple of days I've been messing with a 9751 Lego serial interface from about 1994 on my LC 475. Lots of fun. I don't have many official sensors to go with it, but I've made a couple of my own.

Yesterday I got it working after working out that the TX and RX were backwards as if it was a host RS232 port instead of a peripheral port, despite it being a female port, so I made an adapter that switched them over (other than TX and RX, only Gnd is needed). I spent the rest of the day making progress learning how to use the hardware and software. It is extremely comprehensive.

See the reference manual for the software here : https://archive.org/details/cl_reference

Short video of some of the messing I did yesterday (please excuse the typo - I edited it on my phone at half one in the morning after accidentally losing the first edit)


And a photo from today of the fan controller I wrote. I need to finish removing some of the hard coded stuff for the setpoint - I was concentrating on getting the graph stuff working (it is usually much simpler, but I had to do it in a weird way because I wanted to plot the switch on and switch off thresholds on the graph.

1735167412190.png

Ultimately, the plan is to add the Lego interface to the datalogging software I started writing before the last few busy weeks.
 

bakkus

Moderator
Staff member
Mar 18, 2022
92
65
18
This is really cool! I remember wanting one of those panels.
There's a semi-related project over at https://blocko.net/ where @GutBomb has created an interface card for the previous generation Lego Technic Interface A (Lego 9750) for the Apple II.

I love how period correct this feels, using the next generation + a 475 <3
 
  • Like
Reactions: phipli

phipli

Tinkerer
Sep 23, 2021
200
155
43
This is really cool! I remember wanting one of those panels.
There's a semi-related project over at https://blocko.net/ where @GutBomb has created an interface card for the previous generation Lego Technic Interface A (Lego 9750) for the Apple II.

I love how period correct this feels, using the next generation + a 475 <3
Yeah, I think the official names were "Lego Dacta Interface" for the one that works with the Apple II, Commodore Pet / 64 and BBC Micro, and then the one I'm using was called the "Lego Dacta Interface B". Sadly I don't have one of the originals, but they're basically a bidirectional parallel port based on the 6522 VIA (the same chip used in old macs to do a lot of the interfacing between peripherals and even to set the machine ID - on later 68k and PPC macs it was embedded inside one of the custom chips). Making a clone of the external box should be fairly easy, similar to making the Apple II card. Once I fix my Apple II I might give it a go.

It works really well on the LC 475. I have seen that there was a newer version of the software made which seems to have made a couple of improvements (like replacing the splash screen which weirdly is only about 8 colours and looks terrible). There is an interesting video someone uploaded here :


I like messing with and documenting old serial interfaces. I've been working their various protocols out. Its fun to get something that is unusable and getting to the point that you can control it from HyperCard :ROFLMAO:


Or RealBasic :

 

phipli

Tinkerer
Sep 23, 2021
200
155
43

Documented some serial cable info if anyone is ever trying to get one running.

Had fun today - I got a couple of angle sensors (I felt they were the only sensors that would be a bit too much effort to make my own). They work sort of like a single axis of a ball mouse and the software reads it either in degrees, or a count. Resolution is 16 steps per rotation.

Anyway, I wrote a program that controls the speed of a motor depending on the angle of a lever, so sort of like a throttle peddle, and then I wrote some code that reset the counter on a sensor straight on the motor, waited a second, and then used that count number to calculate (lets be honest, estimate) the RPM of the motor. It is fairly close to the speed reported on the internet by people that have measured that specific motor, but it will be out due to the low resolution and the fact that I'm using an interpreted language meaning commands are "slow" to execute. It would be more accurate, but less responsive, if I let it run the counter for longer.

Here is the plot it made (all in the Lego software) of the RPM (green) against the power level (0 to 8, but times 100 to make the scales match) in red. I slowly moved the lever through each power level, but ignore the bit where I accidentally dropped the lever :ROFLMAO:

1735916933736.png

and this is the "throttle" :

1735916979300.png

and the rotation sensors (with the other end of their leads clipped on to the bottom) :
1735917048386.png
 

phipli

Tinkerer
Sep 23, 2021
200
155
43
I wrote a little program that extracts styled text resources from a file (in this case application) converts mac encoded characters, changes formatting to html and spits out a file for each resource. I used this to export the 300+ pages of the in application manual for Control Lab and LOGO...


Then I accidentally made an extremely retro webpage to access it. Searching is for wimps.

Let me know if you have any projects that need to turn hundreds of text resources into html :ROFLMAO:

1736100216476.png