Saturday, 8 August 2020

Tattoo Machine for Leatherwork

This is the fifth of my 'Lockdown Projects' - Projects made during the Coronavirus lockdown, which I limited to one week, and only using materials I had to hand.
 
Before I start this write up I just want to emphasize this tattoo gun is not intended for use on anything other than leather. Using it for anything else risks a number of heath issues.
 
With that out of the way, I’ve been intrigued by the idea of using tattooing as a way of patterning leather. A quick search shows that it’s not an uncommon practice – particularly it would seem, for leather boots.
 
The theory goes that given that leather is essentially just skin, it would tattoo in the similar way to a person.
 
After seeing a home-made tattoo gun in an episode of Orange is the New Black years ago, I’ve had the idea in the back of my head to build one and try it.
 
During lockdown, it seemed like a thematic fit to finally hack one together.
The body of the machine is from a mechanical pencil. 
 
The main needle mechanism is a sewing needle, with an empty metal pen refill, and a hook made of a bent paperclip. These bits are epoxied together for sturdiness.
The motor was taken from a handheld fan. A button provided the connection between the needle mechanism and the motor.
 
The bracket was a small bit of metal from the junk bin - that was probably once part of a printer or something similar I’d previously dismantled.
 
The motor and bracket were fixed together with cable ties and a final cable tie tensions the mechanism so that there’s less rattle and wobble in the needle.
 
 
Initially I used 2xAA batteries for a power supply, but after a bit of testing, it needed more power, so I replaced that with a USB connector.
 
Obviously I didn’t have any tattoo ink to hand, so I just used leather dye to test.
 


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.

Tuesday, 26 May 2020

Tray Stand / Foldable Table

While lockdown has prevented me from being able to get back to many woodworking projects this year, I did manage to cut a few offcuts to size and sand them in order to fashion a stand for a bamboo tray. The idea being for it to be a temporary table or drinks stand in our small patch of outside space.

The construction is a simple X-frame, with horizontal bars at each of the four points - 2 to support the tray, 2 to act as feet. These are joined to the X-frame using a 3D-printed bracket - the SCAD file for this is up on GitHub.

In order to stop the frame from spreading out and collapsing under the weight of the tray and it's contents, the feet were joined with some denim fabric, courtesy of an old pair of jeans. This allows the stand to be folded up, but providing plenty of rigidity during use.

Sewing things other than leather is a pretty new thing to me, my only prior sewing-related project being the lanyard I made a while back. So I'm the first to admit it's not the neatest work, but it does the job, so can't complain.

With the benefit of hindsight, the hinges allowed a bit too much flexibility, allowing the cross-bars to roll. The fabric on the feet alleviates this at the bottom. On the top, the base of the tray has a small lip which helps latch onto the cross-bars - whilst they still roll, it's impact is minimised and the tray/table works fine.

Thursday, 30 April 2020

Yarn slack winder

This is another of the lockdown projects where I'm trying to keep myself occupied during the Covid-19 lockdown by challenging myself to a project per week, using only materials from my workshop junk bin.


Background
I don't crochet or knit, but my partner does, and I often end up watching TV whilst having been delegated to idly unwinding a ball of wool.

So, apparently, when crocheting or knitting, it's important to make sure that there's some slack between the workpiece and the ball of yarn. This usually means stopping every so often to pull more yarn from the ball. It can lead to inconsistent tension in the workpiece, making the work uneven.

This gave me an idea to create a yarn dispenser that could be hands-free, and unwind small amounts at a time, to maintain slack.

The OpenSCAD model
The design

The basic principle is to repurpose two rubber rollers (grey) from a printer. The bottom one is attached to a motor, which is housed in the case (red), and supported at the other wide by a support (yellow).
The top roller is attached to two mounts (blue) and is free-rolling.

The two mounts will be attached to their respective parts of the case by screws, where the tightness can be adjusted to allow more or less gap between the rollers, to vary the grip depending on the thickness/density of the yarn.
 
The yarn will be sandwiched between the two rollers, so that when the motor is activated by a foot pedal, it is pulled between the rollers.

To keep the two sides of the frame separate, they were mounted to a small piece of scrap acrylic I found. It's not a perfect size, but it's functional enough for this prototype.

The 3D printed models are pretty basic, but should anyone want to use them, they're up on GitHub.



The electronics

The motor is some generic DC motor that, like most things in the junk bin, was probably pulled from an old printer.

Most of the circuit for this was was salvaged from the old Smoke Machine project.

The SN754410 was de-soldered so that it would function in a more conventional way, powered from a 9v wall wart, and a TS7805 regular to provide 5v.


The circuit. The SW1 switch allows the direction of the motor to be easily switched. SW2 is the foot pedal that will be pressed to feed the yarn.

The electronics were built into an old business card box, similar to the USB KVM Switch.

With the circuit hot glued in place, a piece of a disposable pen was glued to the button to extend it's reach, so that it would sit slightly higher than the top of the box lid. This means the the circuit enclosure also doubles up as the foot pedal - pushing down on the lid pushes on the pen, and in turn presses the switch.

Finished product
In initial testing, it was discovered that the yarn would veer off to the side of the rollers and become tangled. As a quick-fix solution, I used a scrap of leather, punched a guide hole in the middle and tacked it to the input side of the rollers.






Tuesday, 31 March 2020

Simple USB KVM adapter

With the shadow of Covid-19 hanging over our heads, I, like many others, am now working from home.

Having my home PC set up right next to my work set up has been a bit of a pain - two keyboards and two mice competing for desk space. Plus the work keyboard and mouse was a spare wireless set I had kicking about - not really comfortable enough for long-term use.

The monitor I attached to my work laptop was the second monitor I use for my home set-up - thankfully it has two inputs, so that's an easy one-button switch.

I wanted to use my main keyboard and mouse with my work set-up as well as home, but didn't want to unplug/replug each time.

I also wasn't too keen or just ordering a USB KVM adapter (a device which lets multiple computers share keyboard, mouse and monitor), as recently some of our local postal and delivery works have fallen ill, and so I'm avoiding any non-essential deliveries - I don't like the idea of putting others at risk for stuff that's a 'nice-to-have'.

So I figured I'd look through the electronics pile and see what I could piece together.

I did have a PS/2 KVM that I was hoping to adapt, but having read the datasheet for the bus IC that underpins it, it had a low maximum current rating - it might have been fine for just a keyboard or a mouse, but the keyboard I want to use has a backlight, audio controller and USB hub built in, and a brief look with

lsusb -v

showed that they would easily surpass that maximum rating.

Software options are also a no go - whilst they'd been fine when working locally, they won't work with my work's VPN, and the IT guys have enough on their plate without me adding to it.


So, I ended up going for the simplest of options. I had some relays - they were obviously meant for higher power application than this, but found that wired up in parallel, 5V was enough to trigger them. I was planning on powering it from a USB port, so 5V was the target.

A rough schematic of the switch


Unfortunately they had a weird footprint that put one of the pins in between rows on standard perfboard, so I ended up dead-bug soldering them.
A diode across each of them to prevent voltage spikes from the coils, some USB extension leads and a switch later, and I had a 4 channel switch.

I was a bit concerned at the lack of a protective load on this circuit, but adding any additional resistance from the power to the relays would prevent them from switching - as they're really designed for higher power applications, I reason that the coils have enough power requirement to prevent a short.

I have ran it for a few days under close observation and seen no temperature / magic smoke issues, and it's only ever powered when I'm sat right in front of it, so it should be fine. Obviously if this wasn't a "whatever's at hand" project, there'd be much more elegant ways of doing this (bus IC, 4 pole switch, more appropriate relays, etc), but here we are.

A gratuitous amount of cable ties, double sided tape and an old business card box provides structure and an enclosure. I'll probably tidy it up a bit more later as time allows, but for now it's enough that it works.


Thursday, 16 January 2020

Beko WDR7543121W Washer/Dryer Repair


Over the Christmas holidays our Beko Washer Dryer stopped working. It was fine for one cycle, and a couple of days later when we went to do another cycle, it just wouldn’t power on.

After checking the obvious things – fuses, sockets etc, I noticed that when first powered (at the wall), there’d be a faint beep – like the key-press beep, but much quieter.

The machine was pretty new, so the first port of call was see if it would be covered under warranty. It’s about 18 months old, so of course just out of warranty. I tried contacting the retailer anyway to see if there was any room for good will support. Of course there wasn’t – planned obsolescence is their business model, after all.

Some online research seemed to point to the mainboard being dead.
Hoping to get things resolved quickly, I found a replacement board and ordered it.

When it arrived the next day, it seemed slightly different to the original – the part number showed “G09” rather than the “G08” that was already installed. I also noticed that although the board layout was the same, some components were either added or removed.
The original board
 
Reasoning it to be a more up to date and optimised version of the same board, I swapped them out.
Booting it up, it seemed positive to begin with – it beeped, the display lit up, and all seemed well.
Everything seemed to work just fine… until I hit start, and nothing happened.

A local repairman who I spoke to advised me that sometimes these boards require ‘programming’ to work with a machine – which is something even he couldn’t help with, as only the manufacturers’ own contractors are able to do that. Basically, it’s like DRM (digital rights management) for washing machines.
Curiosity got the better of me, so I popped the PCB out of it’s enclosure to take a closer look.

On the other side, there was an Atmel ATMEGA – a family of microcontrollers that I’m quite familiar with. It got me wondering if I could dump the firmware from the old board, find what exactly is needed to get the new one working – my guess would be a serial number or other identifier baked in there that I might be able to transfer across to the new board.

However, when I was researching this board, I found another web page hidden away at WasherHelp. It's for a different model number, but I figured worth a shot.

There was references to a diode on the board that failed – The one labelled D7 on the PCB. I checked on my board, and found that the same diode is dead on my board.

I de-soldered the diode from my board, an SR110 schottky diode, and started looking up alternatives. I found that the 1N4002 diode is similar specification, but is a regular diode, not schottky. This was bumping up on the limits of my electronics knowledge, so I asked a friend who has more professional electronics experience, and he told me it would probably be OK, but would likely run warmer and be less efficient.

I also had an 1N4002 on an old PCB in my junk bin. I swapped it in, gave it a test run, and it worked.

I’m happy that I got this sorted, and hopefully will help others extend the life of their appliances. I’m a little disappointed though that I didn’t get a chance to mess with the microcontroller/firmware stuff though. Perhaps another appliance will give me a chance to explore another time.

Disclaimer: This is just what worked for me, and is in no way professional repair advice or instruction. If you decide to do something similar, remember that you, and you alone, are ultimately responsible for the outcome.


Update December 2022:

In case you were wondering - the fix is still holding up. But that's not why I'm updating.

A commenter asked if I had any higher-res photos of the board to help them fix a burnt out resistor. This is the best I could find:



Thursday, 19 December 2019

Repair Cafe Update - November & December

A couple of months have passed quickly by and the November and December repair cafes have been and gone.

November

To start with there was a jammed paper shredder. Having taken it apart we found that the jam had caused the motor to flatten the teeth of one of the gears. Given the lack of available replacement parts, it seems like it's not going to be repairable.


The next item was an oscillating sander that wouldn't turn on. An initial suspicion of the motor brushes being worn was scuppered when the screw terminal on the PCB that connected the main cable, fell away during disassembly. It looked like the pins had just corroded through. There was enough left of the pins that it was possible to scrape the corrosion away and re-solder the connector.


Third up was a lamp. The issue became obvious when unpacking it, as one of the pins fell of the mains plug. The power adapter was disassembled, but turned out not to be salvageable. However a replacement shouldn't be too hard to find.



Finally a Technics Hi-Fi received was brought in with reports of the radio not working, and volume dropping intermittently. There was no obvious way to replicate the problem, but it did seem that the radio might have been badly tuned, and some cycling of the volume control seemed to sort the volume issues. Given that nothing was particularly done, yet the problem seemed to go away, it's hard to class it as a win or a loss.

Scorecard

This monthTotal
Wins12
Draws
(Workarounds and partial fixes)
13
Loss11
Needs parts13


December 

I managed to find a replacement power adapter for the lamp that was brought in last month, so was able to turn that into a quick win.

Second up was a dumpster-dived angle grinder that was just not powering on.
After checking the usual electrical culprits it was a case of the plastic switch being decoupled from the actual electrical switch - all it required required being clipped back into place. Unfortunately the nut that holds the disc in place was gone, but I'm sure a spare can be found in time for next time.

Unsurprisingly, there was a set of Christmas lights. Unfortunately not salvageable as it looked like there'd been an attempt to glue the bulbs in place.

Finally, a family brought in three lamps - I took two of them, one of the volunteers took the other. The first of mine was just a fuse replacement - easy win.
The second was also a fuse replacement, but it wasn't the plug fuse, it was a smaller device fuse on the circuit board of the lamp. With no replacement available, all we could do was advise them of the fuse that was needed and I showed them how to replace it.

Scorecard

This monthTotal
Wins24
Draws
(Workarounds and partial fixes)
03
Loss12
Needs parts23

That was the end of the repair cafe for the year, and although I've only been part of the repair cafe for the past three months, I was pleased to hear that a total of 650 kilograms of electronics was repaired in 2019, and I'm looking forward to trying to beat that record next year.