LEGO Train 12 Volts

NS 345 Battery Powered

Recommended Posts

Posted (edited)

Chapter 3 of 4

Hello everyone, after more than six months I'm here again with my third project using Circuit Cubes components to power this fantastic diesel shunter (on sale on Blokbricks)

ns345-000.jpg


It was too sad to have such a beautiful locomotive without an engine (and without lights :wink:) , now thanks to the Bluetooth microcontroller this has been possible! :thumbup:

To house the components I had to enlarge the cabin by one stud, the difference is almost not noticeable:

ns345-007.jpg

Enjoy the video and the pictures... :classic:

 

ns345-008.jpg

ns345-009.jpg

ns345-011.jpg

(wagons by @Toastie)

ns345-013.jpg

ns345-014.jpg

ns345-015.jpg

ns345-016.jpg

See you with the last chapter!

 

Edited by LEGO Train 12 Volts

Share this post


Link to post
Share on other sites

This is very interesting and cute. I really like it but I could not see a difference in width. No matter how hard I looked.

Then I noticed that it is one stud longer in length. So I am sorry to be some kind of corrector.

Share this post


Link to post
Share on other sites

Oh, this is soo nice!!!

Congratulation on that super nice and nifty shunter!

Spoiler

Emanuele, are you planning on using a smartphone or the LEGO remote to control these beauties? You are showing the app control screen, you programmed - I have just finished my Steam Punk elevated train project, which also uses the BLE Circuit Cube and a Cubic motor (well, actually two) controlled by the LEGO PUp remote. @Asper's BLE code running on an AtomM5 works flawlessly of an ESP32 Devkit board as well, and you have ample of digital and analog IO pins to do other stuff (controlled by the LEGO remote as well) plus you can hook up more than one CC to the remote. And actually also more than 1 remote ;) I am very happy to share that code! Shall post that soon.

All the best,
Thorsten 

Share this post


Link to post
Share on other sites
Posted (edited)
On 3/4/2024 at 4:58 PM, Darkkostas25 said:

Love the angled shaping of the front part

I like that part too! :pir-huzzah2:

On 3/4/2024 at 5:24 PM, Toastie said:

Emanuele, are you planning on using a smartphone or the LEGO remote to control these beauties?

All the best,
Thorsten 

You've hit the jackpot: the screenshot I posted is from the app programmed by my son! :sweet:

The app was programmed with Android Studio and Kotlin, and connects directly to the Circuit Cube via BLE.

The code was developed by studying an open source project found on GitHub (the author was "asperka" ...does this name suggest anything to you? ...Maybe @Asper :laugh:?), which showed how to set motor speeds by parameters exposed by the CC via BLE.

If you want I can share the relevant code snippets with you via direct message.

Greetings :classic:

Emanuele

Edited by LEGO Train 12 Volts

Share this post


Link to post
Share on other sites
58 minutes ago, LEGO Train 12 Volts said:

The code was developed by studying an open source project found on GitHub (the author was "asperka"

Heehee - how cool is that - how totally cool.

asperka ... @Asper ... aluminum hat off ... you know, this is the utter power of open source. @Cornelius openly provided his LEGOINO source code. Steffen studied that and used it for his wonderful (I phrased it before and will do it again:) CIRCUINO source code - and both guys put it on GitHub for everyone to inspect and learn from it. Now your son made his software for another platform, studying Steffen's code. It is simply THE best.

Spoiler

 

Now, I am too old for programming smart devices and use them efficiently (yes, I can take voice calls - as back in the days :D, schedule Zoom conferences, and scan QR codes, but that's about it) but love microcontrollers, as they provide so many more interfacing ports ... when mounted on dev boards of course. And, when it comes to the core of the matter, I/O, are all descendants of, well, stone old hardware :pir-huzzah2:

Will post in the Community Forum (with close to zero reads of course, it is evil territory over there, visiting the dark net is a joke in comparison) what I have done with the ESP32 Devkit programmed with Visual Studio Code/PlatformIO/Arduino CLI for my suspended monorail Pantasy Steam Punk train/layout.

 

And of course please any time via direct message; you have my email address as well ;)

Say hello to your son and the family!
All the best,
Thorsten

Share this post


Link to post
Share on other sites
Posted (edited)
On 3/4/2024 at 11:07 PM, Toastie said:

Now, I am too old for programming smart devices and use them efficiently (yes, I can take voice calls - as back in the days :D, schedule Zoom conferences, and scan QR codes, but that's about it)

Heehee ...Like you I'm too old for programming smart device ... two old generation X can't compete with a young generation Z :grin: ...but these new generations of kids are involved in programming on new platforms thanks to their old parents ---."when it comes to the core of the matter, I/O, are all descendants of, well, stone old hardware" ---  I love this sentence :laugh: true and comforting!

Thanks for greetings, and yes. I will write to you in the next few days! :wink:

Edited by LEGO Train 12 Volts

Share this post


Link to post
Share on other sites
16 hours ago, LEGO Train 12 Volts said:

two old generation X can't compete with a young generation Z

It is even worse: I am a baby boomer, not even on any border, just that ... :snicker:

Well, I fluently speak a couple of BASIC dialects. There must be a time, when this comes back. I mean, white tennis socks came back, after two decades of mocking me; I always did, do and will wear them :pir-love:.

BTW, I finally did get my C++ code up and running to operate the Circuit Cube sitting on my suspended Steam Punk monorail train using an ESP32 board. The good thing is: C++ is so flexible, that you can almost boldly code in BASIC style. The hard work (BLE discovery and pairing etc.) was done by Steffen and boy, these files >are< true C++ code! I have posted the link in the Community Forum (main_V5.cpp on my BrickSafe).

So cool, that there are so many ways to operate the CC critters!

Best,
Thorsten 

Share this post


Link to post
Share on other sites
12 hours ago, Man with a hat said:

How lovely those little shunters. But impressive to get them powered.

Thanks @Man with a hat, the motorization was a challenge but the CC components are a great help to achieve the goal! :classic:

4 hours ago, Feuer Zug said:

So cute and now functional. Great work.

Thanks for your kind words @Feuer Zug! :thumbup:

4 hours ago, Toastie said:

It is even worse: I am a baby boomer, not even on any border, just that ... :snicker:

BTW, I finally did get my C++ code up and running to operate the Circuit Cube sitting on my suspended Steam Punk monorail train using an ESP32 board. The good thing is: C++ is so flexible, that you can almost boldly code in BASIC style.

Ooh yeah a baby boomer ...then your qualities are even more admirable (not that I had any doubts about it)! :tongue:

I agree about the flexibility of C++, these are the same words of my son, in this case he used Kotlin to stay in the Android context.

 

Note
The tennis socks part was really cool :laugh::laugh:, the irony goes well with the genius! :thumbup:

All the best

Emanuele

Share this post


Link to post
Share on other sites
Posted (edited)

Great job integrating everything in such beautiful eninges!

On 3/4/2024 at 9:48 PM, LEGO Train 12 Volts said:

 (the author was "asperka" ...does this name suggest anything to you? ...Maybe @Asper :laugh:?)

Yes, that's me ;-) So It's the same codebase...  (asper was not availalbe on github and I'm living in KArlsruhe...)

Edited by Asper

Share this post


Link to post
Share on other sites
6 hours ago, Asper said:

So It's the same codebase...  (asper was not availalbe on github and I'm living in KArlsruhe...) 

Oh yes absolutely the same ...thanks to you! :thumbup:

What amazed me was that you already had knowledge about CC in 2021 ...great work! :pir-huzzah2:

...and now the suffix KA is also clear :laugh:

Share this post


Link to post
Share on other sites

Very nice, it is generally refered to as "Sik" (goatie in Dutch). They were originally in DkGreen, but later NS painted them Yellow.

https://miljoenenlijn.nl/artikel/loc-248-08-sik/

There are variants including the ones having a crane:

https://www.spoorwegmuseum.nl/en/ontdek/de-collectie/our-trains/ns-362-sik/

B.t.w. you could use e.g. enamel wire to also power the top head-light: if moving in a forward direction it should have white lights in a triangle. It should also have a red flash light on top (which used to be blue when they were delivered from factory).

Share this post


Link to post
Share on other sites
10 hours ago, zephyr1934 said:

They're so cute!

Thanks Benn! :classic:

6 hours ago, JopieK said:

There are variants including the ones having a crane

Wow I missed this one! :thumbup:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.