RSS Amplifier

Blog

Bogology

blog.bogpeople.comSource feed ↗25 posts

Live Last read · last published · next check

Written by

Latest posts

ABS Sensor Testing

My son's car (2016 Peugeot 208) quite suddenly threw up some alarming-looking warnings recently about ABS, ESP and tyre-pressure monitoring not working. Reading the error-codes from the ECU memory threw up DTC C1331, indicating a fault with the right-hand side ABS sensor:- For reasons that needn't detain us here, I wound out swapping out both front sensors - presumtively one good and one bad. What…

Getting UTF-8 from PHP and MySQL

This turned out to be more annoying problem than I expected. Consider this MySQL table:- MariaDB [demo]> show create table users\G *************************** 1. row *************************** Table: users Create Table: CREATE TABLE `users` ( `name` varchar(64) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci 1 row in set (0.000 sec) MariaDB [demo]> select * from users;…

JavaScript Destructuring Assignment Gotcha

This wasted several hours on me. I'll explain exactly what I was doing that got me into this mess a little later, but the bare essence of the problem that I ran into was this:- let a = "this is a" let b = "this is b" [a,b] = ["foo", "bar"] console.log(a) console.log(b) What would you expect it to output? I expected:- foo bar That's not what I got, though:- $ node foo.js /home/eamonn/tmp/foo.js:4…

try...catch...finally - Not (quite) what I expected

Consider this bit of code:- def foo(): print("Called foo()") try: print("In the 'try' block") 10 / 0 except Exception as e: print("Got an exception: ", str(e)) finally: print("In the 'finally' block") print("About to return from foo() at the bottom") foo() What do you think it will output? It probably won't come as a surprise:- $ python3 a.py Called foo() In the 'try' block Got an exception:…

Antenna Experiments - Reprise

This is a follow-up to my earlier earlier post : if you haven't already done so, I suggest reading that one first. I caved and bought a NanoVNA. It is a useful piece of equipment for not very much money, if you have an interest in RF. Anyway, hooking up one of those "DF Robot" 433MHz antennae to it produced some interesting (in that they differ sharply from the previous results) results:- The…

Avoiding Arduino millis() Rollover Bugs

If you are using the millis() function to measure time on an Arduino, you might be tempted to do something like this:- unsigned long timer_expires_at = millis() + SOME_DURATION; while (millis() < timer_expires_at) { [do other stuff while waiting for the timer to expire] } [do stuff that should happen after the timer expires] For the most part, that will work well. But after around 49.7 days…

Antenna Experiments

Let me state from the outset that my knowledge of RF and antenna design is very rudimentary. I basically consider it to be black magic. With that out of the way, I read something a while back that made me wonder if it was possible to measure antenna resonance with a track-generator equipped spectrum analyser. In particular, with two identical antennae - one connected to the track-generator output…

Rotary Encoders

These are wonderful little things. I got to thinking a bit about exactly how they worked, so I hooked one up to a power-supply and an oscilloscope. There is 3V being delivered to the centre pin and one oscilloscope channel connected to each of the the two outer pins. At rest, the centre pin isn't connected to either of the outer pins. Turning the encoder clockwise... ...you can see that the blue…

Sweet Mystery

This packet contains 12 sweets of 4 different colours (black, red, yellow and - my favourites - green). The number and order of the colours in each pack appears to be random (based on many, many samples ). If my calculations are correct and if they are really randomly distributed, one in every 4.2 million packets will contain 12 sweets of the same colour. Something I have often wondered about: how…

GIMP Start-up Hang

This was a pain-in-the-ass to troubleshoot, so I'm sharing the story here in the hope that it will help someone else. I have GIMP installed on a Windows 10 machine. Out of the blue, it started hanging on start-up: the main window would appear, but then it would freeze for about 5 minutes. Uninstalling and reinstalling didn't help and no amount of Googling yielded any solution. The first useful…

Window Repainting Delays in Windows 10

A weird Windows 10 problem this morning. When I booted up the PC, it appeared very "sluggish". There was no obvious reason for this: CPU and disk I/O were all very low. On closer examination, the problem was with window refreshes: things were working OK in the background, but the contents of windows weren't being repainted for several seconds after. Switching away from a window and switching…

40dB Stereo Pad + Balanced-to-Unbalanced

The 30/40dB pad from my previous post works fantastically well. I have been using it to bring the balanced line-level output from a mixing desk down to an acceptable level for the microphone input on my camera and the sound-quality is crystal-clear. But it is time for version 2.0. The things I want to change:- Stereo. Up to now, the cable I have been using to connect the pad to the camera simply…

30dB/40dB Switchable Balanced Pad

I had a requirement to connect the (line-level) output from a small mixing desk into the microphone input on my camera (mic-level, obviously). I was using a DI box with a 30dB pad in it, but that required a 9V battery which was sure to run out at the most inopportune moment. Since the camera didn't take balanced input anyway, there was no real need for the DI (in fact, the cable from the DI into…

Experiments with a Smartphone Barometer

Modern smartphones have a wealth of sensors that provide all sorts of avenues for amusement for modern geeks. One of them is a barometric pressure sensor, which is the topic of this post. I have an app called Phyphox which provides direct access to the data from those sensors. I was in London a while ago, working on the 18th floor of an office-block. There is an express lift which gets from the…

Experiments with an AD633 Multiplier IC

Something I have always found a little confusing was the idea of signal mixing . The source of my puzzlement probably has its roots in the audio world of mixing desks for combining the sound from instruments and singers for music recording or live performance. These mixing desks are (or are supposed to be) additive : their output should be the simple arithmetic sum of all of the inputs, scaled…

555 Timer IC

I have been studying the classic and venerable 555 Timer IC recently and have created an animation showing the various signals on it as it moves from state to state. http://bogpeople.com/555/ Also a video...

Wireshark Traps For Young Players

I ran into an interesting problem in work today. An Ethernet switch appeared not to be behaving correctly: frames that I know were being received on an 802.1q trunk (coming in from a WAN carrier) weren't being sent out an access port for no reason I could see. The switch configuration was fine...there was no obvious reason it shouldn't have been working. A bit of background. The IEEE 802.1q header…

ATX Bench Power Supply Status LED

Like lots of electronics hobbyists, I have an old ATX power supply salvaged from a PC that I use as a bench power supply. It cost practically nothing and it works well enough. However, like any self-respecting geek, I can't look at anything for any length of time without thinking of ways it could be improved. The target of my ruminations today is that LED in the centre of the picture. It was…

Crimp vs Solder...fight !

For a project I'm working on, I have a requirement to butt-join some power cables together. I have been soldering them, but for reasons that needn't detain us here they are an awful pain in the ass to solder. I wondered was there any downside to using butt-splice connectors like these My concern was that the contact resistance might be significantly higher than for a soldered joint leading to a…

Proportional Representation in Ireland

I am not connected with politics or constitutional law in any way. I wrote this page really as an excuse to study up on something I found interesting. I have done my best to ensure that the content is accurate but if you do find any glaring errors please let me know and I will correct them. If you have any general comments/observations/suggestions about the page, I'd love to hear those also.…

Fake MAX3232 RS232 line drivers ?

This is my second post about the plague of knock-off ICs. The job was simple: I needed an RS232 interface on a Raspberry Pi so that I could use it to log console output from a misbehaving router (don't ask). I could have picked up one of the millions of USB-to-RS232 converters on eBay (and run the gauntlet of FTDI's clone-bricking updates ). However, I have read mixed reports of the stability of…

(untitled)

Spot the Chinese knock-off. The IC on the top is the genuine article (its an LED driver). It costs about €10 (+VAT) from a reputable supplier in small quantities (down from nearly €20 a couple of years ago). The IC on the bottom came from eBay. I got ten of them for €3.09. Not €3.09 each...€3.09 for all ten. Although you can't see it (because the quality of the laser etching is terrible and I…

Where does Blogger store pictures?

They say that a picture tells a thousand words. Imagine my dismay, then, when I noticed that all of the pictures from my recent blog posts (all the ones I had created since switching to Blogger, actually) had vanished. Thousands and thousands of my bons mots lost to the Internet. Not since the burning of the library in Alexandria has such a misfortune been visited upon the store of human…

Repair of an LED Lenser flashlight

My trusty little LED Lenser flashlight stopped working rather suddenly. I thought the batteries had failed because (a) nothing that over-engineered could possibly break and (b) there was evidence of crusty white "stuff" inside the battery compartment that looked a little like a battery might have leaked. Strangely, though, all of batteries measured a little over 1.4V each but there was no voltage…

The Great Crash, 1929

I have just finished reading "The Great Crash, 1929" by John Kenneth Galbraith . Although written in 1954 about events in America in 1929, an awful lot of it seems very familiar: only the dates and locations have changed. Its all there: lax monetary policy; rampant credit-fueled speculation (in stocks rather than property) driving prices to stratospheric levels; people investing in assets with…