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!
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.
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.
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
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 is the code which I have used, slightly adapted, and it works!
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 🙂
I have no intention of trying to reinvent a perfectly good wheel.
Also, I haven’t yet learned to code in Python — and I don’t class myself as much of a coder anyway!
This is the code with excellent tutorial that I plan to put into my Raspberry Pi:
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.