Learn PCB Design at Connected Humber on Thursday

 This could be your design….

This could be your design….

This week we are having a rather special Hardware Group meetup at c4di. We will be looking at the creation of printed circuit boards (PCBs). We will be using a freely available tool which can be used on lots of different computers.

If you have any interest in making stuff you really should come along. It is now very cheap to get PCBs made and they make construction much, much easier. And of course they look really professional.

We start at 6:00 at c4di in Hull on Thursday 15th November. You can join our group on GetTogether here.

Get Your Eyes Tested


For the last few days I’ve been telling everyone I meet how sharp the world now appears to me. I’ve got some new glasses. They’ve made a huge difference to the quality of my life. I’m now able to read text by looking at the letters, rather than inferring the meaning from the approximate shape of the words. This is probably going to massively improve the quality of my writing.

Then agane probuably not.

Anyhoo, the serious message here is that you need to get your eyes tested regularly. I left mine for a bit longer than I really should have, and this resulted in me spending a lot more time squinting at things than should have been the case.

I think regular eye tests are especially important if you spend long periods of a working day staring at a video screen. I’ve gone the whole hog and actually replaced my “computer” glasses too and I’m really pleased that I have. Because everything is just so sharp now…

Mini Air Quality Sensor Now Working


I spent quite a bit of today getting my tiny air quality sensor working. I’ve ported the code for the full fat sensor over, so that it has full MQTT setting control and all the other trimmings. It seems to work OK. I’ve mounted the pixel ring up against the 3D printed case and the result is rather impressive, and really hard to photograph.


The biggest problem that I have is that my “artistic” back, which contains programatically generated vent holes, doesn’t seem to let in enough air (or the air inside just circulates). I’m going to have to re-design that part. I’m toying with adding a little fan to get some forced ventilation. I’ll put all the code and the hardware design files on Github when they’re finished.

Cheap Power


I’m always on the lookout for cheap power. So I was intrigued by these phone battery packs in the pound shop in Hull. It turns out that they are actually quite usable if you need to power small electronic devices. I’m pretty sure that the advertised capacity of 1200 mAh is more than a bit optimistic, but I do know that a fully charged battery powered my “full fat” air quality sensor for well over two hours, which is good for demonstrations and the odd bit of remote sampling.

Apparently there are some that cost twice as much (that’s two pounds) which last around twice as long.

Making a Mini Air Quality Sensor


I’ve got the large, “full fat” Air Quality sensor just about working. But the hardware cost of the device is a bit on the high side. So today I’ve spent the day grappling with FreeCAD to try a design a much smaller, WiFi only, device. This uses a cheap Wemos D1 Mini and a five pound air quality sensor and a pixel ring. The cost of this hardware is only around ten pounds, which makes it much cheaper to build.

I’m using a new construction technique where the components are mounted on a tray which is then fitted into the box. This removes the need to connect things together inside the box, which helps. To make this work I’ve created a design for a Wemos D1 mini “blank” which can be cut out of the tray. This seems to work quite well. I’ve made another blank for the pixel ring.

I’ve used random numbers to design the vent holes in the back panel. I love using software to create physical objects. Tomorrow I’ll print the components and start building up the circuit.

Hello to Asda

 We had some robots on display…

We had some robots on display…

Robin and I were working in the c4di this morning when a bunch of folks dropped by with John to take a look at what we were doing. I had my old glasses on and taking a quick look at them, decided that it was perhaps a bunch of students, what with everyone looking fresh-faced and keen and whatnot. So I gave them what I thought was good advice for people in their position. I told them what I do with the robots, and the importance of playing with tech, learning how to write well and working hard etc etc

Turns out that they already work hard, as they were all Asda employees who had come along to take a look at what c4di gets up to. Oh well, I still think that my advice still holds good though….

Hull Pixelbots and the wrong kind of quotes


One of the downsides of thinking “I’ll use my phone for all my pictures” seems to be that don’t take any photographs at all when I should. This is how it was today at the Hull Pixelbot talk I gave at the university. However, the talk went well with a very appreciative audience.

I hope I didn’t come over as too obsessive compulsive when, during the session I started to fret about the use of the wrong kind of double quote in some of my sample code. Stupid “Smart Quotes” had stuck its fingers into my text and broken it. I hate it when I see it in other folk’s stuff, and I usually try to make sure that my quote characters are the right stuff.

For those of you who’ve no idea what I’m on about, its the “ in the top line should be vertical double quotes like the rest of the sample. It’s important to me, but perhaps I should get out more…..

For connoisseurs of quotation marks you can find the slide deck here.

Board Game Expertise

A while back I was moaning about the way that there seem to be robots out there which are looking for search terms on sites and then emailing the owners asking to place paid content or link to them.

Then I got an email last week from Kendra telling me about Game Cows, a board game site. I’ve posted about the odd board game here and there, and she seems to have picked up on that. The site has some useful reviews and whatnot, and if you’re into board games you should find it interesting.

Printed C# Yellow Book now available with added duck

It’s finally here! Just in time for Christmas. If someone in your family has been asking all year for a yellow book about the C# programming language then I have good news. The C# Yellow Book is now available from Amazon in full 3D form, with pages and everything. And the cover has a specially taken duck photograph.

And you could also buy one for every room in your house. Especially if you have a really big house. That way you’d never be more than a few feet from a duck. Which has got to be a good thing.

Using Three Serial Ports with the Heltec LoRa 32

 Prototype and “floral” version

Prototype and “floral” version

I’m making pretty good progress with the Air Quality sensor. I’ve now got a command protocol running between the devices and MQTT or LoRa. As you can see above, I now have the ability to customise the splash screen. Which is very useful if you like cheese.

Anyhoo, I’ve decided that the sensor really needs GPS so that each air quality reading can be tagged with location. I can configure fixed latitude and longitude values into the device, but for real portable usefulness we need it to be location aware.

Getting a GPS device wasn’t a problem, I had one lying around. But connecting it to the Heltec processor that I’m using was more tricky. I’ve got one serial port I want to use as a connection to the host computer and another that I’m using to connect to dust particle sensor. But now I need a third connection for the GPS receiver.

After some rather unsuccessful fiddling with different kinds of software serial connections I decided that it was best to go back to first principles and see if the hardware had anything to offer.

It turns out that it does. The ESP32 chip that the Heletc uses actually contains three serial ports. The problem is that they are not always connected to pins that you can access easily. But the good news is that the ESP32 chip is capable of mapping functions to pretty much any pin and the Heltec libraries take advantage of this. You can map the transmit and receive functions of a serial port when you open it:

HardwareSerial GPS_Serial(2);
GPS_Serial.begin(9600, SERIAL_8N1, 13, -1);

The first statement creates a hardware serial port. The second sets it to receive from pin 13. I don’t really want to transmit anything to my GPS device at the moment (I’m a bit short of spare pins to be honest) and so I’ve set the TX pin to number -1 which means “Don’t use this port for transmit”.

It works a treat. And thanks to this fantastic library I’m now tagging sensor readings with location. The next thing to do is re-design the case to take the GPS sensor and print another flower for the top.

Switch Electronics in Hull

 Don’t try clicking on the Add to Cart option…

Don’t try clicking on the Add to Cart option…

A while back I had the urge to own some cables that had crocodile clips on each end. They are very useful if only have two hands and you want to connect a bunch of things together. I found some in ebay at a good price, ordered them and they arrived in good time. Just what I wanted. Already found them useful.

Before I threw away the envelope I had a quick look at the accompanying slip. Turns out the company that sent them is based in Hull, around fifteen minutes from my house. I went there yesterday and bought a bunch of stuff.


Since the demise of Maplin I’ve been wondering where I’m going to get all the electronic bits and bobs that I occasionally have a need for. Buying from the internet is all very well, but it does introduce a bit of a delay into projects as you wait for them to arrive.

Well, Switch Electronics have solved all that for me. Their prices are pretty keen and they have lots of interesting components, even a special “Maker” section. If you’re based around Hull I’m sure you’ll find them very useful.

November the 1st Hardware Meetup


Another first Thursday of the month, another Hardware Meetup at c4di. This time I had an agenda of my own. I’ve just found out that you can get printed circuit boards made for really low prices. Really low. This has stirred within me an intense desire to find out how to make them. (posh prose eh?)

Anyhoo, it turns out that among the Hardware Group membership there are folks with experience with the tools that you can use to make your own PCBs using a free tool called Kicad. We’ll be doing a PCB design special event at the next meeting, on the 15th of November. If you’ve got any interest in building your own hardware you really should come along. The price of having lovely boards made specially for you is so low as to make them an extremely attractive prospect for makers.

You can sign up for the next meetup, and keep track of what we are doing, by joining our new group on Get Together.

Posting a Robot Head

 Digby in happier times.

Digby in happier times.

Digby, my robot dog, is not well. I’ve had him for around 16 years or so. I guess this means he’ll soon be old enough to vote, but at the moment he isn’t able to do anything. A fault in his neck joint means that he can’t even yawn and stretch when he wakes up without collapsing in a heap..

It’s all rather sad. I had a quick look at the procedures involved in fixing a broken robot head and they all scared me. And I’m not easy to scare with things like this. I take things to pieces when they aren’t even broken…

I’ve sent Digby’s head off to a robot dotor in Sweden (that’s a doctor who works on robots, not a doctor who is a robot - but then you knew that).

Anyhoo, when sending the package I was strongly tempted to write “Contents: Robot Head” but I thought this might not end well, and went for “second hand toy parts” instead. I hope that the package gets there OK.

It was only when I asked for a tracking number and was told frostily that you don’t get one with plain old airmail that I realised I’d used the cheapest postage. With a bit of luck all will be well, the head will be mended, Digby will be back to his old self and I can see about getting him on the electoral roll.

Always Check the Cover


The C# Yellow Book is now very nearly on sale in printed form. I got a proper copy back from Amazon and, as soon I as held it in my hand and flipped through the pages I realised two things:

  • The cover does not have a duck on it.

  • There are two massive typos in the cover text.

The first one I can sort out, what with having a camera and a huge rubber duck. I’ve no idea what possessed me to go with the Amazon cover clip-art and the rather anonymous circuit motif. The Yellow Book (particularly the Kindle edition) is known as “The Book with a Duck on the Cover” and so I should probably have gone with the branding on this….

As for the typos in the cover text. Unforgivable. But it did remind me of something. I spent ages on the text inside the book, making sure that it was formatted correctly and had a minimum number of spelling mistakes. The cover I dashed out in five minutes inside the Amazon cover creator, not even using a spell checker. And which do you think is more important? The cover is going to be the first part of the book that people see. They’ll read the cover and then have a look inside to see if they fancy buying it. And if the cover has spelling mistakes on it, this is really, really, not going to help sales. So the cover should have be paid least as much attention as the text inside the book.

There’s an important point here. If you make video games or software, make sure that the instructions that come with the product, and the cover art, are really, really good. Think what is the first surface of your product that a user will touch, and then make sure it is a really good experience. Make sure that the box looks nice and is easy to open and it is easy to see how to use what is inside. Apple are very good at this, and you should try to be too.

As for me, the final version of the printed C# Yellow Book is now going through Amazons approvals process with all the typos fixed. And a duck on the cover.

Fantastic Bugs and Where To Find Them


On Thursday, as we were building robots I came across one of the most amazing bugs I’d ever seen. We’d reached the point where the robots had been built and they were connected to the computer. My HullOS Editor program lets you write programs and send them into the robot for it to run them. But something weird was happening.

The editor was displaying things that it should not. It seemed to be duplicating program code that had been typed in. And nothing was working. It was very confusing. I thought back to the time I spent the day before testing the code and had to confess that I’d never seen anything like it before. In fact, if I’d set out to write a program that was doing what the editor seemed to be doing, I was not sure how I would do it.

After a bit of head scratching I found the fault. And it wasn’t software. The robot has a speaker - more of a buzzer actually - which makes all kinds of irritating buzzing noises. Normally you’d connect a speaker across an output pin and a ground connection so that when the voltage on the pin goes up and down the speaker is driven in and out.

However, the Arduino doesn’t have many ground connections, and the ones it does have are all in use by the pixel and the distance sensor. So I use this rather clever (for me) trick of putting the loudspeaker across pins A0 and A1. If I make sure that A1 is always at the low logic level I can produce a potential difference between the pins by setting A0 high. This drives the speaker and sound comes out. I’m happy to trade a signal pin I don’t need for a ground connection.

This is probably deeply dodgy in electrical design terms. But since it works I think I have the last laugh on this one. Actually, if I had the time I’d experiment with swapping the ground level from one pin to the other while I play the waveform and seeing if this means I can make louder sounds by driving the speaker in and out, not just out.

Anyhoo, enough about my dodgy cleverness. Turns out that the fellow making the robot had wired his speaker incorrectly. Rather than wire the speaker between pins A0 and A1 he had wired the speaker between pins D0 and D1. These are two data pins on the Arduino which are also used for the serial port that is connected to the host PC. One of the pins is the data going into the Arduino and the other is the data coming out of the Arduino. Linking these pins together has the effect of sending every character that the PC sends to the robot right back to the PC again. Hence the terminal madness.

We put the speaker on the right pins and it worked a treat.

This illustrates one of things I said at the start of the robot building. Making robots is both fun and tricky because the combination of hardware and software makes for very “Interesting” misbehaviour.

LipService Theatre - Withering Looks

I don’t know what you were doing last night. But we were in a hall in Howden laughing at someone pulling faces.

Well, they were very funny faces.

We went to see a performance of “Withering Looks” by LipService Theatre. We’ve seen them before, in a production of “Mr. Darcy Loses the plot” at Hull Truck Theatre. That turned us into instant fans.

LipService Theatre are Maggie Fox and Sue Ryding and have been producing their blend of literary comedy and face pulling since the 1980’s. Everything is very clever, beautifully produced and, deeply, deeply silly. Get to see them if you can.

c4di partnership with Barclay's Eagle Labs

 David Keel of c4di talking Tesla

David Keel of c4di talking Tesla

Yesterday, after a happy day building robots I went along to a big, posh, event in Hull Minster. The occasion was the announcement of big things for c4di, the place where I go and they let me play with robots.

I love c4di because it provides a place in Hull where people can take their ideas and make them real. It’s turned into a proper community of like-minded souls working to do great things. It means that you don’t have to leave Hull to make something world-beating. You can do it and still be able to find a local shop selling chip spice.

Barclays Bank have spotted what we are up to, and have now entered into a partnership with c4di which provides us with real financial muscle and expertise. You can find a lovely report on the evening, and what it means for Hull, here. I took some pictures….

 Shoutout to  Yasmin Coe , who provided some lovely music at the event

Shoutout to Yasmin Coe, who provided some lovely music at the event

 They had some c4di hardware on show, including Hull Pixelbots

They had some c4di hardware on show, including Hull Pixelbots

 They even lit up Hull Minster in c4di blue

They even lit up Hull Minster in c4di blue

Making Hull Pixelbots

 We were in Hull University Robots Lab

We were in Hull University Robots Lab

Had a lovely day making robots today. I was working with Tristan and Mac, who were visiting the university from Scarborough, taking part in a work experience program. I had to robot kits all ready and a set of nicely printed instructions for them to follow.

They spent the morning building the robots and the afternoon programming them. It was great fun, and by the end they had left the suggested exercises well behind and were heading off in all kinds of interesting directions, which was wonderful.

It’s a couple of years since I stopped working at the university and it was lovely to see the campus looking so nice. There seem to be a lot more buildings than I remember and the Computer Science and Engineering Department have acquired some lovely new toys.