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

​​​​[wpvideo wQwFXqt7]​
​​
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

Pi Power Off Indication

This circuit is the basic principle on which my Pi power-off system operates:

The main point being that GPIO14 (Tx) goes continuously low when the Pi is powered down. 

When it’s high it’s pulsing, but the power-off system uses programmed hysteresis (a delay!), and this simple indicator doesn’t need nowt! Simply due to the fact that the pulsing is too fast for the human eye to notice. 

I use this circuit for headless Pi devices to confirm that they’re ready to have the power pulled, as being a dad I’m so often distracted!!

This code works!

This is the code which I have used, slightly adapted, and it works!

http://www.instructables.com/id/Raspberry-Pi-Shutdown-Button/

PICAXE & Pi

I now have a working programme for the PICAXE which monitors the logic level of GPIO14 (TXD0, physical pin 8) on the Raspberry Pi, amongst other things. Building a test model up on breadboard with a PICAXE 14M2, I included a power-off button (this works alongside the previously mentioned Python script), a reset button, and the control circuit for the relay. And the AA-cell-eating relay! There are of course solid-state relays available, but I’m switching UK mains which is around 240 V rms (should be 230, but it isn’t) and I want it to be OFF off. Completely and absolutely switched the chuff off, with a nice big air-gap between the contacts!
I also like the old-fashioned click of the relay πŸ™‚

Raspberry Pi 2 GPIO levels after shutdown

There are now many tutorials, Instructables posts, and even devices which help with adding a physical shutdown button to the Raspberry Pi. I want to build something that will completely and utterly shut-the-chuff-off i.e. switch the mains off. I aim to use a PICAXE microcontroller to handle this shutting off via a relay, but the PICAXE needs to know when it is safe to proceed.
I used a handheld oscilloscope to measure the voltage levels of the GPIO pins while the Pi was running, versus it being shutdown with the power still connected. The ONLY pin with a significant change in voltage is GPIO14 (TXD0) on physical pin 8. It drops from around 3.4 V to around 1.3 mV, so I’m hoping that I can use this to indicate to the PICAXE that the Pi has shutdown, or is in the process of shutting down and programme a delay of, say 10 seconds.
This could also work as a fail-safe such that only IF the level is low for this entire duration will it proceed with the switch-off.

4pin Raspberry Pi GPIO pin-out from Farnell, with annotations.
40-pin GPIO of the Raspberry Pi 2.

Skoda Octavia Door Courtesy Light Switch

Dscf2470
01a – Pop the mirror control console out.

Dscf2471

01b

Dscf2525

02a – Remove the door panel retaining screw from behind the interior door-release handle.

Dscf2473

02b – The door panel retaining screw from behind the interior door-release handle.

Dscf2468

04a – Remove this piece from under the handle before attempting to remove the window control console. The protrusions lock the console into the frame.

Dscf2467

04b – Window control console removed by brute force and ignorance…

Dscf2469

04c – Broken component due to previous procedure!

Dscf2465

04d – Broken frame (right hand side) due to the previous procedure.

Dscf2531

04e – Overview of driver’s door handle and window control console location. You can see the green clips that hold the console in place, along with the (broken) bar where the handle is. The black electrical tape is attached to the wiring to aid retrieval during reassembly.

Dscf2474

20 – Overview of driver’s door with panel removed. Note that the window is partially opened, and secured (just in case) with gaffer tape.

Dscf2475

21

Dscf2478

23 – Note the lock button and rod.

Dscf2480

24b – The end of the lock-button rod being unclipped from the lock mechanism.

Dscf2485

25 – Removing the (key-operated) barrel lock was a pig. The metal peg you can see at the bottom of the aperture rotates round on a cam, holding the barrel in place.

Dscf2482

26a – One of these screws operates the cam which holds the barrel in place. I ended up drilling a larger access hole to this screw as my bit driver was just too broad..!

Dscf2491

26c – The end of the cable that the exterior door handle pulls to operate the door-lock mechanism

Dscf2524

27a – The door-handle cable preventing the lock assembly from being removed.

Dscf2522

27b – The mechanism-end of the cable to the external door-release handle.

Dscf2521

27c – The connector which you probably can’t see yet, looks like this.

Dscf2518

27d – Removing the assembly now that the cable is free.

Dscf2507

28 – To undo the assmebly requires holding one of the sprung levers out of the way.

Dscf2514

29 – Separating the two assemblies.

Dscf2492

30a – Note where all the parts sit β€” Take photos!!

Dscf2493

30b

Dscf2495

30c – The offending solder-joints (by the connector) causing the problem.

Dscf2499

30d – That bush on the back-end of the motor had me foxed for ages when it fell off. Fortunately, I had taken a photograph..!

Dscf2508

31a – When re-assembling, watch out that this fork meets up with the corresponding lever in the next photo.

Dscf2509

31b – This lever needs to marry-up with the fork in the previous photo. This caused me to have to repeat EVERYTHING up to this stage again when the door wouldn’t lock!!!

Dscf2516

32a – Checking the whole system works correctly.

Dscf2517

32b – Push the latch (as if the door is closed) then pull the door-handle cable to test the lock.

Dscf2527

33 – Electrical tape used for retrieval of cables etc. Do this before presenting the panel back up to the door.