Wednesday 1 May 2024

Playing with ESP32 Camera and Designed a Case in FreeCAD.

 



Lately I've been playing a little with ESP32 camera's. In case you don't know they are super affordable little wireless modules with a camera and SD card attachment that can be programmed via the Arduino IDE. There are heaps of guides out there to get going with them and they have a range of interesting uses. It's pretty trivial to set them up so that the configurable camera feed is available on your network, or I've also tinkered successfully using them in station mode so you connect directly to them as a wireless device with no network needed. 

Use cases are many, I like to slap them down in front of machines or running experiments that can be left unattended but you might want to periodically take a look at. You could use them as a little simple CCTV camera or for wildlife monitoring. Indeed there are lots of examples out there which add PIR motion sensors etc so that you can increase their versatility. 

Often these days they are sold with a little sub PCB module that acts as a serial programmer with a CH34X IC on board and these then allow you to power the ESP32 camera via a USB micro socket. The ESP32 camera and programming board are really affordable so I've found them cheap enough that you can leave the programmer board attached for ease of use. As such I wanted a simple case. 

After  a bit of calliper work I designed a couple of variants of a snug fitting case for this device in FreeCAD. I'm pleased that, once 3D printed, the PCB's slot in with no rattle and no play at all. The lid side of the case is designed to receive some M2 3.5mm diameter and length thermal inserts which can be pressed in with a soldering iron. Then I've used 20mm M2 bolts to close the case. Both versions of the case have a large USB access slot and there are versions with or without space to have an SD card inserted. 

 Of course the FreeCAD files are also up on the printables listing so you can redesign it to your needs. 

Tuesday 30 April 2024

How High Did my Rocket Fly? DIY Inclinometer


If you fly a model rocket, or a kite how high up does it go? It’s a tough question to answer and you might think you’d need to add some expensive electronic sensors in the form of an altimeter to work it out. Whilst that might make a great electronics project in itself it’s quite complex and it might be easier to start with an excellent and accurate DIY tool for gauging heights.

The tool we are going to build is an “Inclinometer” so you might guess from the name that it measures inclines or angles. It’s basically a protractor but we will add a component or two to make it easier to take a measurement. We’ll also do some simple mathematics, or rather some trigonometry, which is a branch of mathematics that deals with angles. Don’t worry if this sounds hard, it’s not and we’ll step through what you need to do.

The DIY Inclinometer can be used to measure the height of anything you can see, the only other thing you will need to know is how far away you are from the base (or the point directly underneath) of the object.

So let’s get started. If you print out this linked design onto a piece of paper you can then stick it to a piece of cardboard to make it a little tougher and more handleable. You can get fancy and trim the card to exactly match the printed protractor design or you can simply mount it on a larger piece of card of any shape. Make sure though if you mount it to a larger piece of card that the top edge of the card is parallel to the top edge of the protractor.

Next you need to make a hole through the little hole design in the protractor. A good tip to do this safely is to use a big blob of adhesive tac or modeling clay behind the protractor and then use a pointed object like a ball point pen or a knitting needle to poke a hole through. With your hole ready we now need to tie a piece of string to the hole that is long enough for it to hang over the protractor with a bit left over. Onto the other end of the string we need to attach something that can act as a small weight to keep the string straight. This can be a small metal nut or washer, or it could be a blob of the modeling clay you used earlier, anything will work.

Now that we have made our inclinometer we can use it to measure angles. If you hold up the protractor and look along the top edge of it you can aim it at the top of a building or other object. The weighted string will remain straight downwards and you can either have a friend read off the angle it reaches or you can trap the string once it’s lined up using your hand and then hold it in place whilst you move the inclinometer and take the reading.

So imagining we have just measured the angle of the inclinometer compared to a tree we could then walk from where we have taken the reading up to the tree and count our paces. If we know how long our pace roughly is, say 75cm, we can then work out the distance in meters. Of course you could do this more accurately, you could have a long string marked in meters to work out your distance, or, a modern approach is you could use the map application on your mobile telephone placing pins and reading the precise distance between them.

However you get your data, once you have your distance from the object or launch site, and the inclinometer angle reading you can work out the height of the object. To do so, maybe grab a pencil and some paper and make a little sketch.

You can see in the image we have the tree and we’ve added the details of what we know and measured to the sketch. To find out the height we need to use a calculator, either a hand calculator or an app on your phone or computer. We’ll calculate the following.

ground distance * Tan(angle)


So if the distance to our tree base was 12 meters and the angle was 64 degrees then we can see that the height of the tree according to this calculation is 24.6 meters. However, can you spot a bit of an error? The calculation presumes that the angle reading is taken at ground level, whereas we actually take this reading at eye level. Adding distance from the ground to our eye level is needed to make this calculation a little more accurate. If I add my eye level height to this it makes this tree 26.4 meters tall.

It’s good to practice with stationary objects like trees and buildings, but you can also use this with moving or rising objects. If you are launching a kite for example you can ask your launch helper to hold the kite and then walk away spooling out a known amount of kite string to set the distance you are from the launch point. Then when you, or a friend, takes a reading of the kite later in flight you have all the data you need. If you are launching a model rocket, you can do something similar by measuring the distance between your inclinometer observation point and the launch pad of the model. With rockets it’s harder as you need to follow the rocket upwards as it moves very quickly and stop the inclinometer and trap the string at the point where it reaches its highest altitude. A good challenge!


Monday 11 March 2024

Launching StoRPer, the opensource, modular robot rover.

 

Last week was epic! I finally got around to launching the stoRPer robot both in terms of publishing the opensource repo and listing a first run of boards for sale on the Tindie shop. I'd procrastinated and stalled on getting it released as I'd imagined doing a higher end launch video and also having more functionality explored in the design at launch. I'm in a phase of "perfect is the enemy of done" at the moment so I decided to do a quicker "messydesk" style launch video (see above!) 

It had a brilliant response and all the original run sold out in around 6 days with orders going all over the world. It quickly got picked up by Toms Hardware with a nice write up and also was quickly spotted on the XDA developers platform. Closely these articles were followed by the Tindie Blog (which I write for so thanks to my colleague Alex picking up the StoRPer story there) and the mighty Hackaday. All this activity had pushed the original launch video to nearly 6K views which is fabulous. 

So all the first run are shipped and starting to reach their owners and I've ordered a second slightly larger fabrication run and, at time of writing, we have about 49 units on the official waiting list, if you want to add your email to the waiting list this means you'll get a notification when they come back in stock. 

For this week, I have been invited on Toms Hardware's "Pi Cast" number 168 on Tuesday evening (6pm GMT) to talk about StoRPer and I'm also working on a few new parts and ideas to expand the repository! 

Really pleased and excited to see what the wonderful community does with them!



Friday 23 February 2024

FreeCAD, FOSDEM 2024 and Blender Trip.

 


I recently went out to Brussels for a week which included a couple of days hanging out at Brussels Hackerspace with members of the FreeCAD community. I then attended the FreeCAD Day, which was a kind of un-conference day set up to show and tell lots of developments in the community and also have facilitated sessions of work. Then over the weekend it was FOSDEM and then some of the FreeCAD posse travelled up to Amsterdam to have a visit to the Blender Institute and meet with Ton the Blender founder. 

I've written elsewhere about lots of bits of this trip, but I wanted to pull out some more personal account stuff here in a little blogpost for posterity. There's stuff here about FreeCAD day, there is a story I wrote here about how FreeCAD, Ondsel and Prusa saved FOSDEM, and also a general round up from FOSDEM from the prospective of FreeCAD activity here. 

It was great at the beginning of the trip to hang out at Hackerspace Brussels, it's likely the last time I could visit it in it's present setting as it is planning to move to a new site shortly. It was situated in this amazing empty old industrial building. The building is set to be demolished and or converted into accommodation at some point, but until the work begins the company that owns it allows people to use the space. There is plumbing and power but also a heap of dereliction. It's full of fascinating projects and communities, and also possibly serves as a few peoples home. It definitely felt a little like a temporary autonomous region which always makes me feel relaxed. :)

Outside the building there's a large area, with a complete skatepark/bowl, loads of art and remnants of festivals and other things that have happened at the site. As I say super super cool place to hang out. 

One evening my gracious hosts took me out for the evening to neighbouring city Leuven. It's a smaller place than burgeoning Brussels but super lovely with lots of old parts and lots of bars! 

FOSDEM was a blur of excellence. It's funny how quickly you can have a FOSDEM moment and I had one very early on on the Saturday morning. The neighbouring stand to the shared FreeCAD/KiCad/LibreSpace stand was Pine64. Whilst they were still setting up a person was admiring the Pinephone sat in it's official keyboard case. They then said how much they loved small clamshell design ever since the HP Jornada 720 PDA. As a lover of the 720 myself I got chatting to them and was quickly reminising about Jlime, a linux distro/image for the Jornada. They looked at me astonished and then said that they had contributed to JLime... we both agreed it was incredible odds that we would be linked by such a secular device and distro that we took a selfie! Small world. 


Over FOSDEM I met loads of notable brilliant people. It was great to meet Ben on the Pine64 stand, Ben is the developer behind Ralim/Iron OS firmware which my pinecil soldering iron uses. It's ace to meet the people behind devices you use all the time. Ben also showed me a brilliant early prototype of the pinecil which he said was insane in that it didn't hold the tips/elements very well so was quite a danger at times!

I also got to meet Arturo from Solder Party. I love Arturo's work and also love that he has taken the time to talk me through issues, usually caused by my own stupidity, and also helped me by discussing his stamp design for the RP2040. As well as a lovely chat, I got some amazing stickers, and I got to see and touch an amazing top secret prototype for an upcoming Solder Party product. 

Other notable stuff was I felt really privileged to introduce Yorik, FreeCAD project lead, to a few notable people. I spotted Martin one of the core Inkscape developers and got them chatting and it was great to see and introduce old friends from the Libre Space Foundation. Speaking of which I love how good an example LSF projects are for FreeCAD and KiCad they were perfect partners on the stand. 

Sunday was again really busy and I was too engaged at the stand to attend the only talk I really wanted to catch, Joey Castillo who makes amazing projects including The Open Book, the fantastic opensource e-reader. I was resigned that I'd probably missed my chance to say hello irl when suddenly I heard a US accent asking a colleague on the stand if Concretedog was around! Joey! Thanks for taking the time to come and find me. You rock!


On the Monday a few of us went up to meet Ton at the Blender institute. It is a fabulous site with such fabulous creatives working in it. As a side note any office/campus that has dogs and also names their plants is a good place! We got a fabulous tour (I love how we all took selfies in the network room!) and then had a long sit down with Ton discussing Blender's story and how it managed to scale whilst retaining it's community members, contributors and roots. Really quite inspiring. 


SO there we go. A fab trip. Brilliant to meet parts of the FreeCAD crew who I've only ever interacted with online. Next FreeCAD Day is provisionally being looked at in Chicago later in the year. Maybe!





Wednesday 21 February 2024

New FreeCAD Video, How to Unwrap Meshes to Make Mould Templates

 


Posted this video the other day, it's a process that allows you to take curvy surfaces and create flat templates for them via meshing and unwrapping. Obviously I've focused on making templates/patterns for moulding rocket nosecones, but equally the process could be useful for loads of things.