mailto: blog -at- heyrick -dot- eu

Freezer

I plugged the freezer in on Sunday morning. It's a noisy beast. It also seems to draw around 200VA when in use, so that 100W must have been a "nominal" rating. Still, it clicks on for a minute and off for four or five. Obviously the exact cycle will depend upon the ambient. Usefully for me, it's never that warm around here. Indeed in the harsher winters it has been a mere 4°C or 5°C. That's one of the reasons why I was interested in an induction stove, for the butane tends to prefer to remain liquid when it's cold...

Freezer temperature
Freezer temperature.

The readings start at 1pm because I had a little meat thermometer in there, but the LCD simply wasn't going to work at such a cold temperature, so I swapped it for the temperature sensor in the fridge. After leaving it a while, it does indeed seem that the freezer keeps its contents between -19°C and -18°C with fairly little variation. Also since the trays have plastic covers, that'll help retain the cold when opening the freezer as, obviously, it'll suffer more from this than a chest freezer.

The little green power neon has given up the ghost. I did take a look. The front panel at the top is secured in place with two screws, but it is also glued in place which makes it way more trouble than it's worth. Additionally, the module with the lamp is also connected to the temperature sensor. It may be that it's a rod going to the temperature switch unit, but it could just as easily be that the switch unit is there and the little pressurised metal pipe runs from it. Maybe the top can come off? I don't know, I have left it for now as it's not a big deal. I mean, it's not as if I can't hear it when it's running...

I had the door open (compartments closed) for about three minutes as I faffed around with that stuff. Upon plugging the freezer back in, the red "PANIC!" light came on. It went off a couple of minutes later when it had cooled down enough, and that's with the freezer empty. Not bad.

Rather looking forward to stopping by the supermarket for some frozen stuff tomorrow.

 

I just had a brainwave and checked ElektroTanya and found a service manual for the next model up, and the module slides in there and it's connected to the temperature sensor stuff. I'm going to nope right out of touching that.

 

Looking at cheap medical equipment

I got myself a hooded sweatshirt from Shein because I really liked the pattern.
This is what's inside you
This is what's inside you.

I wore it to work, and shopping, last week. Some people thought it was amusing, some were completely grossed out by it. Some said that halloween is over, to which I replied "it's not halloween, it's anatomy, this is what's inside you". And then they were grossed out.
My favourite part? The guys tended to be less vocal but a lot more squeemish than the girls.
For me? I find it fascinating. There's the part where the linguine goes. There's the part that hurts like hell when I have an upset tummy. There's "that little green thing" that cats leave behind when eating mice. And, of course, all of the bones that make me "me shaped".

I also ordered this.

Cheap medical stuff
Cheap medical stuff.

On the left, a simple pulse oximeter (blood oxygen level). It cost €1,50.
On the right, a basic blood pressure/tension monitor. It cost €4,63.

Pulse Oximeter teardown

This device measures two things. The first is your pulse, and the second is your peripheral oxygen saturation (SpO2).
Looking into the oximeter
Insert finger, it won't bite.

How this works is that you insert your finger and two LEDs are shone through the finger to a photodetector on the other side. It takes a few moments at the beginning as the device must calibrate itself because there is no constant of what gets detected on the other side. Fatter fingers, thicker bones, dark skin... it'll all absorb different amounts of light, so the device needs to adjust itself until it can detect your pulse. This is because there will be a constant (how much the flesh absorbs) and then a variable on top of that (the changing absorbance as your blood pulses).
One of the LEDs, the one that you can see, is red with a wavelength of around 660nm. The other LED is infrared, with a wavelength around 940nm. The unit rapidly switches from one to the other and looks to see how much light makes it to the sensor. At these specific wavelengths, absorption of light differs notably between oxygenated and non-oxygenated blood. The oxygenated absorbs more infrared and lets more red through, while deoxygenated is the inverse.
Pulsing around 25-30 times a second, the device will create a recording of the signal for each of the LEDs - which will fluctuate according to the pulse. The baseline is subtracted from each signal to leave the blood measurements. Finally the ratio between the two will be examined to determine the blood oxygenation level.

These devices are less accurate than extracting arterial blood and analysing it, but with an accuracy of around 3%-5%, it doesn't require either needles stuck into arms or the costly analysis. It can be done in literally seconds by anybody - even children. Just sit quietly, insert finger, push button, wait for reading to settle.
Well, okay, maybe not all children. "Waiting" and "quietly" were unknown concepts to my itty-bitty self.

The LEDs are coloured LEDs arranged in the necessary patterns, with a piece of black plastic over to stop interference between them and keep the display bright and clear.

The LEDs
The LEDs.

The most interesting part is the little SoC that is controlling it. Being marked 32F1023 it is easy to think it is some sort of knock-off of the STM32F10xx ARM Cortex MCUs. Only those have twice as many pins. There's some sort of (JTAG?) debug port on the left.

The oximeter motherboard
It is pretty much all down to this one chip.

It's actually an APT 32F1023 MCU which offers a 32 bit C-SKY processor core that can offer up to 0.7DMIPS from a 48MHz clock. The C-SKY is a little known Chinese processor design that appears to have been a continuation of the Motorola M-CORE. There doesn't appear to be anything in the way of useful documentation in English... Like the ARM's Thumb, it's a 32 bit core with a 16 bit instruction. There's a two-level pipeline and a single-cycle 32 bit × 32 bit multiplier. This particular chip also includes a hardware divider that can perform signed or unsigned 32 bit division in 5 clock cycles as well as a hardware CRC unit that can handle CRC-16, CRC-32, and CRC-CCITT.

As is usual, there's a lot of I/O (GPIO, ADCs, UART, timers, interrupts, etc). In terms of memory, 64K of Flash for the program, a separate 2K of Flash for data, and 4K of SRAM.

At €1,50, this device cost less than a (decent) tea or coffee out.

 

Blood pressure monitor teardown

Opening the blood pressure monitor, or sphygmomanometer to be nerdy, was a case of carefully peeling back the bottom corners of the front label to reveal two screws, and the other side simply unclipped.
Blood pressure monitor inside
Inside the blood pressure monitor.

There is a leaky pump unit that can pressurise the cuff. It is leaky in that it'll slowly let air out when the pump is not active. In this way the pressure can go down without having a separate solenoid.
The pressurised air goes to the cuff, and also to a pressure sensor. This device can tell the cuff pressure at any moment, and by detecting tiny variations it can also detect the pulse.

The way this works is exactly the same as your doctor does, only it measures the pressure in the cuff rather than listening with a stethoscope. The principle is the same, however. An inflatable cuff is placed around the upper arm at about the same level as the heart. The person being measured should sit with the arm supported and hand loose (not clenched, it's not an injection).
The cuff is inflated until the artery is completely blocked (occluded). Then the pressure is slowly released. If you are using a stethoscope you'll begin to hear whooshing sounds as the blood begins to squirt through. This point is known as the systolic pressure (maximum pressure in one heartbeat). The cuff continues to deflate until the heartbeat can no longer be heard. This point is the diastolic pressure (minimum pressure between two heartbeats).

Typical values in the West are 127/79 for men and 122/77 for women. If you're over 130/80 you might like to talk to your doctor. If you're over 140/90 then you need to talk to your doctor.
There is no standard for having blood pressure that's too low. Unofficially it's often considered to be around 90/60 but it's usually only considered too low if there are other symptoms such as confusion, dizziness, weakness, chest pain, headache, syncope (fainting), etc...

Note that readings are highest in the early morning, and lowest at night. If your pressure doesn't drop off at night, it's an indicator of potential cardiovascular disease.
Note also that blood pressure varies a lot due to your emotional state, when and what you've eaten, physical activity, and so on.

Note also that the accuracy of these meters is highly variable. Yesterday I measured myself with all five of my monitors and received the following readings. The xxx/yyy is the blood pressure, and the number after the colon is my pulse rate.

132/80:68, 118/72:66, 122/79:64, 120/73:68, 113/75:67

The first reading is likely an anomaly due to the cuff being positioned incorrectly. The final reading (with this particular monitor) was achieved on the third attempt. So cuff placement can have a fairly dramatic impact upon the readings obtained - it's important to put the cuff on properly and snugly. I wasn't really doing this as I just pushed my sleeve up rather than exposing my entire upper arm, because I was recording for a video and it wasn't exactly warm...
It is recommended to take at least two readings a couple of minutes apart. If they differ by too much, take a third reading.

Let's now look at the board.

Blood pressure monitor board
Blood pressure monitor board.

On the left is a USB-C socket. This is used for power. It is good to have a standardised connector than a barrel socket with no clue as to how it is wired, or nothing at all. There is no data transfer, the SoC doesn't support USB. Just below that is a four-pin space, most likely wired to the SWD serial debug.
Next to that is the pressure sensor, probably something like the inexpensive MPS20N0040D MEMS sensor. The chip below is an LM324 op-amp to boost the analogue signal from the sensor.
The tiny chip to the right of the sensor is a PUYA C642F15. This is a tiny microcontroller based upon the ARM Cortex-M0 clocking at 24MHz. With 24K of Flash and 3K SRAM and only one ADC, it is arguably less capable than the one in the oximeter!
The huge chip on the right is not marked, however it would appear to be - perhaps a clone of - a PCF8551 universal 36 × 4 LCD segment driver.

I'm not looking at the other side of the board. It is screwed down on to a piece of conductive rubber between the board and the LCD. Those things are easy to upset, so I'm going to leave it as-is. The USB port does nothing when plugged into my phone with OTG Troubleshoot running, so I'm going to guess that there's nothing of interest under there, just the control buttons and LCD connection.

All of that for €4,63. How? How is that possible?

 

The Gloom is over!

Some sun
Some sun at long last!

At half past two, for about four minutes, the sun peeked from behind the clouds. Clouds that had actual patterns and shapes. It's been a non-descript grey Gloom since the morning of the 31st where there's been zero minutes of sunlight. So, hey, I'll take four. Went out and walked Anna, but she only wanted fed again. Oh well...

I'm rather hoping for rain. As a Brit I don't particularly mind rain (you know the trope...) because at this time of year the sun is still warming but clear night let the daytime heat vanish in a hurry to make the nights become a cold, barren, wasteland of frost and ice.

I have the living room window open right now. It's a mite over 14°C out there. It feels warmer outside, so... ☺

 

Dual-camera setup

Yesterday I made a video showing the use of all of my medical monitors - it's on my YouTube channel. It was a bit nerve-wracking as it was recorded straight through and completely unscripted. I don't think I forgot anything or screwed up... I did forget the microphone, but the mobile phone picked me up okay, and possibly better as the microphone's noise cancellation may have made a mess of the noise of the air pumps.
I think the overhead camera was, just, visible in-shot. I could have edited that out by zooming in slightly, but decided not to.

What was most notable was, due to wanting to have a camera facing me, for the obvious reasons, and also needing a camera to show what was on the table, I needed to run it as a two-camera setup.

The first camera was the usual one. Since I needed the tripod for something else, I used a mini-tripod mounted precariously on a stepladder.

Looking through camera 1
Looking through the main camera.

You can just see a metal rod on the right. It's for holding the second camera.

Looking at camera 2
Looking at the overhead camera.

This, obviously, looks down at what's on the table.

Looking through camera 2
Looking through the overhead camera.

I tried to make a background using the Genie AI art generator, but the developer is getting greedy. It's not enough to make us sit through adverts that often take over two minutes each, but now the free tier is limited to something like five or so images. Granted, last weekend I made about fifty, but I had to put up with crazy amounts of advertising for it, so you know...
I found a different app - CreArt. It's much faster and more responsive, creating images that are 768×768. So I asked it to create a cinematic shot of high up in the sky looking at a mountain range. That was to be the background image. I originally wanted a blue sky with heart-shaped clouds, but it just wasn't getting that, so I decided to go with a mountain range.

In YouCut (video editor), it's a little back to front in that I need to lay down the background image for the duration of the video, and then put the video on top of that. The video then gets chromakeyed. That means "replace the green with the background", which leads to this.

Chromakeying
Chromakeying in practice.

I had to make the green replacement quite aggressive as the background was not a uniform green. It would need a much better lighting setup to fix that.

In the editor, I then added the overhead video as a third layer on top of the second (video) and first (background), and simply cut out the parts that I wanted to be from the normal camera.

Editing
Editing the video.

Yes, it's a bit backwards. But it works, and better yet, it works directly on the phone.

The only real problems, other than lighting and getting stuff in shot that I didn't really want (I'm sorry, I didn't notice that dangling plug from the selfie-stick until I'd finished!) was transferring the video. The overhead footage was recorded using my old Samsung S7 as it's the only phone that had enough free space. At 720p it racked up 1.3GB (H.264 AVC at ~7.6MBit/sec). Took a while to FTP that from one phone to the other as... I don't know, I think the power controls of the S7 might be a little aggressive as the transfer kept failing for no obvious reason, so I'm just going to guess that the OS killed off a process that it felt was taking far too long.
The main phone created an HEVC file that was 1.71GB for the same duration. You'd have thought HEVC would be smaller, but it was running at ~10MBit/sec.

The final edited version was slightly shorter, as I cut out the start and end (me getting into and out of the chair) and the hand-clap to synchronise the two recordings. This was 720p H.254 AVC at the high quality option but since it was only 0.94GB it was clearly lower quality than the off-camera recordings. With a bitrate of ~6.7MBit/sec, yes it was. However it isn't a big problem as YouTube will compress it much more. Indeed it does, reducing the H.264/AVC video to a mere 163MB at ~1.1MBit/sec.

 

 

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! ☺ ADDING COMMENTS DOES NOT WORK IF READING TRANSLATED VERSIONS.
 
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.

Rob, 11th November 2024, 19:04
I've got a pulse oximeter here (actually four.. Original one is broken, got a replacement of amazon, then a new spare off Aliexpress, and a new one from Home Bargains in-store at £2.99) 
The original I bought for my Mrs as she was having issues at yes time where her oxygen saturation was dropping dangerously low. But it came into its own Easter '23 when I woke up feeling "off" and it was handy so plugged in a finger, and discovered I had a pulse of 255bpm! 111.nhs.uk told me to go to A&E, so I did, and was whisked right into Resus, sod the 6 hour wait, where they tried lots of things, but eventually injected me with something that actually stopped my heart, briefly, and when it rebooted, it was at a more sensible 110bpm. A few weeks with several more instances they decided I had SVT (Supra ventricular tachycardia) and am now on meds to treat it. They actually tried operating, but couldn't find the trigger point, so couldn't fix. Fun, but I'm glad I had the meter to discover it!
Rick, 11th November 2024, 20:26
Bloody hell Rob, that's like "fine and twelve points" fast. 
Glad you had the little gizmo to hand...
jgh, 11th November 2024, 21:58
Hmm. My blood pressure monitor I strip around my wrist, then hold my wrist at the height of my heart. I do this my loosly holding one hand on the table and resting the elbow of the monitored arm on my loose fist with the forearm vertical. 
 
My main problem with taking my readings is I'll suddenly remember when I've just got up and wandered around, so need to sit down to settle into a queasant state before testing. I then start doing some work and forget, get up to make a cuppa, and then remember again. And need to sit down quietly for five minutes.... 
jgh, 11th November 2024, 22:02
I've been trying to make videos of coding stuff, but the frustration is that I need a camera positioned where my eyeballs are. But I need my eyeballs there. 
Zerosquare, 11th November 2024, 22:18
> discovered I had a pulse of 255bpm! 
 
Props to you for trusting the pulse oximeter. I would have gone "Huh, 0xFF? Nah, that stupid thing must be broken."
Rick, 11th November 2024, 23:49
Maybe it *was* broken - 255 was as high as it could go. 😱
C Ferris, 12th November 2024, 09:01
Interesting that A&E rebooted his heart - after finding heart rate too high :-/
Rick, 12th November 2024, 14:06
Yup. 
Saw the moon and stars last night. It was 4°C this morning...

Add a comment (v0.11) [help?] . . . try the comment feed!
Your name
Your email (optional)
Validation Are you real? Please type 26490 backwards.
Your comment
French flagSpanish flagJapanese flag
Calendar
«   November 2024   
MonTueWedThuFriSatSun
    3
47810
121415
18192021222324
252627282930 

(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 03:43 on 2024/11/19.

QR code


Valid HTML 4.01 Transitional
Valid CSS
Valid RSS 2.0

 

© 2024 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 - 2024/11/13
Return to top of page