About craigmarston

Development Engineer, retired photographer, crap musician.

Retro Google AIY Phone

We’ve had an old Bakelite phone for years as nothing more than an ornament, because some of its innards are missing.
I’d been itching to hide something in it for quite some time, but I was loathe to damage the Bakelite casing.

I removed all the parts I could, so that I could use the threaded holes and screws for mounting the new 21st Century innards!

The hook-switch contacts were carboned up, so I cleaned them with some P1600 abrasive paper, and tested them with a multimeter.

Rather than using just the hook-switch to trigger the Voice HAT, I decided to use the dial as well, to avoid false triggering if the receiver gets knocked.
I wired the switches in series, in a logic AND configuration; this requires the handset to be lifted and dial to be rotated to trigger.

Again with the steel base-plate, I really didn’t want to drill it to mount the Raspberry Pi. Were it not for the circuit diagram printed onto a large paper label and stuck to the base, I’d have used self-adhesive PCB mounts. Instead I opted for magnets!!

Because I couldn’t find enough technical data on the Voice HAT, and I wasn’t sure how the pulsing LED was powered, I used an opto-isolator to trigger a pair of transistors. One transistor powers each strip’s blue LEDs, whereas the green LEDs are connected straight to the power so that they are on constantly whilst powered up.

The board containing the opto-isolator and transistors is also held in place with magnets!

Colour-check quality approval.

The speaker included with the AIY kit is waaayyyyy too big to fit in here, so I bought a 4W subminiature speaker instead. I crafted a horn from some 3mm ABS and a Bosch glue-gun, to channel the sound through the little holes — where the sound from the bells would have originally escaped!

The sound does unfortunately sound “plasticky” — plywood would likely be better for this — maybe a future modification…

To avoid voltage drop in the supply, I opted to use 12V power in, then a DC-DC converter. The converter I bought states it can handle 15W and comes with USB A sockets on flying leads. I was able to mount the module using existing holes and non-metric screws; you can see the module in the top-right of the next image.

The original cable is fabric-covered, and it is possible to buy new mains cable in this style. However, I’m also running an ethernet cable out of the back so I used expandable nylon braided sleeving to cover the flat ethernet cable and power cable. I underestimated just how much this stuff can expand to accommodate plugs passing through (like a snake swallowing a meal!) so the current sleeving is way over-sized!

So, future mods include improving the speaker enclosure, and replacing the cable sleeve with some of narrower diameter.

Advertisements

LOUD Continuity Tester!

I noticed that my father-in-law struggles to hear the feeble high pitched squeak from DMM continuity testers. It’s not just years and years of working with noisy machinery sans ear-defenders — in a noisy environment, they really are difficult to hear!

This device uses a PICAXE microcontroller because they’re cheap (Arduino doesn’t like me), easy to programme, and I have oodles of ’em. The system runs from 9V, so there’s a small 5V regulator to run the chip. The speaker however gets the full 9V via a power transistor.

I selected ‘concert A’ as the tone at 440 Hz, added some start-up tones (old skool) and there’s reminder tone after 5 minutes of not being used.

The programming socket is accessible via a pop-off cover, for upgrades or fixing errors!

Traditional-looking Wireless Doorbell

As we renovate our house, we’re trying to keep everything ‘period appropriate’ where we can. The house was built in the late 30’s, but to an older design plan, so we reckon we have some leeway anyhow..!

Not wanting to drill through the wall to install a traditional doorbell meant we had to use a wireless system; but of course they don’t look the part.

I sourced a bakelite button from t’interweb and then had to figure out how to employ it!

Eventually, I removed the contacts such the the button merely pushes the button on the off-the-shelf wireless transmitter.

I’d wanted to make my own oak patresses using my mate’s watchmaker’s lathe, but the jaws were too small — so I bought some ready-turned off of t’interweb.

Marking out ready for chiselling.

There are some M3.5 captive nuts in the larger (rear) patress. The slotted screws hold both the Bakelite button and front patress in place.

The final assembly prior to being painted with ‘heritage’ paint to keep the theme!

The rear patress was secured to the wall, then the other two components fastened to it. Ta-da!

Temperature Switch for 12 V DC fan — powered from solar battery bank

My brother-in-law mentioned that he needed a thermal switch for the fan in his shed. The building works as a heat-trap during the day, and he’d like a way of blowing the hot air out, so that it’s more habitable when he gets home from work.

I have an abundance of Picaxe chips, so that’s what I decided to use for this project, specifically the 20M2 variant. I also used a second chip to make a serialised LCD: This means the main chip only needs one data line to operate the LCD. It also made testing & development easier for me.
I could have used a RaspberryPi Zero, but I’m still at beginner level with Python, so this would have ended up as a winter-heating project instead!!

Generic LCD with a serial backpack, using an adaptation of PICAXE’s code for their AXE133Y modules: http://www.picaxe.com/Hardware/Add-on-Modules/Budget-Serial-OLED-Module/
The time taken to build this little board was absolutely not worth it — for about £4 a generic PCB can be bought, that will do the job!!

The chip running the main programme was mounted on a kit PCB from CPC — this little kit comes with everything needed to programme and house the PICAXE 20M2 chip:

The RKP20c kit used to home the main chip. Much quicker and easier than using stripboard! http://cpc.farnell.com/rk-education/rkp20c-kit/project-pcb-for-20pin-picaxe-genie/dp/ED00014?

The main programme measures the ambient temperature and compares this to the user-set temperature: if equal to or above, then the fan switches on. Hysteresis of 2°C is written in to the programme, which may need altering, but testing needs to be done.

The temperature probe is a DS18B20, and support for these devices is written in to the PICAXE firmware. This makes things easy!

A hole can be drilled for access to the programming socket, but it may not need reprogramming…

I’ve made this project modular for two reasons: 1) I only have short periods of tinkering time, and can easily forget where I got up to with large projects, and 2) it aids fault-finding.
A third benefit is being able to use manufactured modules / kits instead of Veroboard. E.g. the relay module kit cost about the same as a relay on its own!

When the user changes the trigger temperature, it is stored in EEPROM in case the power is turned off. The value is loaded upon power up, with the assumption that the user will have an optimum temperature.

All the boards in the enclosure. C/W from top left: microprocessor with main programme, serial LCD driver (stripboard), generic LCD (green), voltage divider (small piece of stripboard in yellow heatshrink), relay module, 5V regulator (bottom left).

As this is running from a solar installation, it makes sense to monitor the voltage of the lead-acid battery, AND have a cut-off should the voltage fall too low.
Because this is a 5V system; a voltage-divider is required to measure higher voltages, so that the chip isn’t fried by receiving a voltage higher than its supply voltage. This makes use of the established potential divider equation:

V_out = (R2 / R1 + R2 ) • V_in

There is also a piezeo disc that will sound a warning if the battery voltage is too low.

The yellow button in the middle changes the mode of the unit from ‘Auto’ to ‘on’ to ‘off’.

Auto mode shows the ambient temperature, user-selected temperature, and battery voltage (visible in all modes)

Over-ride mode shows ambient temperature, ‘FAN ON’ (the purple LED indicates the relay is activated), and battery voltage

‘OFF’ mode operates as a temperature gauge and battery monitor, for cases when the fan isn’t likely to be needed. It also mutes the piezo sounder for cases when the battery voltage is low.

Make-shift Unicorn HAT Diffuser

I made this from a piece of a flexible ringbinder, that I’d bought at Morrison’s supermarket for 99p!


Initially I thought it’d be a great idea to score the plastic piece I’d cut out, prior to bending:

NOPE!!

The stuff is easy to cut with scissors by the way.

Anyway, to obtain the curve, the panel needs to be slightly longer (by about 5 – 10 mm) than the length of the Unicorn HAT. Best to adjust this to your own personal curve tastes. You’ll need around 3 – 5  mm of material to form the arc* of the folded ends, and then about 8 – 10 mm for the retaining flap which holds it in place. (Mine is more like 11 – 12 mm).


The first attempt after drilling the holes into the retaining flaps — I attached the diffuser underneath the Unicorn HAT. Don’t do this..! 

(Hey if you do, please let me know how you achieved it!!)


Secure the screws to the flaps with nuts & washers as shown in the close-up photo, then you can slot the whole assembly onto the HAT. 

*To form the arc (folding the flaps) just fold the material. I used a pair of pliers, but a bench vice would be perfect. Make several gentle creases so you don’t split the plastic, and you’ll need a slightly sweeping arc anyway, to go around the head of the screw.

I haven’t even tested it yet as it’s disappeared into my son’s bedroom…

Bargain USB Power Supply

Not bad value at a tenner, let alone a fiver!

But, will this bargain from Aldi set my house on fire, or fry everything attached to it? We have some of the first ‘Raspberry Pi Kits’ from Maplin at work, and they came with a Maplin-branded USB power supply. Their output was so raggedy-arsed that the newer Raspberry Pi’s refuse to operate from them!


When I plugged the cable into the power supply there was an almighty ‘CRACK’!! You can see the effects of the sparks — I say sparks because I did it again 😆


Using my ickle handheld oscilloscope, the output (under a slight load) appears to be stable. It certainly doesn’t look like the back of a dragon anyway!!

ZeroPoint • The PiZero-sized analogue gauge for RaspberryPi

​​​​
​​
I excitedly jumped at the chance to review this device as I had the perfect project for an analogue pointer, which was in combination with an experiment I wanted to run. Unfortunately I have been unable to locate particular parts for this experiment so I’ve had to shelve that for now. Grr…
The pHAT has the same footprint as a Raspbery PiZero, although the stepper-motor housing overhangs the PCB by a few mm. This is on the same edge that the PiZero has its connectors on, so I can’t imagine a way that it’d be an issue. Also, it can be used on a full-sized Pi.

Using the test code provided by 4Tronix running on the command line, it’s quite satisfying to keep tapping numbers in, in order to make the needle swiftly and smoothly move! Gareth had also provided some dial templates to get us started.


THIS device is going to be responsible for me learning to code in Python…

Note: the female header is surface-mount not through-hole, SO DON’T just yank it to remove it! Use something like a screwdriver to gently prise along the headers a bit at a time, so as to avoiding bending any pins.


I soldered a right-angled header to my PiZero for mounting it on a breadboard adapter. This also allows the rear of the pHAT board to be seen:


I’m not going to duplicate the technical specifications as they can be found here: http://4tronix.co.uk/store/index.php?rt=product/product&product_id=567

However, my next experiment at home will be monitoring wind-velocity over time, at particular points around our property, and our neighbours’. This is intended to lead to a wind turbine project!! 

Like my neighbour said; even if we only generate enough to charge mobile phones, it’s a start. 

The music in the video was kindly provided by the sickengly talented, and jolly nice JT Bruce • Plunge Into Hyperreality from the album The Dreamer’s Paradox