Braill3 Mk2 – Redesigned LEGO Braille Bricks Reader

Original Braill3

A little over a year ago I designed a Braille Bricks reader. I was pleased with how that came out, until I tried to demonstrate it at a show. It was struggling to accurately read the boards. After some thought it became clear that the whole structure was too flexible and the table at the show was uneven which was causing the problem. Since the bot moved over the entirety of the board, there could be variations in height of the bricks causing the misreads.

Redesign

For various reasons I didn’t tackle the issue with the misread for several months. When it came up to the next show I still hadn’t tackled it, so I decided that I’d revisit it after the show.

To make things sturdier I decided that the bot would stay in one place (whilst reading) and the board would move underneath it – in a very similar manner to my loom’s pattern scanner. This would allow the ‘bridge’ structure to be stronger as it would be anchored properly underneath and, also, a consistent support under the board. It does, however, mean the bot needs more space to operate; the original one needed ~40L horizontal space vs ~66 for the Mk2. I think that’s acceptable for the purposes or showing.

(Re)Coding

When it came to recoding, I was rather fortunate. The original design used a 1:1 gear ratio driving an 8T gear to move the board. This one, to resist gear skipping, uses a 24T gear, so I’d need to down gear 1:3. By fluke I’d decided to reduce the load on the motor by using the 12:36 gearing (visible in the pictures above), so ultimately it was still a 1:1 gear! All I needed to do was change the direction of the motor which is easy to do in Pybricks on ev3dev.

I also needed to tackle the ‘touch’ sensing code. The original design’s ‘bridge’ would sag, which meant the ‘finger tips’ were closer to the board than on the redesign. This had a knock on effect that the test for a column with no studs could fail and be detected as no brick present, i.e. a space. All that was essentially needed was to extend that range a little along with some other logic changes.

Sound Quality

Another thing I wanted was to make it louder, again for the purposes of showing. I’ve blogged about that recently in External (USB) Audio on EV3 Using ev3dev

BIs and Code

As usual, I’ve released the code and BIs under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International CC BY-NC-SA 4.0 deed

External (USB) Audio on EV3 Using ev3dev

Recently, whilst working on my Braille Reader rebuild, I decided that it was time to investigate options for an external speaker to increase the volume, as the onboard speaker is rather quiet.

Bluetooth Speaker

I’d seen that other people had managed to get Bluetooth speakers working with ev3dev and Pulseaudio, so since I had a BT speaker lying around I thought I’d give it a go. Unfortunately it wouldn’t connect. The EV3 would see it, pair, but any attempt to connect resulted in a Bluez error. It was an old speaker so I decided I’d get a new Anker (I’m a fan of their stuff) one, which would also see duty with my bat detector as well. That also didn’t connect. I’m guessing that the EV3 wants to use a rather old protocol that neither of my speakers supported, which is a shame.

USB Audio

Not one to give up on using an external speaker I wondered if USB audio would work instead. When I changed my phone, I ended up buying an Anker USB-C to 3.5mm headphone DAC:

I did need to use a USB-A to USB-C adapter, but it worked. It worked really well, on the whole. Using USB alone didn’t require Pulseaudio to be installed once I’d set up the .asoundrc file in ~robot:

defaults.pcm.card 1
defaults.ctl.card 1

The downside to using .asoundrc is that if the USB adapter wasn’t plugged in, there’d be no output. So I decided I write a little audio configure function that could be called at the start of my program to detect if there were any additional audio outputs and present a menu of choices, defaulting to the current one in .asoundrc:

If only the onboard audio is available, no menu will be shown and it sets the .asoundrc to use device 0.

Issues

So that I didn’t need to use the USB-A to USB-C adapter I did buy a USB-A audio device:

I wouldn’t suggest using that one. It’s very, very, quiet and the audio quality is poor. It glitches and, worst of all, it chops off the beginning of any sounds played to it which, given I want to use it for speech output, isn’t useful. The Anker unit is just so much better: louder, smoother, and plays the entire sound.

The other issue I came across is that using the ev3.speaker.say(…) function would often crash. It appears that the EV3 isn’t powerful enough to manage sending USB data whilst generating speech via espeak and sending that on to aplay. My answer to that is to manage all that in my own code and temporarily write the speech output to the /run/user/1000 tmpfs directory – that way it won’t damage the SD card:

    def Speak(self, text, filename=None):
        if filename:
            play = False
        else:
            filename = "/run/user/1000/speech.wav"
            play = True

        os.system(
            "espeak -a {} -v {} -s {} -p -w {} '{}'".format(
                self.speech['volume'],
                self.speech['voice'],
                self.speech['speed'],
                self.speech['pitch'],
                filename,
                text
            )
        )

        if play:
            self.ev3.speaker.play_file(filename)

The code above accepts a filename as, for the Braille reader, I pre-generate some cached text prompts.

Utils Code Library

I’ll blog separately, but I refactored all the code that was used to generate the device selection menu et al into its own package so that I could release that. Hopefully it’ll be useful to someone else.

EV3 Pattern Board Scanner

My redesign of the pattern board scanner part of my loom is basically complete. As it currently stands it’s a standalone scanner. It works ! It’s much faster than the old system and is really clean in its operation. I need to retrofit the new code into the loom controller code, which I’ll do in a few days’ time. Before that I want to deal with how the unit will sit on top of the loom, so I need to put the loom back into its operating state and get thinking.

Releasing the BIs and Code

Since this is working as a standalone device, and I’ve posted about it a couple of times on Facebook:

https://www.facebook.com/groups/legomindstorms/posts/3121354191346119
https://www.facebook.com/groups/legomindstorms/posts/3125960860885452

I’m, as usual, going to post the BIs and code for public use. I’m licensing them under the Creative Commons Attribution-NonCommercial-Sharealike 4.0 International licence CC-BY-NC-SA 4.0

The BIs are here: https://jander.me.uk/LEGO/resources/Scann3r.pdf
The EV3g code is here: https://jander.me.uk/LEGO/resources/Scann3r.ev3

There are no cables in the BIs – they’re a pain to route so I’ve left them out. The cabling ports and cable lengths are in the BIs. Routing them is left as as challenge to the builder 😉

The code will scan a board showing the dots as it goes, then clear the screen, and reshow the code from the scanned data. This can then be used as a base for something else.

Calder Valley Brick Show 2025

So yesterday was the annual LEGO show over in Mytholmroyd. As usual, a superb but tiring day – I’m not used to 9 hours on my feet 🙂

Surprisingly we went the whole day and didn’t need a single change of batteries, which given that the remote control bots were in non-stop use was rather amazing.

I re-programmed my Bra1der with Pybricks (beta) the week before the show. That proved to be a very good thing. The braider just got on and did its job. No misaligned bobbins going between the slots due to motor overshoots, or weird random slow-downs that the original LEGO firmware used to suffer from. I even tried one of the braids it had been programmed with but I’d never got around to trying. I think it looks rather funky:

I did have a few issues with some of the bots going a bit potty but nothing insurmountable. The Mindcub3r did go through a period where it wasn’t solving cubes at all – not sure what was going on there. The only thing I can think of is that the EV3 was still set to a 30 minute sleep, so maybe the internal solver was getting killed? Who knows. I did have one casualty. The 3D art pen in the EV3DPrinter blew itself up:

The nozzle got blocked and the filament feed, being at the back, managed to pop the end off. So that was that for the 3D printer for the day. That was a shame as I like having that running. I have done some maintenance on the pen today, so I hope that will be back in operation for the next shows.

The loom behaved itself perfectly. It probably wove the best scarf it’s ever done! It still had yarn left in the bobbin frame at the end of the day, so I wasn’t able to finish the scarf during the show. I think that’s down to me starting the loom at 11am. I know that a 9am-5pm show will result in a completed scarf.

So, whilst I sit here and type, it’s currently doing a bit more weaving. I’ll finish it off in the next day or so, take some photos, and get it up on eBay with all the proceeds going to the Forget Me Not Children’s Hospice charity. So watch this space for the eBay link!

Robot Inventor: Pass the Build – Charlie

Over the past week or so, several members (including me) of the RobotMak3rs RLOC have been having a lot of fun playing with LEGO’s new Robot Inventor kit (51515), which will be released on 15th October this year. Many thanks goes to LEGO and the RobotMak3rs RLOC for supporting our ideas.

My idea was for us, as world-wide community, to have fun building some of the models together. Here’s the first of the videos – Charlie:

Pass the Build of Charlie

Watch this space for the other models!

The RobotMak3rs Community Facebook page can be found here: https://www.facebook.com/robotmak3rs/

#mindstorms #robotinventor #robotmak3rs

Weav3r Cloth Winding Drum Update

A little while ago I posted about my new cloth winding drum. Up until that point a lot of it had been built, but I still didn’t have any of the 1L worm gears needed to drive the turntable ends to the drum. Only the 3D LDraw model showed that it’d work.

Since then, I’ve given in and ordered some via BrickOwl. I finally had the opportunity to test the build out and, unfortunately, it didn’t work as intended. The turntables could easily skip off the worm gears under load – loads which it’s likely to see in operation due to the tension in the warp threads. A little bit of investigation showed that the structures that were holding the worm gears in place were flexing under load. There was nothing to stop the split cross-blocks from rotating a little. Since then I’ve redesigned that section to stop that rotation:

Worm gear support.
Redesigned worm gear support

This appears to work perfectly 🙂 . Without risking breaking something, I am unable to cause the worm gears to skip on the turntables.

A few photos of the real cloth drum and its update:

Complete cloth winder, with drum in-situ.
Drum removed.
Drum removed.
New worm gear and its strengthened support.
Worm gear meshing with the drum’s left turntable.

The LDraw model has been updated to include the new support:

http://jander.me.uk/LEGO/resources/Cloth%20Winder.ldr

This work is released under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International licence.

EV3DPrinter Build Instructions (variant)

For some time now I’ve been using the excellent EV3DPrinter, designed by Marc-André Bazergui. The original information on this model can be found at https://www.instructables.com/id/NEW-EV3Dprinter/

To help rebuild his model, Baz had produced a 3D model made in LEGO Digital Designer. That software is almost, if not, obsolete so it’s not so easy now for others to rebuild his model. When I’ve shown it working at exhibitions there has been great interest from people about building their own copy of it – to which I’ve responded that I really ought to make a step-by-step PDF of it for others to follow. I have finally done that.

My build of the EV3DPrinter has been modified. A few sections of it have been altered, and other things have been moved around – e.g. the Y-axis touch sensor is in a different location. In addition to changes to the model I wrote all my own code from scratch, so my sensor and motor ports are different to the original. In addition I have made BIs for an additional pen-holder for a different type of 3D pen.

The BIs for the main model can be obtained from:

http://www.jander.me.uk/LEGO/resources/EV3DPrinter%20JN.pdf

The BIs for the Type 2 pen holder can be obtained from:

http://www.jander.me.uk/LEGO/resources/Pen%20Holder%20Type%202.pdf

The EV3g code can be obtained from:

http://www.jander.me.uk/LEGO/resources/EV3DPrinter_JN.ev3

Additional to the EV3 code you will need some data files for the 3D models, such as the letters or the castle:

These data files are in a zip file that will need to be extracted and all .rtf files downloaded into the EV3 in the same folder as the main code. This file can be obtained from:

http://www.jander.me.uk/LEGO/resources/EV3DPrinter_JN_Data.zip

There are several programs:

  • Basket Body
  • Basket Lid – These two combined make a small basket with fitting lid
  • Tubes – A pair of intertwined tubes, a bit like Penne pasta 🙂
  • Stars – Make various pointed stars / cones
  • 3D model – choose a test, boat, castle, and the parts for the FLL logo
  • Letters – a menu of letters, for which the height can be changed

When the program starts it will initialise the mechanism. Both the X-axis and Z-axis have adjustable axle stops. The X-axis stop may need to be adjusted to get the base plate central. The Z-axis stop will most definitely need to be adjusted to get the tip of the pen close to the plate. My advice, before starting any printing runs, to manually move the Z-axis elevator to get the pen to the correct height and then alter the sensor axle at the back so that the touch sensor is just pressed. This will ensure that when you start the program that the pen isn’t accidentally driven in to the plate, or that the pen is too high.

After initialising, the program will ask what type of pen is in use: “press and hold” or “on / off”. The original type of pen, as shown on Baz’s instructions, was a “press and hold” version. The 2nd type of pen I have, you press once to start and press again to stop. The program will need to know what style you’re using. The EV3 will remember your last choice and pre-select that at the start of each program.

This work is released under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International licence.

Bobbin Wind3r Code & BIs

Over the past few weeks I’ve been working on a robotic bobbin winder for my Weav3r loom. Previously, at shows, I’ve had a simple motorised mechanism for winding them but it required my attention to wind. After regular suggestions from Martyn Boogaarts about making a bot to do it, I finally pulled my finger out and got on with designing one:

My intention is to ultimately release the BIs for the loom, but it is taking some time to construct the 3D models for it. One of the issues with the loom is that I’ll need to dismantle significant portions of it to find out how I built it 🙂

I mainly model things for my own benefit so should I have a need to rebuild, I can. For this model, I figured I’d actually produce a proper BI PDF and release that and the code for those that wish to have a go at building it. I should note that I have been a little lazy with the BIs and not run any cables. Instead I have inserted the cable ends and colour-coded them. You will need 1x 50cm, 1x 35cm, and 4x 25cm cables – I’ll leave the routing of them to the builder.

This model will probably need an instruction manual, although I’m hopeful that it ought to be relatively clear how it works. The video above shows how the yarn is threaded through but that ought to be obvious. The code has a menu system which also ought to be clear. If there’s enough feedback/demand for operation instructions, I’ll write up a blog article/document to do that.

The code and model are released under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International licence.

The code can be obtained from: http://jander.me.uk/LEGO/resources/Bobbin%20Wind3r.ev3

The BI PDF can be obtained from: http://jander.me.uk/LEGO/resources/Bobbin%20Wind3r.pdf