2025-01-31

Bluetooth (BLE)

I have been working on some more educational R&D for the last week or so - exploring the possibilities with Bluetooth, specifically BLE.

The application involves four battery operated devices that need to link together.

  1. A helmet, with a servo to power a visor up and down, and LEDs for the eyes.
  2. A left glove with a disc of LEDs in the palm (I believe called a "repulser").
  3. A right glove, the same.
  4. A suit with speakers and a large ring of bright LEDs (I believe called an "arc reactor").

Why linked together?

Each works independently, and each has a button to trigger working. The repulser will quickly fade up to a bright light then go off. The helmet goes up or down.

The ideas is that when you activate the repulser, a synchronised sound effect of an increasing sound and a whoosh and crash happens at the same time. Similarly when the visor closes there is a synchronised clunk as it finished closing. A few other synchronised novelty effects have been added as well.

How to link them together?

The obvious, and low power, way to link would be cables, plugs and sockets. But this would be hugely inconvenient for the weather.

So - Bluetooth, specifically low energy BLE.

Daunting task

This was indeed a daunting task. I have done a little with BLE, just passively scanning advertisements to pick up and decode advertisements from temperature sensors. This would need a lot more.

But I went for it, and, well, it took a day!

Basic example code

I used the basic security gatt example - and to my amazement it worked. Minor bug and slight tweak, but very quickly I had a "heart rate monitor" server, and there clients connected. I then succeeded in having clients change the heart rate monitor location (text) which I used to tell the suit what sound to play.

Moving on

I tried to adjust the GATT fields, and failed. I need to read up more and understand how to do this, and add device information perhaps. Then consider making custom service codes - after all, calling an arc reactor a "heart monitor" is perhaps a stretch.

I need to properly understand the example code in the process, and prune it down.

I've also applied for a Bluetooth manufacturer code.

2025-01-27

How long is a month?

A month averages 30.436875 days, apparently, according to google, but sounds right.

A lunar month as we see from Earth is 29.5306 days, again, according to google, but sounds right.

What is fun is people saying we should do 28 day months, which is, I think, not daft for many reasons, but we need to allow for the extra days, or two, outside of the months. The extra day(s) would be way better at end of year and a holiday. What is special is that one reason they say this is to align with the moon which is simply not the case.

But put that all aside and let's talk of prescriptions!

In England I had, I think, 8 week prescriptions, and in Wales it is 4 week.

But clearly things vary around the world, and there seem to be two key styles of packaging for drugs - either 28 day or 30 day.

This must be hell for any pharmacists, either adding 2 or removing 2 from packages to meet 28 or 30 day based prescriptions. Why no standard?

Freestyle Libre 2

But this gets interesting. If you have these on prescription the pharmacist cannot make it up from 28 day to 30 day, or from 30 day to 28 day, they are 14 day sensors. They are 28 day for two, 56 day for 4.

So they are not like other meds that can adapt to 28 or 30 day basis. You cannot add 2 days extra from next box to make a 28 day prescription to 30 days.

Freestyle Libre 2 Plus

They now do the plus which is a 15 day sensor. This means they can work with 30 day based prescriptions. A clever move. But still, a pharmacist cannot take 2 days out of a package or two to meet a 28 day based prescription.

Cynic

So now the cynic in me says...

  1. It probably is the same sensor. They may have had to do new approvals, and new tests and trials to prove it is within a good tolerance after 15 days, but I bet the 14 day sensors are the same, just not verified as such. Yes, I may be a cynic.
  2. This means they cost them the same, but what if NHS pushed for lower costs, this means a 7% reduction in cost when selling the same thing for the same price, that is a win for the bean counters.
  3. Anyone on normal 4 or 8 week prescription will take a year, or two years, to have a prescription where there can miss a prescription and so mean Abbot actually lose out.
  4. But anyone using these knows they fail some times, so a spare is handy, so nobody, when they get to the year, or two years, when they could skip this on a repeat prescription will do so. Why would you?
  5. What is clever is that if one fails, and someone now has a spare, they will likely just use the spare rather than the hassle of calling, or filling in web form, to get a (free) replacement now. That will make the failure statistics way better, whilst meaning they get the same money as they would from 14 day sensors.
To be very very clear, this is a totally cynical viewpoint, and my own personal speculation. It may not be true.

2025-01-10

Trying Tindie

So some good news, it is worked.

I tried Tindie for the "coasters", listed 5 of them, and by the end of the day all sold and shipped.

It looks like they took around 10% in payment processing and their fees, not too surprised.

Now I have the challenges of sorting payment and VAT. I am sure I can, but I need to blog that I am sure.

It seems payment is Paypal, and PayPal sending to my bank account wants open banking access to see all transactions (WTAF?). Trying to add an account with no txns fails, what a surprise! So we need to sort that.

No clue of VAT, so will err on the side of HMRC to be on the safe side I expect. Invoice matching what is shipped.

But the next plan for Tindie is exactly as I said - some small volume boards, from time to time, and the example is an IronMan controller board.

I only need one, and maybe one as a spare, for a mate of my son that does IronMan at events and parties and so on. He has a suit. But the tech is all crap and broken.

So we can do way better, we already sorted the helmet, but the "chest" has speakers, a button, and several LEDs, which means more than one string (one RGBW and one RGB at least). The arc reactor has a nice outside ring with bright RGBW, and some inner RGB, but also a load of single "pixel" WS2812 in the suit.

So the board has :-

  1. ESP32S3-MINI-1-N4-R2 processor - Dual CPU, 4M flash, 2M SPI RAM
  2. Four LED outputs, well, they are just GPIO with an ESD diode, and power from USB-C and a big cap on the power from USB
  3. Two inputs, again GPIO with ESD diode, and 10k pull up, but suitable as buttons
  4. USB-C to power it all and do loading code, debug, etc
  5. Two (stereo) speaker outputs MAX98357A
  6. Two (stereo) microphones TDK ICS 43434 (not needed for Iron Man but cool, so did anyway)
  7. Micro SD card (for WAV files for the speakers).
  8. All WAGO connectors.
Ordering 5 is minimum and ordering 10 (or even 20) it way more sensible given the many "one off" aspects to costs. I ordered 10.

So plan is we use one, one spare, and 8 on Tindie. We'll see how that goes.

Update: Looks like at least two other "IronMan" specific boards as well (for gloves), so this will be fun.


2025-01-07

Selling cool stuff

We sell loads of stuff, much of the small PCB stuff on Amazon, and even though Amazon as a fucking minefield, and charge a fortune, they still make sense for things like Faikin boards sold all over the world.

We sell very little of the small PCB stuff direct on the A&A web site - I mean we have tried, and many boards are listed and in stock at the office for staff to ship out - but the A&A site just does not have the clout of Amazon.

But I actually get quite a lot of other cool stuff that never makes it to Amazon, or the A&A site, that is mostly not quite a commercial product - it is a result of loads of R&D. We record when we scrap stuff as part of R&D work, but in some cases we make small run prototypes that work perfectly, but they have no good home to go to, and not worth listing on Amazon or the A&A site. In some cases staff get bits.

This can happen as part of trying to evaluate an idea, consider new technology, or on the road towards making a product we do sell on Amazon and the like. Some things are a dead end. Some things have different features along the way to a final product. One recent example was my audio recorder - as I added a speaker driver to the initial prototypes, which are on Amazon now, but dropped it as not sensible to include at the extra cost. Other times are devices that have fewer than the final features, or different devices or configurations (e.g. LED controllers with PDM microphones).

What I need is a way to sell some of these - even if only just above cost price. It is way better in many ways than scrapping or hoarding them. If low quantity I can do shipping myself, and so handle international shipping as well.

What is nice is that payment used to be a pain, but these days we have sold several things (like the ASR33 boards listed on the A&A site) directly with shipping to US, but paid by transfer to IBAN which was complete within hours. So I think it is sane to sell some things.

What I need to come up with is a site / forum to list what shit I have to sell.

The latest, as a good example, is some illuminated coasters. The idea came from making coasters for my Son's wedding, but he has used them in videos on the tok of tik, and people actually asked if they can buy. So I have 10 prototypes. One is staying under my glass here. It may be that when he posts some stuff on these they do sell, he may sell, even. But for now I have 9 more here.

The board, as you can see, if pretty neat, and has 124 LEDs, which could be used for compass type stuff even. Arranged as 4+8+16-32+64 LEDs in rings (yes, the code to make that in KiCAD was fun).

With two spacer boards, and a diffuser, you get a coaster. Of course it runs any ESP32 software like WLED, or ESPHome, etc. It has a microphone even (for sound based effects).

It is cool! I am really amazed with the overall solid disk construction. I'm adding some feet on the base tomorrow.

Now, I think we can sell for £30+postage. Obviously if we made 100s of these it would be somewhat cheaper, except once we list on Amazon and they take a cut.

But for now, I have a few, and it is just an example of some of the stuff I have.

So I am pondering a web site and maybe just an email address, but any other suggestions for how to list these things - low quantity, ad hoc, sales of things?

Suggestions welcome.

And just to be clear - if I can sell stuff (that works) even if around cost, I'll be more happy to keep making these things :-)

Update: Trying Tindie

2025-01-01

Zen and the Art of Hot Tub Maintenance

I have posted about the hot tub before, but this is a bit of an update on latest experiences.

As I have said before, the hot tub will typically go some months with no problems. I have some combined chlorine and other stuff tablets in a floater (not that sort of floater). Another invaluable tool I keep by the tub is a wet/dry vacuum in case bits of leaf and so on end up in the bottom of the tub. I also now have a tap properly plumbed in to allow me to put water in from above. All very slick.

The way it used to work is after a few months it would get a bit cloudy. Clarifier helps, and obviously good to change the filter. The filters are not expensive, especially compared to the cost of power, so I am lazy and change for a new filter rather than the time consuming and messy process of trying to clean a filter.

Now comes the odd bit, since the change to heat pump and the extra insulation it has changed. It no longer gets cloudy, even after many many months. But it does degrade, it seems.

Basically it gets to a point that the chlorine levels do not stay, even with loads of fast acting chlorine tablets to shock it, it then has no chlorine showing. The floating tablets no longer seem to maintain a sensible level. The other very subtle effect is the tint of the water is more green than blue. The tablets have algicide but still, but clearly there is a change.

What really made me take action, eventually, was that it was starting to cause skin irritation!

So, with shocking operation not helping, the answer is simpler, empty and refill. This is a lot quicker now I have the heat pump. The vacuum is great for ensuring fully empty and all the pipes sucked out as well. The new plumbed in pipe/tap makes filling easy as well.

So, it seems there is a change, and I cannot see why the heat pump makes a difference, but still needs a refresh every few months.

And now it is very pleasant, and blue tinted, once again.

Bluetooth (BLE)

I have been working on some more educational R&D for the last week or so - exploring the possibilities with Bluetooth, specifically BLE....