mailto: blog -at- heyrick -dot- eu

Linky TIC waveforms

As I was waiting for the man to look at the wells, I decided to probe the Linky's TIC output. In case you haven't read earlier posts, this how a French smartmeter provides a running commentary of energy consumption, meter reading, etc.

As it happens, he turned up early and... his measurements more or less matched mine.
Unfortunately, he doesn't know if his company is able to deal with the underground water pipe. He'll ask his boss, but... of course this raises the question of is it worth getting the wells seen to if the pipe barely works? He gave a ballpark estimate of €1,500-2,000 (😱!) but I'll need to wait for his email before I have a fixed price. Oh, and I'll need to lop some stuff off various trees because the truck is a massive 3.8m tall.
So it seems like one step forward and one step backward. Hmmm...

Anyway, on to nerdier things.

This is the 50kHz waveform coming out of the Linky.

A 50kHz carrier signal
A 50kHz carrier signal.

What you're seeing here is the 50kHz carrier that the Linky uses to encode the serial data, so all you'll see at 10µs is a wobbly waveform that appears to glitch.

If we zoom out to 2ms, the waveform now starts looking like actual data.

The carrier signal now looking like there's data.
The carrier signal now looking like there's data.

But why is it modulated at 50kHz instead of just putting serial data on the wire? The answer is a mixture of noise immunity, reliability, and to force you to properly isolate the meter.
Reliability and noise immunity are related. Glitches, spikes, and dropouts, even if brief, could mess up the communication. By using a carrier that is always changing, any such glitch will likely appear as a small disturbance in the carrier, while the underlying data still gets through.
As for the forcing? Well, you can't put a 50kHz anything into a UART. You might be able to make something useful out of it using a bridge rectifier, some capacitors, and a lot of luck... but really it's easier just to push the signal into an optoisolator. The output is a pretty clean serial signal and it is properly isolated.

Fifty kilohertz, or fifty thousand times per second, means the carrier period (that's one cycle from centre to top, down to the bottom, and back up to the centre) takes 20µs. At 1200 baud, each bit takes 833µs. This means each bit is about 41 carrier cycles.
As an aside, if you are using standard mode rather than historical, that runs at 9600 baud which means each bit takes about 0.104ms, which means there are only about five carrier cycles per bit. Less leeway, but still perfectly usable.

Now this modulated carrier waveform gets fed into the optoisolator. Since I'm using a two-diode device, it will light on both halves of the waveform, which means that the result will be a nice steady output from the device. The LEDs inside do not respond immediately to the input, so the zero-crossing point won't be noticed at 50kHz.

The output of the optoisolator looks like this.

The decoded serial data.
The decoded serial data.

This, being a legitimate serial signal, can simply be banged right into the UART for decoding.

 

But where's the fun in that? Let's do this ourselves.

If we're running at 1200 baud, each bit takes 0.833ms. Given our timing is 2ms, this implies about 2.4 bits per division.
The timing appears to be a little bit sloppy, but as long as it fits the expected pattern it will work. I think UARTs typically sample halfway into the bit time because of this, and remember that "serial" is as old as mainframes with spinny tape spools and teletype machines instead of monitors. It's an ancient protocol and in the decades between then and now there has been great hardware and some really shonky rubbish. So a little bit of tolerance is a good idea.

Let's annotate what we see here. We shall be treating 0v as logic 0 and 3V as logic 1.

Annotated serial bitstream.
Annotated serial bit stream.

Serial lines idle high, because the start bit is a zero, and the high to low transition is what marks the beginning.
As we can see, the big chunk to the left of the centre is logic low, so this is data. This is followed by a high blip, the stop bit.
Why is stop high when start is low? It's so they can immediately follow. There doesn't need to be any time wasted with idling.
But, wait, how do we know when we have valid data? Well, typically a UART will know because it will be receiving valid data right from the first start bit so it just clocks the data as it would expect. But for us, here, jumping into the middle of a bit stream like this, we have to make some assumptions and see if they hold up.

If the second digit is 1 (stop) and the third is zero (start), then this should be followed by seven data bits, a parity bit, and a stop/start pair.
Well, the seven data bits are 1100110. Because there are four bits set and we are using even parity, the parity bit should be a zero as the four set is already an even number.
And we can see that this is the case.
Finally, there should be a stop bit (1) followed by a start bit (0).
Again, this is the case.

Now we need to invert the order of data bits, as serial is transmitted with the least significant byte first. So 1100110 becomes 0110011, which is 51, or the ASCII code for the number three.

 

Security camera

The post arrived. I grabbed the last of the tilt'n'turn security cameras that were available. Well, okay, the last of the three megapixel 2.4GHz ones. If I paid a fiver more I could have had a 5mpix 2.4/5GHz camera, but I know that these ones work, and to be honest the picture from them isn't that bad. The only problem thus far is the night IR failing on the first one I bought.
Anyway, I have three cameras in normal use, one in the living room for when I'm away, and now a spare.

 

Then the sun came out, so I did a load of random things...

 

Letterbox

I decided, I did, that today would be absolutely ideal for changing the letterbox. Don't ask me why, it just happened.

Unfortunately, I didn't really think at the time, but this letterbox opens downwards and not sideways like a door. Which means I'd have to rethink how the flap is hooked up.

The letterbox front flap.
The letterbox front flap.

As always, it's a little switch to notice when the flap is closed. And lots of hot-glue. If you look carefully, you'll see some washers on the flap. That's because the flap is plastic and doesn't weigh much.
I actually had to go back and add four more washers (seven in all now) in order to attempt to keep the flap closed on a breezy day. It would have been nice, I think, to have simply pulled the metal flap from the old letterbox, but alas this flap is marginally smaller.

Inside the letterbox.
Inside the letterbox.

The door detection is pretty much like before, but this time it isn't able to be hidden behind the hinge.
You'll see that I have added a screw terminal block to join the letterbox wiring to the cable going to the microcontroller.

Cat and letterbox.
Cat and letterbox.

Tested, seems to work. Now let's see what happens when the postie stuff things into it.

 

Go fly a kite

Sometimes when I was a child, Mom would say that to me. It's an idiom that means "stop being annoying".

Well...

Flying a kite.
Flying a kite.

I actually had two kites. A small one with two strings that I think in French would be described as "nervous". It would go up, then around and around and around, then fall out of the sky. And I'd have to untangle the strings.
The second kite, the one you can see, had a single string. Very little in the way of wings, so it's an interesting design having wings so narrow, and a stupidly long tail.

When that took to the air it was pretty powerful, I could really feel it pulling in the string. It was also quite good at keeping itself in the air, given that I wasn't steering it (you can't do much with a single string). However every so often it would flip over and nosedive into the ground.
As it was flying, it made a sort of zzzzzz noise, the wind vibrating the material. Anna heard that and was human! don't like, human, don't like!

So she hid just inside the barn trying to see where the noise was coming from. It never occurred to her to look up.

I didn't do that long, got fed up of continually sorting out the string. I think the problem was the day was gusty, so it was a very irregular wind.

 

Shed light

Four years ago I fitted a 100W-equivalent LED bulb in the shed where I park the mower. It didn't get used all that often, as there's no need for it in the summer.
Well, last autumn I went to look for something and... no light. Nothing.

I finally got around to getting a ladder up to the light, and I have popped in a 75W incandescent. Not great, but to be honest I expected an LED bulb to last longer. To put this into context, the bulb that I removed in 2022 had been in there since 1992 at the latest. Like I said, it doesn't get used that much.

Light.
Stairway to heaven, rural version?

 

Another mower hack

A month ago I did a quick fix to little mower, to hold the front shield in sort-of-maybe the right place.
Well, today I got out my metal drill bits and put two more holes for shiny new bolts, this time with washers to spread the load.

A mower fix.
A mower fix.

Then I went and mowed the unwanted stuff around the previously-was-brambles areas. I don't take the ride-on there yet as there are still a lot of dead bramble bits that could be a problem with the tyres.

No brambles here.
No brambles here.

Not so long ago, until the 26th of August 2023, that part pictured was chock full of bramble.

 

And finally...

Yes, there's just a little bit more. I noticed that the blossom is starting on the semi-wild cherry out front.

Cherry blossom.
Cherry blossom.

 

 

Your comments:

Please note that while I check this page every so often, I am not able to control what users write; therefore I disclaim all liability for unpleasant and/or infringing and/or defamatory material. Undesired content will be removed as soon as it is noticed. By leaving a comment, you agree not to post material that is illegal or in bad taste, and you should be aware that the time and your IP address are both recorded, should it be necessary to find out who you are. Oh, and don't bother trying to inline HTML. I'm not that stupid! ☺
As of February 2025, commenting is no longer available to UK residents, following the implementation of the vague and overly broad Online Safety Act. You must tick the box below to verify that you are not a UK resident, and you expressly agree if you are in fact a UK resident that you will indemnify me (Richard Murray), as well as the person maintaining my site (Rob O'Donnell), the hosting providers, and so on. It's a shitty law, complain to your MP.
It's not that I don't want to hear from my British friends, it's because your country makes stupid laws.

 
You can now follow comment additions with the comment RSS feed. This is distinct from the b.log RSS feed, so you can subscribe to one or both as you wish.

David Pilling, 31st March 2026, 12:35
I'd not take much convincing that LED bulbs only last as long as incandescent ones did.
jgh, 31st March 2026, 17:02
It's the cost of longer life vs acceptable price point wossname innit. 
 
What annoys me is that so many *lamps* are now only available as *fittings*, so when you need to replace them it's an electrical job not an end-user task. It's like running out of toilet paper requiring you to replace the toilet roll dispenser.
Rob, 31st March 2026, 17:57
Most common LED lamps are being driven really hard, so it's no surprise that don't last too long. Stick a capacitor inline with them, you can reduce the output and thus the stress on them, making them last way longer. See e.g. Big Clive https://www.youtube.com/watch?v=ISTB0ThzhOY&t=1

Add a comment (v0.12) [help?] . . . try the comment feed!
Your name
Your email (optional)
Validation Are you real? Please type 75279 backwards.
UK resident
Your comment
French flagSpanish flagJapanese flag
Calendar
«   March 2026   »
MonTueWedThuFriSatSun
      
247
910111314
17
2325
     

(Felicity? Marte? Find out!)

Last 5 entries

List all b.log entries

Return to the site index

Geekery
 
Alphabetical:

Search

Search Rick's b.log!

PS: Don't try to be clever.
It's a simple substring match.

Etc...

Last read at 01:25 on 2026/04/11.

QR code


Valid HTML 4.01 Transitional
Valid CSS
Valid RSS 2.0

 

© 2026 Rick Murray
This web page is licenced for your personal, private, non-commercial use only. No automated processing by advertising systems is permitted.
RIPA notice: No consent is given for interception of page transmission.

 

Have you noticed the watermarks on pictures?
Next entry - 2026/03/31
Return to top of page