Showing posts with label openscad. Show all posts
Showing posts with label openscad. Show all posts

Tuesday, 13 July 2021

Fire Pit/BBQ Patio Area - Part 1 - The Plan

I'm fortunate to have a great view over some fields at the bottom of my garden, and I plan to create a patio/barbecue/fire pit area so that I can make the most of it.

At risk of this becoming just another home improvement blog, I have set myself an additional challenge to differentiate it from all the other "I built a firepit in my backyard" projects all over the internet.

The challenge I have set myself with this project is to aim for 'zero-ish waste'. That is, there's inevitably going to be some waste, but to minimise it to the extent that there's no skip or trip to the dump required - to keep the waste minimal enough that it will go in the regular household bin collections. That means lots of re-purposing and re-using of what's already there - stuff that was left behind by the previous owners.

The fence that is currently at the bottom of the garden is in good condition, so I don't intend to remove or replace that, however at sitting-level, it's just high enough that it blocks the view. So the plan is to create a raised patio, so that eye-level when sat down is not obstructed.

Being a large household project, it was more important than ever for me to be able to communicate the project idea and plan to my partner, so I spent some time planning it out in OpenSCAD, to produce this 1 min animation.



The groundwork

The area that the patio will occupy originally contains a greenhouse, and some slabs that have been laid around it.


This will create a solid base without the need to dig foundations.

Fortunately, the slabs are all an even 60x60cm (or 2x2ft), which makes a convenient grid from which to base the design and measurements.

The plan is to leave the right-most column empty, where a planter will be put. The slab in the left-most, plus two slabs from the other side of the garden where the shed is, will be used to square-off the corner, effectively making a 6x4 square patio (12x8ft)


With this solid base created, concrete blocks will be placed to raise the new patio. Gaps will be left between the blocks to minimise the number that we need, with the space filled with any rubble left over from the build.


Slabs taken again from the other side of the garden (they are currently a base for the shed), will be moved over and concreted on top of the concrete blocks to create the raised patio.

 


Finally, the firepit rings are a purchased kit (sold as quarter circles). We will adapt them slightly so so that the circular wall sits at both ground level and on the patio. 

 


Unfortunately there was an unforeseen obstacle in the the fire-pit kit we were going to use was on a lengthy back-order, and we'd be unlikely to get one this year.

But still, the plan makes a good jumping-off point for a new plan.

To be continued...

 

 

 

 

Monday, 22 June 2020

Context-sensitive macro keypad

I've been doing quite a bit of 3D work recently for both 3D printing and VR software development.

The main software that I use for 3D work are OpenSCAD and Blender.

One annoyance I have is that the short cut keys each use for standard things such as scale, rotate, move, etc. are all different, which makes switching between applications more awkward than it need be.

So my latest electronics project is to create universal short cut keys - a physical keypad that has single button presses for those functions, but then translates them into the relevant keyboard/mouse presses dependent on which application has focus at the time.

The hardware
As we're still under lockdown due to COVID-19, I'm restricted to using only components and tools I have got at home, like with the USB Switch project.

The keypad itself is this mechanical key switch tester.



Unfortunately the eighth switch was lost some time ago. I'll leave the gap there as potential room for expansion in future though.

The controller is an Arduino Pro Micro. I thought about using a different microcontroller, however the real sticking point was my lack of a spare USB to serial adapter.

The Pro Micro helps keep the overall form factor nice and compact, whilst keeping the programming side of things straightforward.

I picked out some LEDs to backlight the keys as there was spacing for them, and the keycaps are translucent. I tried to find all different colours, but my inventory didn't allow for that, so there's a couple of duplications.

The rest of the hardware is just some diodes and resistors, a bit of perfboard and some scavenged wires.

The hardware is wired up like so:
Quite simply, there's two matrices, one for the switches, and one for the LEDs. Because of the missing key, one column in each only has three connections.


The case is just some plastic container that would otherwise have been trash. It wasn't a perfect fit so required some Dremel-based customisation.

The Firmware

The Arduino will stay set up as a USB to Serial device rather than as a keyboard because there needs to be bi-directional communication - the Arduino needs to also receive input from the application in order to control the lights.

This post was a useful resource when putting together the matrices.

The full source is available in the project on GitHub.

The Software
The software is a java desktop app that communicates with the Arduino using jSerialComm. It controls which keys are 'set' and indicates this with the LEDs.

The interfacing with the other applications comes from a thread that uses system calls to the 'xdotool' linux command, reading in the output of that command which is the name of the current window that has focus. There's room here to make the application multi-platform, by implementing a similar Windows command in something like AutoHotKey.

If the window matches the defined rule set, the relevant keys are highlighted and a thread monitors serial input. If that key is pressed, java built-in Robot class sends the relevant commands to the application.

As with the firmware, the source is available on GitHub. It's in a pretty simplistic state at the moment due to the one-week time limit I've placed on these lockdown projects, but there's room to expand and improve in future.

Sunday, 1 September 2019

Empty roll warning buzzer

This was a commissioned project that went nowhere, but could easily be re-purposed for many different use cases, so I thought I'd share it.

The aim is to create a range finder device that can be mounted and aimed at a roll of material on an assembly line, so that the range finder can be used to determine the amount of material left on the roll, and sound a buzzer when the supply falls below a set amount, informing the machines operator so that they can replace the roll and minimize downtime.

The sensor is a Sharp GP2Y0A21YK0F. The datasheet shows that the voltage drops as the distance increases. In our particular use case, this means that as the material runs out, the voltage will drop, so we want to flag a warning below a set voltage.

Initially I thought about using a low battery circuit similar to the one I modified to use in the Keyboard Pedal project. However, I later realised that would be over-complicating it, and that the same result can be achieved using a simple comparator circuit.

The chip used is the LM358 op-amp, and the circuit is similar to the one found on page 6 of this PDF.

The key differences being:
  • The voltage provided by the resistor and zener diode in their diagram is replaced by a potentiometer in mine, so that the 'trigger' value can be adjusted.
  • The potentiometer in their diagram is replaced by the IR sensor in mine.
  • The resistor and LED output in theirs, replaced by a buzzer.
  • The voltage of my circuit is 5V so it can run off a USB charger.
With all those changes taken into account, the resulting circuit looks like this.

Note that RV2 is the IR distance sensor - I didn't have the symbol for it in KiCad so used a potentiometer symbol as that's essentially the behaviour it exhibits.

The finished circuit, fit neatly into it's enclosure.

The case

The circuit needed to be neatly enclosed for it's purpose. Often for electronics projects I'll end up re-purposing existing containers and boxes as enclosures, but as it was a commissioned project something more professional was in order.
The whole enclosure is 3D printed, based off a simple lidded box design with cut outs for controls and the IR sensor itself.

I also took the opportunity to turn the box into a simple parametric template so I can recycle it for other projects. the SCAD source code can be found on GitHub.

All that's needed is to supply the internal dimensions that are required and it'll create a thin-walled box meeting those criteria, using only stock OpenSCAD commands - no other modules required.

The lid fits snug - on my (admittedly by this point quite old) 3D printer, a nice unintended side effect of the rough resolution is that the ridges create a nice friction fit, allowing the box to be closed tight, but also popped back open with relative ease should maintenance be required.

The controls and buzzer

The sensor - the glue-filled part was to allow flexibility in angling the sensor, but was later found to be not required


The test

As I didn't have access to the factory where this was intended to be used, I whipped up a quick test rig using kitchen roll as the stunt double for the actual material.



The short buzzing before the alarm fully triggers is driven by the 'wobble' of the roll on the holder. In production use the material rolls are much more securely held, and so this effect would be minimised.