September 2022 Update

It’s almost a year since I posted an update, so I thought something was due. I spent winter 2021/2022 using the Pi-lomar telescope, then used the lessons learned to make further refinements.

The main changes have been with the software, a few months of real life usage always reveals bugs and improvement areas. Of course there are also new ideas to explore too.

The brain

  • Raspberry Pi V4 (still)
  • A new O/S version is available based upon Debian V11 – Bullseye
  • I tried to build a new version based upon this, but found several showstoppers at my level of experience. The camera system has changed, and several of the packages that Pi-lomar depends upon are not yet happy in the new O/S. So at the moment I’m restricted to the previous Debian V10 – Buster build. The new camera support in Bullseye is really interesting, but will have to wait until I can get the basic functionality working.
  • I’ve done some work to simplify the build script on the Buster build as that’s now obviously stable and the very latest release seemed to simplify the build requirements a lot.

The muscles

  • The motor control has proven quite a challenge to get to a level I’m happy with. But finally it seems I’ve moved forward here.
  • Originally I drove the motors (via drivers) directly from the RPi itself. But a linux O/S is not ideal for realtime motor control. So a long project began to introduce a microcontroller to handle the motor control. I started with the Raspberry Pi Pico using the RP2040 chip. Oh boy! Did I have problems here. No matter how simple the task or how I chose to power it I had problems with random resets. I got through 4 of these boards before trying something else. I switched to the lovely Adafruit Feather RP2040 but had similar problems. I switched again to the great little Pimoroni Tiny2040 and the problems vanished, but I had fewer GPIO pins to work with, so some reworking of the CircuitPython code was needed.
  • The first ‘wiring’ of Pi-lomar was originally a real ad-hoc construction directly off the RPi GPIO header. It worked but looked crazy.
  • The second version with the flaky microcontroller first attempts was a little neater using a prototyping board.
  • When I switched to the Pimoroni Tiny2040 I also played with designing a custom circuitboard for it. A friend recommended trying EasyEDA as an online designer. After a few weeks learning that and playing with options I had a design that I figured was worth trying. I cannot overstate how impressed I was with the process to convert my amateur thoughts into an actual circuitboard.
  • I downloaded the ‘Gerber files’ from EasyEDA, sent them to PCBWay, and less than a week later had 5 bare boards on my desk. Manufactured and shipped from China to the UK in under 7 days. Amazing.
  • I’m building a 2nd copy of the telescope now to use for the construction video and it will incorporate this new board hopefully.
  • Anyway I have a CircuitPython routine now which will run nicely on a microcontroller and can handle motor movement independently of the RPi. The RPi can now just concentrate upon high level activities. User interaction, Planning and photographing things.

The software

  • The software on the RPi is still Python 3 based.
  • I’ve produced two versions now. Pilomar-lite – which I intend to publish, and Pilomar2 which has more functionality, but is also a playground for new experiments.
  • Both versions are ‘amateur’ builds, they could certainly be written more cleanly, but I’ve favoured functionality over beauty here.

Pilomar-Lite

This has all the functionality that the original version of Pi-Lomar had, with many bugs ironed out. It seems to work quite reliably, but hasn’t been tested by anyone else yet. That’s always a more thorough test!

Pilomar2

This has several extra experiments, most of which will probably die eventually, but some may prove useful. I’m currently trying to teach it to detect and compensate for lens distortion. There are some well established ways to do this using OpenCV, but they all require some extra steps and may prove complex to do in practice. So I’m playing with the idea that the telescope can gradually learn the distortion itself from actual observations and build its own compensation solution…. the telescope works fine without this, but I want to be able to analyse a captured photograph and identify the actual objects in it more accurately in the future. If I get it to work, then other projects are possible. It may also help me to get the ‘image stacking’ working in realtime on the RPi directly one day. Image stacking is still done offline on a separate PC by downloading the individual images captured by Pi-Lomar.

Build instructions

A couple of people have shown interest in getting build instructions for the telescope. I must admit I thought this would be simple to do, but haven’t come up with a quick, clear and easy way to do the whole cake yet. I’m currently tackling this a couple of ways.

For the RPi build and software installation, I’m simplifying as much as possible what needs to be done.

The 3D printing files (.stl files) have been refined, and are pretty much ready to download, the V2 build will also verify that everything still goes together properly. And of course refreshes my memory of how I made the first one 🙂

For the physical telescope build I realised that writing a manual is quite tricky to do, I’m clearly not as good as IKEA at this! So I’m currently considering just making some simple videos to show the construction process. That’s faster to make, and faster to view … I hope!

A simulation of the motor driver board. Home to a Pimoroni Tiny2040 to handle the DRV8825 motor driver chips.
… and an actual one…

3 thoughts on “September 2022 Update”

    1. Hi, the PCB’s a common question. The version in the video was my first ever attempt, it included some experiments and a track error that I had to fix manually. So the only design files I have at the moment are not perfect. But there’s clearly interest in having a simple PCB available.
      If I design a fresh one, I would want a test board produced and make sure it works, so there may be a bit of a delay before I get all that done.
      It’s very possible someone else beats me to it!
      Whoever wins that race, I’ll certainly publish it if possible.
      Matt

      Like

Leave a comment