Great Hardware Meetup : Everything working by 6:30 pm

Eveyrthing Working

We had a great Hardware Meetup last night. Not a huge number of people, but an awful lot of expertise. I took along a new ESP32 device I’d just received from China. I was planning to use it in place of the Wemos D1 Mini device that I’ve been using for ages. I was making the switch because I couldn’t find any drivers to connect a D1 Mini to my shiny new Snapdragon powered laptop. Imagine my amusement to discover that the new device I’d bought used the same CH340 usb interfaces as the D1 Mini and wouldn’t work either. Wah.

But then Ben didn’t believe me when I said that there are no CH340 USB-to-serial drivers available for my Snapdragon powered Windows 11 notebook. He did some digging and found me the manufacturer’s proper download site: https://wch-ic.com/downloads/CH341SER_EXE.html I installed the ones from this site and they worked a treat. This is a big win for me. It makes the new notebook even more perfect.

So then it was on to the project for the evening. I’ve been meaning to add a Connected Little Box which can display text messages. I bought a little LCD panel for the princely sum of 2.64 It comes with an adapter that lets you use it from I2C, which makes the wiring much simpler. I’ll do a detailed post about it later. We found the drivers, added them to my PlatformIO project and had the LCD panel working in about ten minutes. Pro tip: if you can’t see anything on the screen you should adjust the contrast.

So, half an hour before the end of the meetup I had got everything working that I’d brought with me. The next meetup is in two weeks on the 27th of November. I’ll have to bring along something more difficult next time.

In the meantime Brian and David were playing with a rotating Lidar sensor and Richard was showing off new kit and working on an old-school embedded device.

And we rounded if off with a nice meal at the Omlette. Good times.

Deploying Code to a Wemos D1 Mini with an FT232R USB-to-Serial Converter on an ARM64-Based Computer

It’s not pretty, but it works..

Update: Turns out I’m an idiot. You can get ARM drivers for the CH340 device. You just have to look in the right place:

https://wch-ic.com/downloads/CH341SER_EXE.html

This is still a good read, and you can use this technique with any device which doesn't have a USB to serial adapter. But I'm now very pleased to be able to report that my Snapdragon powered Copilot laptop is one step closer to perfection.

Sometimes we tech enthusiasts find ourselves on a slightly unconventional path — such as using an ARM64-based computer, like a Snapdragon-powered Windows PC. Here’s where things get interesting: while the Wemos D1 Mini, an ESP8266-based board, is fantastic for IoT projects, it typically comes with a CH340 USB-to-serial converter chip. And here’s the catch: as of now, CH340 doesn’t have ARM64-compatible drivers for Windows. This leaves us in a bit of a bind.

The solution? We’re using an FT232R USB-to-serial adapter as a workaround, since FTDI (the maker of the FT232R) does provide ARM64 drivers. So, we’ll connect the Wemos to our computer through the FT232R and deploy code without needing native support for the CH340. Let’s walk through how to set this up.

Step 1: Download and Install the FTDI Drivers

To start, let’s make sure we have the ARM64 drivers installed for the FT232R.

  1. Go to FTDI’s VCP Drivers page.
  2. Download the ARM64 driver under the “Windows (Desktop)” section.
  3. Install the driver, following the on-screen instructions. This driver will allow your ARM64-based computer to recognize the FT232R as a COM port.

After installation, plug in the FT232R USB-to-serial adapter, and you should see it listed as a new COM port in your device manager. With this setup, we’ve successfully created a bridge to work with the Wemos D1 Mini on ARM64 Windows.

Step 2: Connecting the FT232R to the Wemos D1 Mini

Now let’s handle the wiring. This is where we make the magic happen, letting us put the Wemos D1 Mini into programming mode without needing native CH340 support. Here’s how to connect each pin:

Required Pins

FT232R Pin Wemos D1 Mini Pin
TX RX (D10)
RX TX (D9)
GND GND
DTR D3 (GPIO0)
RTS RST

Explanation of the Connections:

  • TX (on FT232R) to RX (on Wemos) — Data is sent from the FT232R to the Wemos.
  • RX (on FT232R) to TX (on Wemos) — Data is received from the Wemos to the FT232R.
  • GND (on FT232R) to GND (on Wemos) — Both devices share a common ground.

To enter programming mode:

  • DTR (on FT232R) to D3 (GPIO0) — The DTR line pulls GPIO0 low during reset, which signals the Wemos to enter programming mode.
  • RTS (on FT232R) to RST — The RTS line pulls the RST (reset) pin low, resetting the Wemos and kicking it into programming mode when DTR is also low.

Step 3: Programming the Wemos D1 Mini

With everything wired up, it’s time to program the board. Here’s how you can do it:

  1. Using the Arduino IDE:

    • Open the Arduino IDE and select Wemos D1 Mini under Tools > Board.
    • Select the newly recognized COM port under Tools > Port.
    • Write a simple sketch, such as the Blink example, and click Upload. The Arduino IDE will handle the DTR and RTS signals automatically to put the Wemos into programming mode, so you don’t need to press any buttons.
  2. Using PlatformIO:

    • PlatformIO can be used for uploading code, but it sometimes leaves the DTR and RTS lines in a state that holds the Wemos in reset or bootloader mode, preventing it from running normally. Here’s the straightforward fix:

      Remove the DTR and RTS cables after upload.

      It’s a bit messy but reliable. Once the code upload completes, simply disconnect the DTR and RTS cables from the Wemos. This lets the board reset itself and run the uploaded code without being held in bootloader mode.

  3. Using esptool.py:

    • If you’re comfortable with the command line, use esptool.py:
      esptool.py --port COMx write_flash 0x00000 firmware.bin
      Replace COMx with your port and firmware.bin with your firmware file. This should automatically handle DTR and RTS toggling as well, but again, you may need to remove the DTR and RTS cables afterward to let the Wemos run normally.

Troubleshooting Tips

If the Wemos isn’t entering programming mode or starting correctly after upload, try these steps:

  • Check Connections: Ensure your wiring matches the table above.
  • Verify the Correct COM Port: Confirm the right COM port is selected in your software.
  • Remove the DTR/RTS Cables: After uploading, simply disconnect the DTR and RTS cables from the Wemos to prevent the board from staying in bootloader mode.

Wrap-Up

Using an FT232R USB-to-serial converter on an ARM64-based PC with a Wemos D1 Mini lets you sidestep the lack of CH340 support on ARM. Once set up, you’ll have a reliable way to deploy code to your Wemos, gaining the flexibility to use ARM64 computers for your IoT projects without limitations.

ChatGPT wrote this. But in the “style of Rob Miles”

Using the CH340 Usb serial connection with Arm 64 - Not Not

Update: Turns out I’m an idiot. You can get ARM drivers for the CH340 device. You just have to look in the right place:

https://wch-ic.com/downloads/CH341SER_EXE.html

Well, this is irritating. One of the reasons I got my fancy new Arm powered CoPilot PC was to write code for my little devices, including ones powered by the Wemos D1 Mini. The D1 Mini uses an ESP8266 connected to a CH340 usb to serial adapter chip which provides the link to a connected computer. On every other PC I’ve used (including a day of release MacBook Air with a brand new Apple M1 processor) this just worked. On my shiny new CoPilot PC, less so. Unlike Apple, who seem to have been able to get device drivers to work over their processor emulation, the Microsoft Prism emulator - which runs existing PC programs written for Intel hardware - doesn’t work for drivers.

So there is no way I can plug a D1 Mini device into my new machine and deploy code to it. I’ve tested ESP-32 boards (these are newer and probably what I should be using anyway) and they work fine. But I rather wish I’d done some due diligence before parting with cash for my new machine.

Strong advice for anyone who fancies doing embedded development with one of these Snapdragon powered platforms - make sure it can talk to the hardware you are using.

Five Pound Camera

It’s not heavy. It’s cheap. Bought a single lens reflex auto exposure camera from Nikon for the princely sum of five pounds plus delivery. And I got an extra lens too. It looks very stylish (at least for the 2000’s) and in clean condition. Only two problems. It uses film that isn’t made any more and it might not work. But it should be interesting. It arrives next week.

York on an Instant Camera

Went to York today. Did part of the trip on the bus. Above is what the Rabbit thought of the scene.

I’d also taken the Instax Evo, which is a hybrid instant camera which takes digital pictures which it can then print. The camera has film filters you can apply to make things interesting. Today I’m using “Light leak” and “vivid”.

It’s not a great camera, but it does make great pictures. Particularly if someone is kind enough to scare the pigeons just before you take your shot.

Worth a visit.

Hardware Meetup and Meal Out: Wed 13th November

We’re trying something new with the Hardware Meetup next week. Afterwards you are welcome to join us at “The Omelette”, a Hull institution which just happens to be opposite the central library in Hull, where we have our meetups. If you want to join us for a nice meal and talk some tech (or whatever) it would be lovely to see you.

We’ll be meeting in Hull MakerSpace in the library from around 5:30 pm and then heading over to The Omlette at around 7:00 pm

Using PlatformIO on a Copilot device

Guess where I took this

I’m liking my Copilot laptop. Today I loaded it with Visual Studio Code and then tried to do some embedded stuff with PlatformIO. And I hit a snag. The problem is that PlatformIO notices that the computer is powered by an ARM processor and then tries to use ARM versions of all the software it brings in. This does not end well. The compilers I want to use for the ESP processors are only available for Intel X86 processors. The solution to this is to tell PlatformIO to use Intel/AMD for everything by creating the following environment variable.

PLATFORMIO_SYSTEM_TYPE=windows_amd64

Search for “Edit Environment variables” and then open the Systems Properties dialogue to do this. Then add the environment variable above, reboot your machine just to be sure everything can see it and then everything works. This means that PlatformIO will run slightly more slowly because it is now running on an emulated processor, but it still seems pretty sprightly to me.

Enter the Omnibook...

I’ve not bought a proper laptop for myself for ages. A few years ago I bought an M1 powered MacBook Air to see what the fuss was all about. It’s a lovely machine and it works a treat, but I’ve never really got on with it for doing proper work, what with it not running Windows and all. So last week, having got some unexpected royalties (which are always nice) I got myself a Windows Copilot notebook in the form of the HP Omnibook X 14. There are some very good deals on this at the moment.

I like it a lot. It’s around half the price of the equivalent Microsoft Surface. The hard drive is slightly small, but I can take the back off the laptop and replace the drive with a larger one if I need to. The battery life is supposed to be awesome and so far I’m agreeing with that.

The Omnibook is based on the Snapdragon ARM chip, which means that it needs to use an emulation layer to run “standard” Windows applications. I had a very similar experience with the MacBook, where a process called Rosetta ran Intel based Mac applications. The Windows version of this is called “Prism” and it works pretty well. The applications that I need seem to run pretty well. Applications like Word and the Edge browser have already been converted to Snapdragon hardware and they run very well indeed. I’m looking forward to finding out how good it is for getting things done.

Hull CS50 movie is back from the film lab

A few weeks ago we had our event celebrating 50 years of Computer Science at Hull. During the event we took some 16mm movie film on a 70 year old camera. We weren’t sure whether it would come out or not, but we sent the film off for processing anyway.

It came back today and it seems to have worked. The old clockwork Bolex camera that we used has done us proud. Above you can see particularly terrifying still from the film. We are going to improve the contrast and generally spruce things up.

Halloween

If you want an insight into how nice people are, just go “Trick or Treating” near way we live (it probably helps to go on the 31st October). We had a fantastic walk around the neighbourhood. The weather was lovely, lots of folks had really gone to town on their houses and there were families wandering around dressed as skeletons and all sorts. And we got home with a bucket full of goodies. Great fun. And just a bit scary. Especially one particular doorbell……

Splendid Meetup

Yes. The Mac is running Linux

We have a super-splendid Hardware Meetup in MakerSpace in Hull Central Library this evening. Loads of folks turned up to show things off and see what others were up to. Ross brought along his prototype piano keyboard reader which uses distance sensors to read key movements. It’s analogue and it works. Two things you can’t say about the things I make…

Betrayal at House on the Hill

There have been several editions. I think we played the first one.

Of all the stupid things people can say, I reckon one of the most stupid is “Let’s split up and search the place”. Especially if you are in a decidedly dodgy location where even the rooms themselves have it in for you. But that’s exactly how “Betrayal at House on the Hill” starts off. You all get your personas and then head off into the hallways, rooms and basements, uncovering all kinds of stuff - must of it unpleasant. Then, suddenly one of your party is at the centre of an evil plot and all the other players must team up and do some thwarting. We just had to beat the devil at chess, but other tasks involve monster slaying and whatnot. There are around fifty of them to work through.

We had a go at the game tonight and much fun was had. We managed to win thanks to some inspired dice wielding right at the very last minute. It’s a great game and we are definitely going to play it again.