Bye bye BLTouch

It seems we are not quite out of the woods yet…..

I was showing off my 3D printer last week and it promptly buried its head in the print bed and dragged it around. Wonderful.

I’ve had this problem for a while. The BLTouch sensor on my machine has got very unreliable. This is the little probe that tells the printer when the had is close to the bed. Or not.

Anyhoo, I’ve spent the afternoon removing it. I’ve been manually adjusting the print height for years and I don’t mind doing it again. I’ve loaded up the Jyers firmware which has a very nice automated levelling function which moves the head to the different corners so you can set it up by hand. This works very well. Now all I need to do is solve the bed adhesion problem I had while printing some more Tags of Fun. The good news is that the print quality is excellent. The bad news is that half way through the print process the thing I’m printing tends to want to go off for a walk…..

Driffield Steam Fair

There were loads of engines like this

Last week we couldn’t make our annual trip to the Whitby Steam Fair because bad weather got in the way. So today it was excellent to be able to go down to the Driffield Steam Fair and look for some traction action (sorry).

I was worried that the Driffield event might be smaller than the Whitby one, but it turned out (at least to me) to be a bit bigger. There were loads of engines, large and small bustling about the showground. There was a funfair, pizza and amazing bubble waffles. The weather had a little go at spoiling this show too, but there were only a couple of showers during the four hours we were on site. It was great. I’m definitely going again next year.

Agile Octopus for tariff fun and games

I think we’ll have salad for tea

I’ve just added another monkey to my back. I’ve signed up for Agile Octopus. This is an energy pricing scheme that uses green energy which can change in price depending on the weather. I now really like the idea of strong winds...

The tariffs are set on a half hourly basis and you get them the day before. I’m keen to have a go with it because it would be nice to get paid for charging the car (if there is a lot more power than demand you can actually get prices to go negative). If I had a battery in the house and/or solar power it would be even more interesting.

We’ve been on it for a couple of days and it is quite fun. I’m not sure if we’ll be on it for ever, we’ll have to see what effect it has on the bills.

Fun with Bitzee

You can interact with the pet by tapping the moving leds. A bit scary but it seems strong enough.

One of the many nice things about having kids around for a while is that you get to look at their toys. For example there’s the Bitzee digital pet. It comes in a little case like a ring-box and when you open it you see a little vibrating bar which has OLEDs on the end. These use persistence of vision to display your little pets. The picture above was the best I could get after several attempts. It has slightly cut off the head of the little bird.

You get to feed and clean up after your pets. There are also some simple mini-games and you can attract new pets over time. I really like the display - it’s much more interesting than a panel and the different animals have distinct personalities. It doesn’t look like it will take over your life either, as when you’ve done playing with it you just close the box and everything stops. It’s a bit pricey but I think it is worth it given the display.

Sewerby Hall for the win

I should probably use some smart technology or other to remove the bin on the right..

Today finds us at Sewerby Hall for the day. If you happen to have a six year old to amuse this is a great place to visit. They’ve got a zoo with penguins, mini-golf and a land train that takes you down to Bridlington sea front where you can find loads of arcades containing penny falls machines. Great place.

Radios in tins = bad idea

Perhaps they might make a nice birthday present…

I’m making a new embedded device. It’s going to be a Bluetooth remote control. I’m on an upcycling kick at the moment, and in a tradition going back a while I thought I’d put the device in an Altoids tin. I bought the mints and then I realised that Bluetooth uses radio to work, and putting the PICO W in a metal box (i.e. Faraday cage) might not be for the best. Oh well.

ESP resources from Rob

Sprockets are apparently in…

I got a nice comment from Dave which also asks about any resources for the ESP8266 or the ESP32 devices. I thought I’d pop the answer in a blog post.

You can find all my ESP32 blog posts here. You can find all my ESP8266 posts here. I’ve written a bunch of articles for HackSpace magazine which include ones about ESP devices which you can find here. I’ve got a bunch of project repositories which include those devices on my GitHub pages here. I hope you find them all useful. Or at least one or two.

What is DNS?

A survey released today reveals that not many people know what “DNS” stands for. It’s a computer networking term that specifies the system used to convert internet names into the physical address of a computer. They say that this is bad, but I think they were asking folks the wrong question. If they’d asked folks “what is robmiles.com?” most of them would probably have said it’s an address on the web. Which is just about all you need to know about DNS.

What folks do need to know however is that robmiles.com costs me a few pounds a year to keep active, and that when I set it up nobody checked that I was really Rob Miles. A Domain Name (which is what robmiles.com is) can be bought for a tiny price and there is no process of checking that the names represent what they imply. Today I can buy the domain name “bbcradio.media” for less than two pounds. I can then set up websites with that address and pretend to be the BBC

You could be the BBC for less than a couple of Quid!

So the important thing to know is that internet addresses are easy to get and very cheap, which means you need to be seriously careful when you go onto the internet and start looking for things. You also need to be careful when you get emails from people claiming to be from a particular organisation or company.

Chunking your ESP32 Web responses

Note that this is not actually how computer memory works

Great title for a blog post eh? One of the wonderful things about modern embedded devices is that they can host web sites. You can use your phone to browse content served by a device that cost less than a pint of beer. Although some people prefer to buy the beer.

Anyhoo, I’ve been making devices that host web pages as part of the configuration process for my Connected Little Boxes. You turn the device on, scan a QR code with your phone which connects to a WiFi hotspot served by the device and then scan another QR code to get to a configuration page so that you can enter your local WiFi credentials and generally set the device up. This is how lots of connected devices work, and I wanted to make my own system for doing this. And I ran into problems with memory. Not forgetting what I’m supposed to be doing (ho ho) that happens all the time. More like the way that once I’ve got everything running on my little ESP device I’ve got hardly any memory left for large things (comparatively) like web pages.

Now, one way to serve out a web page is to put the page content into a string and then send that string out. This works, but you need enough memory to hold the entire string. Which it turned out I didn’t have. So a better way is to send the page a chunk at a time. The ESP8266 web server has a way of doing this:

server->chunkedResponseModeStart(200, F("text/html"));
server->sendContent(settingBuffer);
server->chunkedResponseFinalize();

The first statement tells the server I’m sending a bunch of chunks. The second statement sends a chunk of text from the settingBuffer string. You can send as many chunks as you like. The third statement ends the chunking. Very useful, particularly when you discover that you can send out chunks of text that are stored in program memory rather than ram.

So I got all this working and then I wanted to move the code to the ESP32 device. This chip is a bit more expensive than the ESP8266 but it is a lot more powerful. And it doesn’t do chunking. Wah!. Fortunately I found this wonderful post which told me how to extend the ESP32 web server to make chunked responses work in the same way as the ESP8266. It will be part of the latest version of the Connected Little Boxes embedded code (tentatively titled HULLOS-X) soon.

When in doubt - rebuild everything

Working work in progress

I’ve spent the last week trying to get an ESP8266 device to host a configuration web site for my Connected Little Boxes. It’s proved to be quite a challenge (see Monday). I had the worst possible fault. One that only appears every now and then. And causes the whole thing to just crash.

In the end I decided to go back to first principles and run one of the example applications in a brand new project. And it worked a treat. That’s good because I now know that what I’m trying to do is possible (always useful knowledge) but bad because my code still doesn’t work. In the end I migrated all my code into the working example and went from there. In the process I discovered that, for whatever reason, the code I had been using was based on very old driver code for the device. Early versions of the ESP8266 libraries were known to be a bit buggy and unreliable. I thought that mine had been updated as part of the normal behaviour of PlatformIO (which I’m using to build and mange the app). This turned out not to be the case.

So - if you’ve got problems that you don’t think are your fault, it might be worth checking to see if you are using the latest version of the libraries for your product. Of course, new versions also bring new bugs of their own, so make sure that you keep copies of the old version too…..

Don't make everything a challenge

This is actualy how it looked when I was working on it…

I personally think that a bit of failure is good for you. But not too much. One of the better ways to fail is to turn something into a challenge. Today I was faced with something broken. I figured out what was wrong and how it could be fixed. And then I tried to fix it. It looked like an interesting challenge. Of course I failed. It turns out that it was a bit more challenging that I expected. Perhaps with more time and more patience I could have completed the job but I ran out of both in the end.

I was just asked to find out what the problem was. I wasn’t expected to fix it - which made the challenge all the more enticing. The good news is that I did learn something (you should always learn something from your failures). The thing I learned was that sometimes the best thing to do is explain what is broken and then let an expert get on with fixing it. Not wade in yourself. Even (or perhaps especially) if the challenge looks interesting.

Pentax 67 at Hornsea Mere

Quite pleased with the detail in the clouds. Less pleased that the clouds were there in the first place…

Hornsea Mere is one of my favourite places on earth. Which is nice because it’s just down the road from our house. We went there for a coffee today. We could have had a round of golf too, but the weather didn’t really merit it, and we were missing our golfing enthusiast.

It was a bit windy for rowing

I took some pictures with the Pentax 67 camera. This takes huge pictures (you could fit around 50 Minox pictures on one Pentax frame). It is great fun to use but I’m still getting used to it. I was using some outdated film (expired in 2016) but I still got some reasonable results from it.

It looks even better with the lens cap off..

The Pentax 67 is a big heavy camera which is a bit hard to use and difficult to focus. I love it.

Developing Minox film

I think the light meter on the camera got this about right. There is some detail in the dark parts of the shot.

My empty 35mm cassettes arrived today. I needed them to transfer the film out of a cassette into cut strips. To do this I had to tape the end of the spool of film to the empty cassette spool and then load the cassette into the splitter. First lesson – the receiving cassette must be “upside down” or it won’t work. After that it all worked quite well.

The yellow block contains the blades that will cut the film

The film splitter is from camerahack. It’s beautifully made and works a treat. The receiving cassette is on the left. You crank the handle to pull film out of the cassette on the right, over the cutting block which has blades fitted in it. When I’d finished I had two lengths of 9mm film in the receiving cassette.

Anyone need any spare sprocket holes?

Then I just had to load one sliced film into a Minox cassette in a dark bag. Slightly complicated by the doorbell ringing as I was doing this. But it passed off OK. I had to answer the door with a huge black bag on the end of my arms. I then hand wound the film into a little roll and then popped it into the Minox cassette with the tongue protruding and put the cover onto that side of the Minox cassette. Then I could tape the tongue to the takeup spool and pop that spool in the other side of the Minox cassette in normal lighting. Ended up with a Minox cassette with a length of film in it.

I went outside and took some pictures, but this was slightly complicated by the way I’d not advanced the film counter on the camera to zero before I loaded the film so I had no idea when the film ended. I really didn’t want to run all the film off and back into the cassette so I gave up early. Then I got the cassette out of the camera, punched a hole in the end of the film and loaded the film into the Minnox daylight tank. This worked mostly OK. I used a 25ml measure to work out 53ml of liquid. Did the 1+50 develop which was rather hard to measure. I think I need a syringe.

Developing was OK but I didn’t let the developer fill up the tank as well as I might. Same for the wash and the fix. I did get some pictures though, but the film has opaque deposits which I think are silver from where the fixer didn’t reach. Scanner had real problems with some of the film too. Some of the pictures came out quite well though. A bit grainy but no evidence of problems with the splitting and the cassette transfer. Things to remember for next time:

  • Zero the counter on the camera before you put the film in. Also set the film speed – although the exposure was generally pretty good.

  • Fill the tank properly and give the liquid time to go into the tank. Especially important during fixing.

  • Hopefully the old cassette will dry out (it gets immersed in developer during processing) and I can reuse it.

  • The Minox thermometer that came with the tank is badly broken, but the tank itself is properly watertight and works a treat – although I need to get better and agitation and making sure that all the film is covered. I think for the fixing process I didn’t cover the top part of the film properly.

  • There were some issues with frame spacing but these might be to do with me not opening and closing the camera firmly enough.

  • Use “Film (with film holder)” as the Document Type for scanning. Don’t click “thumbnail”. Scanning works best if you select the entire length of film and then chop these up afterwards – I think. Use 3200 dpi for maximum detail.  

Phone Plans

I’ve not tried dialing the number. I don’t think it would work

Another retro purchase today. I saw this phone calling me from a shop window in Beverley. I just couldn’t resist it, what with it being in good condition. And red. It’s been suggested that I might like to make it into a Batphone, but instead I’m going to pop a Raspberry Pi into it and try to turn it into some kind of personal assistant. You select the options you want by using the dial. I’d also like to use the telephone bell for an alarm signal. This will be a bit tricky as these are usually powered by 50 volts, but I’m going to take a look at inverter technology to see how I can make it work.

Great fun.