WEBVTT
Kind: captions
Language: en

00:00:00.630 --> 00:00:20.800 align:start position:19%
[Music]
[Applause]

00:00:06.990 --> 00:00:25.359 align:start position:19%
[Music]
a friend of mine mentioned that she

00:00:22.320 --> 00:00:29.439 align:start position:19%
sometimes wears suntan lotion indoors
which i surprising i would have thought

00:00:27.359 --> 00:00:34.239 align:start position:19%
that ordinary glass windows attenuate or
reflect most of the uv but apparently

00:00:32.079 --> 00:00:37.920 align:start position:19%
under some conditions enough light can
come through to damage your skin

00:00:36.559 --> 00:00:40.879 align:start position:19%
now there's no harm in wearing suntan
lotion when you don't need to but since

00:00:39.600 --> 00:00:44.559 align:start position:19%
my friend's birthday was just around the
corner i thought it'd be funny to get

00:00:42.480 --> 00:00:47.680 align:start position:19%
her a uv meter
unfortunately it turns out that uv

00:00:46.079 --> 00:00:51.760 align:start position:19%
meters are actually quite expensive at
least more than what i'd normally drop

00:00:49.200 --> 00:00:54.879 align:start position:19%
on a gag birthday gift anyway so instead
i thought i'd do my usual thing and

00:00:53.039 --> 00:00:58.719 align:start position:19%
build a trinket or a bit of jewelry on
the lathe

00:00:56.559 --> 00:01:02.800 align:start position:19%
but i was wondering why are those uv
meters so expensive

00:01:00.559 --> 00:01:08.240 align:start position:19%
the component itself that detects uv is
just a glorified led right it's a uv

00:01:06.000 --> 00:01:13.119 align:start position:19%
photodiode and yes it turns out you can
buy a uv photodiode for not very much

00:01:10.840 --> 00:01:17.680 align:start position:19%
money this is when i had the idea to
build an amulet

00:01:15.119 --> 00:01:22.880 align:start position:19%
amulet is a magical device that bestows
protection on the wearer but i could

00:01:19.920 --> 00:01:27.280 align:start position:19%
build an amulet that really does glow or
light up when it detects uv

00:01:25.200 --> 00:01:31.200 align:start position:19%
and as soon as i had the idea i thought
i've got to make it happen

00:01:29.360 --> 00:01:35.759 align:start position:19%
so the very first thing i did was choose
and order a sensor

00:01:33.119 --> 00:01:41.200 align:start position:19%
you can get just bare uv photodiodes but
instead i went for this part the

00:01:38.280 --> 00:01:44.799 align:start position:19%
veml6075 which is an integrated sensor
with an i squared c interface

00:01:43.119 --> 00:01:50.240 align:start position:19%
i was drawn to this one because it has
separate channels for uva and uvb

00:01:48.560 --> 00:01:54.079 align:start position:19%
in the end i totally regret choosing
this part for reasons that will become

00:01:51.600 --> 00:01:58.000 align:start position:19%
apparent later but for now this thing
looked perfect for the job it's

00:01:55.920 --> 00:02:02.159 align:start position:19%
available on these cute little breakout
boards as well which is useful for

00:01:59.759 --> 00:02:06.640 align:start position:19%
testing but for the actual thing it's a
service mount part so we will need to

00:02:04.320 --> 00:02:09.920 align:start position:19%
mount it on a pcb and that sets the
timeline for the entire project really

00:02:08.080 --> 00:02:13.040 align:start position:19%
if we have to design an order of pcb
then we have to do that right now or

00:02:11.760 --> 00:02:15.760 align:start position:19%
we'll have no chance of meeting our
deadline

00:02:14.000 --> 00:02:24.580 align:start position:19%
but that's boring so let's do some metal
work

00:02:17.920 --> 00:02:24.580 align:start position:19%
[Music]

00:02:27.660 --> 00:02:35.919 align:start position:19%
[Music]

00:02:39.920 --> 00:02:44.720 align:start position:19%
the only fixed dimension in this whole
project is going to be the size of the

00:02:43.599 --> 00:02:48.800 align:start position:19%
battery
in the past i've made the mistake of

00:02:46.160 --> 00:02:54.080 align:start position:19%
using very small obscure batteries that
are hard to replace so this time i

00:02:50.800 --> 00:02:57.360 align:start position:19%
definitely wanted to use a cr2032
they're super popular and most people

00:02:55.840 --> 00:03:03.360 align:start position:19%
already have them
2032 means that it's 20 millimeters in

00:02:59.840 --> 00:03:06.959 align:start position:19%
diameter and 3.2 millimeters thick
the plan is to hollow out this bit of

00:03:05.440 --> 00:03:11.680 align:start position:19%
brass to make enough room for the
battery and a circular pcb that will sit

00:03:10.080 --> 00:03:16.400 align:start position:19%
on top of it
let's assume the pcb will be 21

00:03:14.159 --> 00:03:19.840 align:start position:19%
millimeters diameter just to give some
wiggle room for the battery

00:03:25.680 --> 00:03:31.360 align:start position:19%
this is free machining brass and as you
can see using a blunt carbide insert

00:03:29.840 --> 00:03:37.629 align:start position:19%
with the wrong geometry causes no
problems at all

00:03:33.860 --> 00:03:37.629 align:start position:19%
[Music]

00:03:38.080 --> 00:03:43.519 align:start position:19%
i don't have any proper tools for
measuring inside diameters so the best

00:03:41.440 --> 00:03:46.879 align:start position:19%
way to get this accurate is to improvise
a plug gauge

00:03:45.040 --> 00:03:50.640 align:start position:19%
i turned a smooth diameter onto the end
of this scrap steel before i started and

00:03:49.200 --> 00:04:00.639 align:start position:19%
we look for the moment where we can just
barely fit it inside

00:03:53.770 --> 00:04:00.639 align:start position:19%
[Music]

00:04:04.720 --> 00:04:11.300 align:start position:19%
we only need to do this once because
from here we can reach all our other

00:04:08.000 --> 00:04:14.429 align:start position:19%
dimensions using the dro
[Applause]

00:04:37.840 --> 00:04:44.160 align:start position:19%
i want an internal shoulder to support
the pcb and a flange at the front can

00:04:42.240 --> 00:04:47.280 align:start position:19%
have an opening for the sensor the
controls on the display

00:04:46.160 --> 00:04:50.400 align:start position:19%
if you think it's hard to see what's
going on then remember that the camera

00:04:49.040 --> 00:04:54.800 align:start position:19%
has a much better view of the action
than i do i'm basically blind at this

00:04:52.880 --> 00:04:57.840 align:start position:19%
point going entirely off the numbers on
the dro

00:04:58.370 --> 00:05:01.529 align:start position:19%
[Music]

00:05:07.590 --> 00:05:10.700 align:start position:19%
[Music]

00:05:28.720 --> 00:05:35.840 align:start position:19%
the pcb the battery and a spring between
them will have a depth which i've

00:05:33.280 --> 00:05:40.240 align:start position:19%
carefully calculated so the last part to
think about is the battery cover

00:05:38.400 --> 00:05:45.389 align:start position:19%
let's blue it with a sharpie and then
it's time to thread

00:05:42.070 --> 00:05:45.389 align:start position:19%
[Applause]

00:05:47.759 --> 00:05:54.960 align:start position:19%
a lot of people are surprised i can make
fine precision threads on a machine as

00:05:52.320 --> 00:05:58.000 align:start position:19%
big as this colchester lathe here's a
lathe along with a human figure for

00:05:56.800 --> 00:06:02.400 align:start position:19%
scale
the fact is i find it much easier to use

00:06:00.400 --> 00:06:05.120 align:start position:19%
this big machine than my little lathe at
home

00:06:03.280 --> 00:06:09.600 align:start position:19%
first of all the colchester has a proper
gearbox so setting the thread pitch is

00:06:07.199 --> 00:06:14.319 align:start position:19%
as easy as pulling a few levers
secondly the vfd and the camlock check

00:06:12.560 --> 00:06:16.960 align:start position:19%
mean we can run the lathe backwards
without worrying about the chuck

00:06:15.520 --> 00:06:20.720 align:start position:19%
unscrewing from the headstock and
causing a disaster

00:06:18.880 --> 00:06:23.919 align:start position:19%
that means we can engage the half nut
and leave it there for the entire

00:06:22.000 --> 00:06:26.960 align:start position:19%
session running the lathe backwards and
forwards and never having to worry about

00:06:25.680 --> 00:06:32.360 align:start position:19%
thread timing
it also means we can cut the threads in

00:06:29.360 --> 00:06:32.360 align:start position:19%
reverse

00:06:46.960 --> 00:06:53.520 align:start position:19%
i sometimes give metal working lessons
and these are a couple of demonstration

00:06:50.880 --> 00:06:57.280 align:start position:19%
pieces i've made
and these were made using a tool like

00:06:55.840 --> 00:07:01.199 align:start position:19%
this
this is an internal threading tool

00:06:59.919 --> 00:07:05.360 align:start position:19%
hand ground
and this is used to make the internal

00:07:03.599 --> 00:07:09.280 align:start position:19%
threads in the conventional way but also
to make the external threads by going

00:07:07.599 --> 00:07:13.599 align:start position:19%
behind the part
and running the lathe backwards

00:07:12.000 --> 00:07:16.400 align:start position:19%
whenever you do something unconventional
like this it's always a good idea to

00:07:15.440 --> 00:07:19.440 align:start position:19%
stop and think
are we going to cut a left-handed thread

00:07:18.000 --> 00:07:22.319 align:start position:19%
by accident
but so long as we haven't touched the

00:07:20.479 --> 00:07:25.280 align:start position:19%
gearbox the handedness shouldn't have
changed

00:07:23.759 --> 00:07:30.160 align:start position:19%
another thing that can catch us out is
that by repeatedly changing direction

00:07:28.160 --> 00:07:33.199 align:start position:19%
we now have to worry about backlash in
the gearbox

00:07:31.440 --> 00:07:37.199 align:start position:19%
so what i normally do is i pull the tool
out too far

00:07:34.479 --> 00:07:41.360 align:start position:19%
uh run behind and then run forwards into
position

00:07:39.120 --> 00:07:46.240 align:start position:19%
um on this part there's we've got an
undercut so you could actually just sit

00:07:43.680 --> 00:07:50.560 align:start position:19%
in the groove start cutting and the tool
will rest there until the backlash is

00:07:47.599 --> 00:07:55.199 align:start position:19%
taken up and it starts cutting
but for today's project we are threading

00:07:53.120 --> 00:07:59.199 align:start position:19%
right up to the shoulder so an undercut
is not

00:07:56.840 --> 00:08:02.639 align:start position:19%
acceptable i found these fine pitch
thread chasers in the tool room and i've

00:08:01.360 --> 00:08:04.879 align:start position:19%
always been confused about what these
are for

00:08:03.680 --> 00:08:09.039 align:start position:19%
i've only ever encountered thread
chasers in the context of a wood lathe

00:08:07.120 --> 00:08:13.120 align:start position:19%
but with a 0.5 millimeter pitch these
are obviously not for wood

00:08:11.360 --> 00:08:16.560 align:start position:19%
it might be significant that someone's
ground a negative rake into one of them

00:08:15.120 --> 00:08:20.879 align:start position:19%
that does suggest they are for cleaning
up threads rather than cutting them

00:08:19.039 --> 00:08:25.599 align:start position:19%
but given how easily this brass machines
i don't see why we can't just set this

00:08:22.560 --> 00:08:29.599 align:start position:19%
slightly above center and use it to cut
for threading up to a shoulder you could

00:08:27.440 --> 00:08:33.039 align:start position:19%
not ask for better than that
it's a shame the internal tool seems to

00:08:31.199 --> 00:08:37.200 align:start position:19%
be damaged on the end so we can't use it
in reverse like i was talking about

00:08:35.360 --> 00:08:42.399 align:start position:19%
if these were my own tools i would just
touch the end off with a grinder but

00:08:38.880 --> 00:08:42.399 align:start position:19%
they're not so i shot

00:08:43.680 --> 00:08:49.440 align:start position:19%
it's even more important than normal to
get the tool lined up perpendicular

00:08:48.000 --> 00:08:54.440 align:start position:19%
i'm just eyeballing it with a straight
edge but i'm eyeballing it carefully

00:09:05.600 --> 00:09:09.480 align:start position:19%
oh
god

00:09:15.680 --> 00:09:18.920 align:start position:19%
we're okay

00:09:34.640 --> 00:09:37.839 align:start position:19%
rinse and repeat

00:09:52.080 --> 00:09:55.080 align:start position:19%
wow

00:10:03.920 --> 00:10:11.399 align:start position:19%
[Music]
let's shave the outside down as thin as

00:10:08.240 --> 00:10:11.399 align:start position:19%
we dare

00:10:28.640 --> 00:10:31.760 align:start position:19%
[Music]

00:10:43.830 --> 00:10:51.279 align:start position:19%
[Music]
before we part this off let's take a

00:10:48.399 --> 00:10:54.480 align:start position:19%
moment a long moment to polish the
outside

00:10:52.480 --> 00:11:00.640 align:start position:19%
i've obviously covered the bed to keep
the abrasive dust away then we work our

00:10:56.720 --> 00:11:06.079 align:start position:19%
way through the grits from 400 600 800
right up to 2000 and then we switch to

00:11:03.279 --> 00:11:10.560 align:start position:19%
the brasso polishing compound which has
an effective grip of about 10 000 though

00:11:08.720 --> 00:11:13.959 align:start position:19%
it may also have some chemical polishing
action too

00:11:16.800 --> 00:11:22.959 align:start position:19%
i keep applying it and wiping it off
with tissue paper and then all of a

00:11:20.880 --> 00:11:42.479 align:start position:19%
sudden mirror finish
almost

00:11:24.210 --> 00:11:42.479 align:start position:19%
[Applause]

00:11:42.880 --> 00:11:48.560 align:start position:19%
we're parting into a ball so this won't
take long

00:11:46.320 --> 00:11:51.560 align:start position:19%
i put my hand underneath ready to catch
it

00:11:53.800 --> 00:11:58.040 align:start position:19%
[Applause]

00:11:58.160 --> 00:12:03.360 align:start position:19%
any second now
ready to catch it

00:12:08.240 --> 00:12:12.480 align:start position:19%
about to part off
any second now

00:12:15.839 --> 00:12:22.440 align:start position:19%
ready to catch it
any second now

00:12:24.000 --> 00:12:26.399 align:start position:19%
damn it

00:12:28.600 --> 00:12:33.090 align:start position:19%
[Music]
okay

00:12:31.040 --> 00:12:38.769 align:start position:19%
time for the mail thread
[Music]

00:12:45.620 --> 00:12:54.360 align:start position:19%
[Music]

00:12:58.480 --> 00:13:05.440 align:start position:19%
you know 0.5 millimeters is the same
thread pitch used on most watch banks

00:13:03.920 --> 00:13:08.639 align:start position:19%
it is kind of like a watch what we're
making here you know

00:13:07.440 --> 00:13:12.320 align:start position:19%
it's round
it's threaded

00:13:10.320 --> 00:13:15.320 align:start position:19%
it has a battery
whatever

00:13:35.680 --> 00:13:38.680 align:start position:19%
so

00:13:57.519 --> 00:14:00.519 align:start position:19%
uh

00:14:08.390 --> 00:14:11.510 align:start position:19%
[Music]

00:14:16.000 --> 00:14:19.000 align:start position:19%
um

00:14:40.800 --> 00:14:45.800 align:start position:19%
fine we'll give it a tiny undercut

00:15:11.839 --> 00:15:14.240 align:start position:19%
perfect

00:15:14.430 --> 00:15:17.870 align:start position:19%
[Applause]

00:15:20.720 --> 00:15:27.000 align:start position:19%
let's take this opportunity to clean up
the front face of the other part

00:15:42.320 --> 00:15:48.240 align:start position:19%
if we just parted this off we'd get a
working battery cover the original plan

00:15:46.560 --> 00:15:52.000 align:start position:19%
was to simply make the threaded portion
shorter to give more space for the

00:15:49.680 --> 00:15:56.399 align:start position:19%
battery but now i'm thinking it might be
possible to have a recessed section that

00:15:54.480 --> 00:16:00.000 align:start position:19%
keeps the battery centered
if i thought of this sooner i'd have

00:15:58.000 --> 00:16:05.000 align:start position:19%
given myself more room for it but as it
is we're working with very tight

00:16:02.000 --> 00:16:05.000 align:start position:19%
tolerances

00:16:19.170 --> 00:16:22.340 align:start position:19%
[Applause]

00:16:27.199 --> 00:16:30.199 align:start position:19%
so

00:16:45.600 --> 00:16:51.600 align:start position:19%
oh before i forget now is the best time
to scratch a polarity marking onto the

00:16:50.320 --> 00:16:55.519 align:start position:19%
battery cover
i've mounted a single point threading

00:16:53.199 --> 00:16:58.399 align:start position:19%
tool sideways in the tool rest and we'll
just scratch a plus sign using the hand

00:16:57.279 --> 00:17:02.160 align:start position:19%
wheels
in hindsight through the macro lens it's

00:17:00.800 --> 00:17:06.559 align:start position:19%
easy to see how i could have done this
better but with the naked eye especially

00:17:04.720 --> 00:17:10.360 align:start position:19%
with the camera in the way it's really
hard to see what you're doing

00:17:22.030 --> 00:17:25.150 align:start position:19%
[Music]

00:17:37.280 --> 00:17:42.400 align:start position:19%
naturally this parting tool wasn't long
enough to go all the way through and

00:17:40.880 --> 00:17:46.559 align:start position:19%
mounting a bigger one is more effort
than just grabbing a hacksaw

00:17:44.480 --> 00:17:49.760 align:start position:19%
we need to clean this face up anyway
and i'm also wondering if we need to add

00:17:48.000 --> 00:17:55.400 align:start position:19%
a slot so that you can use a coin to
open it if it gets stuck

00:17:51.840 --> 00:17:55.400 align:start position:19%
we'll see how it goes

00:18:20.550 --> 00:18:24.450 align:start position:19%
[Applause]

00:18:30.890 --> 00:18:40.599 align:start position:19%
[Applause]

00:18:41.630 --> 00:18:44.729 align:start position:19%
[Music]

00:18:46.140 --> 00:19:04.529 align:start position:19%
[Applause]

00:19:14.220 --> 00:19:17.450 align:start position:19%
[Applause]

00:19:19.520 --> 00:19:27.039 align:start position:19%
we're nearly there just one more part to
make the attachment point or hoop

00:19:25.120 --> 00:19:30.400 align:start position:19%
number of ways you can go about this but
i like to make a little ball and drill a

00:19:28.960 --> 00:19:34.799 align:start position:19%
hole through it
in the absence of a ball turner or form

00:19:32.720 --> 00:19:39.280 align:start position:19%
tool the best way to make a little ball
is with your eyeballs

00:19:36.799 --> 00:19:42.440 align:start position:19%
and a needle file or a graver if you've
got one

00:19:56.810 --> 00:20:00.000 align:start position:19%
[Applause]

00:20:02.640 --> 00:20:09.280 align:start position:19%
polish it up and
before we part it off let's take this

00:20:06.320 --> 00:20:09.280 align:start position:19%
over to the milling machine

00:20:14.080 --> 00:20:22.400 align:start position:19%
er 32 collet in a square holder which
makes it very easy to get things

00:20:19.840 --> 00:20:25.919 align:start position:19%
the end mill is also held in an er-32
collet which means we have to have a

00:20:23.919 --> 00:20:31.919 align:start position:19%
whole load of stick out you can see the
part deflecting as i plunge

00:20:28.559 --> 00:20:31.919 align:start position:19%
not enough to cause problems though

00:20:32.320 --> 00:20:37.400 align:start position:19%
one day we'll invest in a smaller collet
system

00:20:54.400 --> 00:21:00.209 align:start position:19%
okay
[Applause]

00:21:05.050 --> 00:21:08.130 align:start position:19%
[Music]

00:21:09.760 --> 00:21:15.440 align:start position:19%
when i said about turning the wall
thickness as thin as we dare you may

00:21:13.600 --> 00:21:20.240 align:start position:19%
have thought i was being a bit cowardly
leaving it almost a millimeter thick but

00:21:18.159 --> 00:21:23.120 align:start position:19%
that's because i knew we'd need enough
meat left on it for mounting the

00:21:21.520 --> 00:21:28.000 align:start position:19%
attachment point
we want a divot a dimple a depression a

00:21:26.640 --> 00:21:31.840 align:start position:19%
flat spot
and i've got just the ticket

00:21:42.080 --> 00:21:47.360 align:start position:19%
i'm going to soft solder these two
pieces together

00:21:45.200 --> 00:21:52.080 align:start position:19%
mainly because i'm lazy
the hard solder or silver solder the

00:21:49.600 --> 00:21:55.200 align:start position:19%
higher temperatures discolor and oxidize
the metal which means more work cleaning

00:21:54.000 --> 00:22:01.159 align:start position:19%
it up
regular leaded solder will easily be

00:21:57.440 --> 00:22:01.159 align:start position:19%
strong enough for this application

00:22:38.400 --> 00:22:44.320 align:start position:19%
i'm normally pretty good at this but
what with looking through the viewfinder

00:22:42.320 --> 00:22:48.720 align:start position:19%
and trying not to point the blowtorch at
my expensive camera equipment i did a

00:22:46.480 --> 00:22:52.880 align:start position:19%
pretty sloppy job this time
the solder should only flow to where

00:22:50.480 --> 00:22:56.480 align:start position:19%
you've put flux but i happen to be using
flux coated solder wire so in fact it'll

00:22:55.280 --> 00:22:59.480 align:start position:19%
stick to anywhere that's up to
temperature

00:23:10.000 --> 00:23:16.240 align:start position:19%
still so long as we get a nice fillet
around the join we're still good and

00:23:14.640 --> 00:23:20.600 align:start position:19%
since it's soft solder we can scrape
away the excess pretty easily afterwards

00:23:46.640 --> 00:23:52.720 align:start position:19%
finally let's add a brass ring just so
that whatever chain we hang it from

00:23:50.320 --> 00:23:56.840 align:start position:19%
keeps the amulet facing forwards
classic bit of wire bending

00:24:36.960 --> 00:24:42.400 align:start position:19%
i'd like to think that there are a few
jewelers watching and cringing so hard

00:24:40.720 --> 00:24:47.039 align:start position:19%
that their teeth melt
you know what they say jack of all

00:24:43.840 --> 00:24:50.960 align:start position:19%
trades master of none speaking of which
it's about time we did some electronics

00:24:52.240 --> 00:24:57.440 align:start position:19%
it's only as i came to design the
circuit i realized we could have made

00:24:55.279 --> 00:25:01.120 align:start position:19%
the whole thing solar-powered don't get
used in direct sunlight so we wouldn't

00:24:59.600 --> 00:25:05.279 align:start position:19%
have needed a battery
oh well it's too late now we've made a

00:25:02.799 --> 00:25:09.440 align:start position:19%
battery holder so we're going to use it
the things we need to decide are

00:25:07.679 --> 00:25:14.480 align:start position:19%
how to display the reading
leds a graph or whatever

00:25:12.480 --> 00:25:19.760 align:start position:19%
what processor to use
what switch to use or how to turn it on

00:25:17.120 --> 00:25:25.760 align:start position:19%
and off let's call that interface
and lastly what visual design to give it

00:25:23.919 --> 00:25:30.400 align:start position:19%
for the display i did think about trying
to use an analog needle but basically

00:25:28.400 --> 00:25:34.960 align:start position:19%
it's got to be leds of some kind
on the one hand i wanted to have that

00:25:32.159 --> 00:25:39.520 align:start position:19%
tolkienesque feeling of a magical sword
that lights up when danger is near

00:25:37.440 --> 00:25:44.320 align:start position:19%
on the other hand i want it to be
scientific and useful able to quantify

00:25:42.320 --> 00:25:48.799 align:start position:19%
differences in light levels
so a bar graph or really it needs to be

00:25:46.400 --> 00:25:52.240 align:start position:19%
two bar graphs one for uva and one for
uvb

00:25:50.159 --> 00:25:56.320 align:start position:19%
or even three if we're to display uv
index that's the weighted average that

00:25:54.640 --> 00:26:00.159 align:start position:19%
tells you if you ultimately need to wear
sunscreen

00:25:58.000 --> 00:26:04.559 align:start position:19%
eventually i decided to go with one bar
graph and multiple display modes that

00:26:03.039 --> 00:26:08.000 align:start position:19%
are cycled through when you operate the
switch

00:26:05.919 --> 00:26:10.960 align:start position:19%
for the processor pretty much any 80
tiny chip will do

00:26:09.600 --> 00:26:15.360 align:start position:19%
all it's got to do is read some data
from the sensor and display on some leds

00:26:13.840 --> 00:26:20.640 align:start position:19%
it'd be nice if it had i squared c
master but i squared c is easy enough to

00:26:17.360 --> 00:26:27.440 align:start position:19%
bit bang that it doesn't really matter
for the charlie start project i used

00:26:23.279 --> 00:26:31.520 align:start position:19%
an 80 tiny 9 this is a 23 package
and to be honest these chips are rubbish

00:26:29.760 --> 00:26:34.960 align:start position:19%
they're underpowered they're difficult
to load your code onto

00:26:33.200 --> 00:26:38.880 align:start position:19%
and in the scheme of things they're not
even that small

00:26:37.200 --> 00:26:42.640 align:start position:19%
quite a few of the better 80 tiny chips
are now available in

00:26:40.799 --> 00:26:46.480 align:start position:19%
vqfn format
this is like a miniature version of qfn

00:26:44.480 --> 00:26:51.760 align:start position:19%
this is a three millimeter square chip
with 20 pins at 0.4 millimeter pitch

00:26:50.880 --> 00:26:56.320 align:start position:19%
and
i like these chips a lot um

00:26:55.200 --> 00:27:00.320 align:start position:19%
it's about as small as you could hope
for it's basically the same footprint as

00:26:57.919 --> 00:27:03.840 align:start position:19%
the sock 23 but it's still reasonably
easy to solder unlike the ball grid

00:27:02.400 --> 00:27:07.760 align:start position:19%
array packages
you can visually inspect if it's

00:27:05.200 --> 00:27:10.720 align:start position:19%
soldered correctly
you can get the 80 tiny 85 in this

00:27:09.600 --> 00:27:14.400 align:start position:19%
package
but it's kind of pointless because with

00:27:12.400 --> 00:27:18.080 align:start position:19%
only eight pins the rest are just not
connected

00:27:15.679 --> 00:27:22.080 align:start position:19%
so instead i went for the 80 tiny 84
which is basically the same but with a

00:27:19.679 --> 00:27:27.919 align:start position:19%
few more i o pins
and of course for prototyping it is

00:27:24.080 --> 00:27:27.919 align:start position:19%
available in a dip package

00:27:28.399 --> 00:27:35.440 align:start position:19%
after a lot of thinking and searching i
was unable to come up with a physical

00:27:32.960 --> 00:27:40.720 align:start position:19%
switch which i felt was satisfying which
led me to thinking about capsense

00:27:37.840 --> 00:27:44.080 align:start position:19%
i normally hate capacitive sensing but
in this case there is an appeal to

00:27:42.640 --> 00:27:47.120 align:start position:19%
having it magically respond when you
touch it

00:27:45.360 --> 00:27:50.960 align:start position:19%
the problem is that actively sensing
means it's always draining battery power

00:27:49.039 --> 00:27:56.720 align:start position:19%
even when it's turned off
you can fake capsense by having exposed

00:27:54.080 --> 00:28:00.000 align:start position:19%
traces on a pcb which a human finger
will short together

00:27:58.159 --> 00:28:05.120 align:start position:19%
just have one of them with a very weak
pull up maybe 10 mega ohms and the

00:28:02.480 --> 00:28:08.480 align:start position:19%
finger will short it to ground
this will have almost no standby power

00:28:07.279 --> 00:28:13.200 align:start position:19%
usage
but doing it this way is notoriously

00:28:11.120 --> 00:28:17.120 align:start position:19%
unreliable even if the traces are gold
plated they will get dirty and the

00:28:15.360 --> 00:28:23.200 align:start position:19%
resistance will change
it also depends on humidity and how

00:28:20.559 --> 00:28:28.640 align:start position:19%
dirty or moist the finger is
and there's the additional worry of

00:28:24.880 --> 00:28:34.640 align:start position:19%
electrostatic discharge damaging it
using atmel's q-touch library is

00:28:32.000 --> 00:28:39.279 align:start position:19%
completely off the cards it's way too
power hungry despite all of their claims

00:28:37.200 --> 00:28:43.840 align:start position:19%
of low power if you pull out all the
stops the best you can hope for is about

00:28:42.080 --> 00:28:48.320 align:start position:19%
100 microamps
even if you didn't use the amoled at all

00:28:46.080 --> 00:28:52.320 align:start position:19%
that would still drain a full battery in
about three months

00:28:49.679 --> 00:28:56.240 align:start position:19%
which is unacceptable
this app note actually concedes if you

00:28:54.480 --> 00:29:01.960 align:start position:19%
want really low power
use a dedicated capsense chip

00:28:59.039 --> 00:29:05.440 align:start position:19%
here is a dedicated capsense chip a
ttp223

00:29:03.520 --> 00:29:09.600 align:start position:19%
it claims to use as little as 1.5
microamps although in my measurements it

00:29:07.520 --> 00:29:14.559 align:start position:19%
was more like five or six
even so that will last for years in

00:29:11.760 --> 00:29:17.520 align:start position:19%
standby so i think we're okay
let's jump straight to the finished

00:29:15.919 --> 00:29:21.520 align:start position:19%
circuit since i'm probably boring
everyone to death

00:29:19.039 --> 00:29:25.760 align:start position:19%
there's a 4x3 led matrix with two groups
of four being the bar graph

00:29:23.600 --> 00:29:31.520 align:start position:19%
the capsense chip has to be tied to int
zero that's on pb2 so it can wake the

00:29:28.640 --> 00:29:35.520 align:start position:19%
processor from the deepest sleep state
there are no pull ups on the i squared c

00:29:33.279 --> 00:29:38.399 align:start position:19%
lines the bus is so short that we won't
need them

00:29:36.799 --> 00:29:42.320 align:start position:19%
and had not yet investigated how good
the sleep mode on the sensor itself is

00:29:40.720 --> 00:29:46.720 align:start position:19%
but we can guarantee it won't use any
power in sleep mode by cutting the power

00:29:44.080 --> 00:29:51.440 align:start position:19%
to it entirely it's powered from a gpio
pin on the at tiny

00:29:48.799 --> 00:29:55.200 align:start position:19%
this row of test pads is for programming
i'm not even making a jig i'm just going

00:29:53.120 --> 00:29:59.200 align:start position:19%
to solder to it load up the code then
unsolder it

00:29:57.279 --> 00:30:02.960 align:start position:19%
i built the circuit on a breadboard and
rather unhelpfully that breakout board

00:30:01.039 --> 00:30:07.600 align:start position:19%
for the uv sensor has a bunch of other
stuff on it a regulator and pull up

00:30:05.200 --> 00:30:11.039 align:start position:19%
resistors and level shifters so i made
my own breakout soldering directly to

00:30:09.360 --> 00:30:15.919 align:start position:19%
one of the sensors it's only two
millimeters long but it's only four pins

00:30:13.440 --> 00:30:19.360 align:start position:19%
and i do enjoy a good bit of micro
soldering

00:30:17.760 --> 00:30:23.520 align:start position:19%
we'll use the breadboard circuit to
write our code while we wait for the pcb

00:30:21.360 --> 00:30:28.480 align:start position:19%
to arrive but before we can order the
pcb we need to make our mind up about

00:30:26.080 --> 00:30:32.080 align:start position:19%
the visual design
if ever there was a time for a polar

00:30:30.080 --> 00:30:35.279 align:start position:19%
coordinate track rooting plug-in it
would be now

00:30:33.200 --> 00:30:38.320 align:start position:19%
sadly there's no such thing in fact
kaikad's polar coordinate system is

00:30:36.960 --> 00:30:41.440 align:start position:19%
pretty lacking
the components were positioned with a

00:30:39.840 --> 00:30:45.120 align:start position:19%
for loop in javascript where i just
typed in the coordinates and the tracks

00:30:43.440 --> 00:30:48.960 align:start position:19%
were rooted freehand
as you can see i've made the capsense

00:30:46.799 --> 00:30:53.440 align:start position:19%
pad as big as possible got to be careful
not to root tracks underneath it we also

00:30:51.360 --> 00:30:56.960 align:start position:19%
don't want a full ground plane behind it
just a little bit of ground

00:30:55.200 --> 00:31:01.039 align:start position:19%
the capacitor at the bottom is for
sensitivity adjustment i'll probably

00:30:59.120 --> 00:31:04.840 align:start position:19%
leave that unpopulated but best i have
the footprint just in case

00:31:05.279 --> 00:31:10.640 align:start position:19%
the capsense chip is the sot-23 part
making it the biggest component on the

00:31:09.360 --> 00:31:16.320 align:start position:19%
board
the uv sensor is at the top represented

00:31:12.880 --> 00:31:20.640 align:start position:19%
by this grey cuboid
all the leds are o603 the ones on the

00:31:18.880 --> 00:31:24.080 align:start position:19%
right of the bar graph and on the left
are the mode indicators

00:31:29.039 --> 00:31:34.399 align:start position:19%
the scale for uv index really does go up
to 11.

00:31:34.720 --> 00:31:39.919 align:start position:19%
i did make a quick 3d model of the case
just to give an idea of how this is

00:31:37.840 --> 00:31:43.919 align:start position:19%
going together it's added as a virtual
component the idea is that it will

00:31:41.919 --> 00:31:47.679 align:start position:19%
surface mount onto the ring around the
edge of the pcb

00:31:45.679 --> 00:31:50.880 align:start position:19%
this will both mechanically secure the
board into the case

00:31:49.279 --> 00:31:53.279 align:start position:19%
and provide the other contact for the
battery

00:31:54.320 --> 00:32:01.440 align:start position:19%
the plated holes at the side are to help
me with the soldering process since i

00:31:59.360 --> 00:32:04.960 align:start position:19%
don't expect it to be an easy one
so there's this conspicuous space in the

00:32:03.200 --> 00:32:09.120 align:start position:19%
middle the colors aren't accurate it's
going to be all black and that's where

00:32:06.799 --> 00:32:13.600 align:start position:19%
our logo or symbol is going to go
something you tap to get the amulet to

00:32:10.880 --> 00:32:16.640 align:start position:19%
spring to life and i spent so much time
trying to think of the right symbol to

00:32:14.960 --> 00:32:20.720 align:start position:19%
use
my first idea was a pentagram because

00:32:18.960 --> 00:32:25.039 align:start position:19%
that originally was a symbol of
protection you often see it on amulets

00:32:22.880 --> 00:32:28.960 align:start position:19%
but i got worried when someone suggested
it's associated with satanism i really

00:32:27.760 --> 00:32:31.840 align:start position:19%
don't want to go to all this effort of
making an amulet and then the recipient

00:32:30.480 --> 00:32:35.679 align:start position:19%
doesn't want to wear it because of
satanic associations

00:32:34.000 --> 00:32:40.559 align:start position:19%
so i looked at other symbols of the sun
and of protection and nearly everything

00:32:38.399 --> 00:32:44.880 align:start position:19%
suitable has been co-opted as a symbol
of white supremacy about half of these

00:32:42.720 --> 00:32:49.600 align:start position:19%
symbols looked like swastikas the
swastika itself was originally a symbol

00:32:47.679 --> 00:32:54.399 align:start position:19%
of good luck and then
the nazis went and ruined everything

00:32:52.640 --> 00:32:59.440 align:start position:19%
we could potentially use the eye of
horus an ancient protection symbol used

00:32:56.960 --> 00:33:03.360 align:start position:19%
on amulets or the eye of ra represents
the sun but aesthetically i wasn't

00:33:02.000 --> 00:33:07.600 align:start position:19%
pleased with how these looked on the
amulet especially in white on black they

00:33:05.760 --> 00:33:10.559 align:start position:19%
just didn't have they didn't seem to fit
into the radial symmetry of the rest of

00:33:09.360 --> 00:33:16.000 align:start position:19%
it
and it eventually generate some gerbers

00:33:13.039 --> 00:33:19.200 align:start position:19%
with this cartoon sun with uv written on
it and

00:33:16.960 --> 00:33:23.679 align:start position:19%
while it's completely inoffensive it's
also completely boring

00:33:21.519 --> 00:33:28.480 align:start position:19%
i wasn't happy and went back to my first
idea of the pentagram

00:33:26.320 --> 00:33:33.840 align:start position:19%
further research shows that the satanic
pentagram is upside down that's the

00:33:31.120 --> 00:33:38.159 align:start position:19%
goat's head thing an upright pentagram
does still represent protection

00:33:36.159 --> 00:33:42.240 align:start position:19%
and to be honest i don't think my friend
is going to notice or care let's just

00:33:40.320 --> 00:33:46.000 align:start position:19%
order this pcb already so we can plow on
with the software

00:33:44.640 --> 00:33:49.279 align:start position:19%
this is one of those occasions where
mixing c and assembly makes the most

00:33:48.320 --> 00:33:52.480 align:start position:19%
sense
the outline of the program is very

00:33:50.640 --> 00:33:56.559 align:start position:19%
simple we just want to set a few
registers read some numbers and show it

00:33:54.320 --> 00:34:01.120 align:start position:19%
on the leds but bit banging the i
squared c that's much easier to do in

00:33:58.799 --> 00:34:05.760 align:start position:19%
assembly there's also this formula with
a bunch of coefficients to get from the

00:34:03.200 --> 00:34:10.399 align:start position:19%
raw numbers to the uv index so it's nice
to be able to do that in c

00:34:08.320 --> 00:34:13.760 align:start position:19%
much as i love reinventing the wheel i
took some existing i squared c master

00:34:11.919 --> 00:34:16.960 align:start position:19%
routines here but we can't use them as
is because i didn't add those external

00:34:15.919 --> 00:34:20.879 align:start position:19%
pull ups
i squared c is an open collector or open

00:34:19.119 --> 00:34:24.639 align:start position:19%
drain bus where you have pull up
resistors and any device on the bus can

00:34:22.800 --> 00:34:28.639 align:start position:19%
pull the signal down to ground
but the 80 tiny is a cmos device which

00:34:26.480 --> 00:34:31.919 align:start position:19%
means it has push pull outputs and it
takes a bit of work to emulate the open

00:34:30.399 --> 00:34:35.760 align:start position:19%
drain behavior
we often call these outputs tri-state

00:34:34.159 --> 00:34:40.560 align:start position:19%
but since we've got an internal pull-up
that can be enabled there are actually

00:34:37.280 --> 00:34:45.119 align:start position:19%
four possible states a gpio pin can take
floating weakly pulled up output high

00:34:43.599 --> 00:34:48.720 align:start position:19%
and output low
we want to toggle between output low and

00:34:47.119 --> 00:34:52.159 align:start position:19%
weakly pulled up
these states are controlled by two

00:34:50.079 --> 00:34:55.919 align:start position:19%
registers the direction register and the
output register

00:34:53.760 --> 00:34:58.560 align:start position:19%
so this is the perfect time to use
macros

00:34:58.880 --> 00:35:04.240 align:start position:19%
what else does the software have to do
the display matrix is just an interrupt

00:35:02.560 --> 00:35:08.560 align:start position:19%
and an array got it to do a little
animation and wrote a routine to display

00:35:06.560 --> 00:35:12.800 align:start position:19%
numbers on the bar graph
80 tiny chips do not have a floating

00:35:10.560 --> 00:35:17.359 align:start position:19%
point unit so as soon as you start using
floats the code size increases by about

00:35:14.960 --> 00:35:21.440 align:start position:19%
four kilobytes as gcc brings in its
software float library

00:35:19.599 --> 00:35:24.000 align:start position:19%
it's pretty slow but it doesn't matter
because all we're doing is multiplying a

00:35:22.880 --> 00:35:29.280 align:start position:19%
few numbers
the question is what are the numbers

00:35:26.720 --> 00:35:32.680 align:start position:19%
and for that let's delve into the sensor
and its documentation

00:35:31.280 --> 00:35:37.520 align:start position:19%
the
veml6075 the first warning flag is that

00:35:35.440 --> 00:35:41.440 align:start position:19%
the manufacturer has completely disowned
it it's marked as obsolete and they

00:35:39.599 --> 00:35:44.160 align:start position:19%
refuse to provide any documentation or
support for it they don't even

00:35:42.960 --> 00:35:46.800 align:start position:19%
acknowledge it was ever a part they
produced

00:35:45.280 --> 00:35:50.079 align:start position:19%
this is despite the fact that you can
still buy the chip and there are lots of

00:35:48.400 --> 00:35:52.800 align:start position:19%
examples on the internet of people using
it

00:35:51.200 --> 00:35:57.119 align:start position:19%
the main documentation is this
monstrosity which quite frankly reads

00:35:55.040 --> 00:36:00.000 align:start position:19%
like an undergraduate lab report no
offense to undergraduates

00:35:58.800 --> 00:36:03.440 align:start position:19%
there are a bunch of channels on the
sensor which read 16 bit numbers and we

00:36:02.000 --> 00:36:06.560 align:start position:19%
have to multiply these numbers by some
coefficients to get a calibrated reading

00:36:05.359 --> 00:36:11.040 align:start position:19%
fair enough
except there are multiple versions of

00:36:08.800 --> 00:36:14.400 align:start position:19%
this document with no change log and the
different versions have different

00:36:12.480 --> 00:36:17.599 align:start position:19%
coefficients i mean these are
substantially different numbers and

00:36:16.079 --> 00:36:22.320 align:start position:19%
there's no indication of why they
changed or which ones you should use

00:36:20.240 --> 00:36:26.000 align:start position:19%
furthermore the newer document has
removed some of the registers the whole

00:36:24.400 --> 00:36:29.200 align:start position:19%
dark current measurement section has
been cut

00:36:27.280 --> 00:36:32.480 align:start position:19%
does that mean it wasn't relevant or it
was inaccurate or that there's a newer

00:36:31.280 --> 00:36:36.240 align:start position:19%
version of the silicon that doesn't
include that feature anymore

00:36:34.160 --> 00:36:40.880 align:start position:19%
i tried reading from those registers and
they're non-zero so i have no idea what

00:36:38.960 --> 00:36:43.839 align:start position:19%
to make of that
there's also this dynamic range

00:36:42.400 --> 00:36:48.800 align:start position:19%
adjustment the entirety of the
documentation for which is this

00:36:46.240 --> 00:36:52.000 align:start position:19%
one equals high dynamic setting
what does it do

00:36:50.079 --> 00:36:55.440 align:start position:19%
does it reduce account does it apply a
non-linear gain curve were these

00:36:54.000 --> 00:36:58.000 align:start position:19%
coefficients earlier specified for
normal dynamic setting or high dynamic

00:36:57.119 --> 00:37:02.320 align:start position:19%
setting
why not write at least one sentence

00:36:59.920 --> 00:37:05.839 align:start position:19%
explaining what it does
the crazy thing is that there are loads

00:37:03.920 --> 00:37:08.960 align:start position:19%
of example projects and libraries that
use this sensor and they're all bloody

00:37:08.079 --> 00:37:12.079 align:start position:19%
wrong
it seems they've all copied and pasted

00:37:10.480 --> 00:37:14.880 align:start position:19%
the formula from this document without
thinking about it or even checking if it

00:37:13.680 --> 00:37:18.000 align:start position:19%
works
running that code with the sensors i

00:37:16.320 --> 00:37:22.720 align:start position:19%
have here bought from two different
sources leads to nonsensical numbers

00:37:21.359 --> 00:37:26.800 align:start position:19%
there are instructions on how to
calibrate the sensor yourself

00:37:24.800 --> 00:37:30.800 align:start position:19%
but we shouldn't have to the entire
point of choosing the sensor over a bare

00:37:28.560 --> 00:37:35.119 align:start position:19%
uv photo diet is that assuming we're not
covering it with an enclosure we don't

00:37:32.560 --> 00:37:40.640 align:start position:19%
have to do any calibration
now let's take a look at what uv index

00:37:37.119 --> 00:37:45.040 align:start position:19%
is and what the sensor is trying to do
on the electromagnetic spectrum the

00:37:42.480 --> 00:37:48.000 align:start position:19%
light that our eyes can see is called
visible light

00:37:46.640 --> 00:37:51.599 align:start position:19%
but the spectrum extends in both
directions to colours we can't see

00:37:49.760 --> 00:37:55.520 align:start position:19%
wavelengths longer than red are called
infrared wavelengths shorter than violet

00:37:53.760 --> 00:38:00.160 align:start position:19%
are called ultraviolet
the entire rainbow of visible colours is

00:37:57.839 --> 00:38:03.760 align:start position:19%
only a teeny tiny bit of the spectrum
but because scientists are boring the

00:38:02.160 --> 00:38:08.960 align:start position:19%
infrared colours are just called near
infrared and far infrared and the

00:38:05.680 --> 00:38:12.400 align:start position:19%
ultraviolet colors are called uva uvb
and uvc

00:38:10.800 --> 00:38:15.599 align:start position:19%
the shorter the wavelength the higher
the frequency and the higher the energy

00:38:14.160 --> 00:38:19.200 align:start position:19%
of that light
and as we head towards uv the light has

00:38:17.680 --> 00:38:24.480 align:start position:19%
enough energy to start affecting
chemical reactions and under uvc most

00:38:22.240 --> 00:38:28.960 align:start position:19%
life forms will get torn to shreds
luckily you may have noticed the sky is

00:38:26.640 --> 00:38:33.599 align:start position:19%
blue and the sun is kind of yellow
whereas in space with no atmosphere the

00:38:31.440 --> 00:38:37.200 align:start position:19%
sun is a lot closer to white
the atmosphere scatters and absorbs

00:38:35.680 --> 00:38:42.000 align:start position:19%
light in a way that's frequency
dependent the higher the frequency the

00:38:39.599 --> 00:38:45.760 align:start position:19%
more it interacts with the atmosphere so
even though the sun is throwing off a

00:38:43.280 --> 00:38:50.320 align:start position:19%
whole load of uvc basically none of it
ever reaches the ground

00:38:47.920 --> 00:38:54.560 align:start position:19%
some uvb reaches the ground although
it's very dependent on the season and a

00:38:52.640 --> 00:38:59.520 align:start position:19%
lot of uva reaches the ground but
because it's lower energy it doesn't do

00:38:56.480 --> 00:39:03.599 align:start position:19%
nearly as much damage to our skin
of course all this is far too complex

00:39:01.359 --> 00:39:07.359 align:start position:19%
for the plebs to understand what we want
is a single number that represents how

00:39:05.680 --> 00:39:11.680 align:start position:19%
much uv there is
this is the uv index it's a weighted

00:39:09.680 --> 00:39:16.640 align:start position:19%
curve that we integrate over so that a
little uvc counts for the same as a

00:39:14.079 --> 00:39:20.960 align:start position:19%
whole lot of uva
if we want a sensor to tell us the uv

00:39:19.040 --> 00:39:25.200 align:start position:19%
index it would have to sweep the whole
spectrum totting up with the weighting

00:39:22.640 --> 00:39:28.960 align:start position:19%
curve which obviously isn't practical
what the vast majority of sensors do is

00:39:27.359 --> 00:39:32.160 align:start position:19%
make a single measurement and
extrapolate

00:39:30.320 --> 00:39:36.640 align:start position:19%
we know quite accurately how the
atmosphere behaves so if the measurement

00:39:34.480 --> 00:39:41.599 align:start position:19%
at this particular frequency is known we
can infer the overall uv index

00:39:40.160 --> 00:39:47.280 align:start position:19%
that's all well and good if you're
outdoors looking at the sun but in other

00:39:44.160 --> 00:39:50.640 align:start position:19%
situations like under a uv lamp or just
indoors where the glass windows will

00:39:48.800 --> 00:39:53.440 align:start position:19%
have altered the frequency distribution
it's going to give you a completely

00:39:51.920 --> 00:39:58.400 align:start position:19%
wrong answer
this is why i was drawn to the female

00:39:55.480 --> 00:40:03.920 align:start position:19%
6075 which makes multiple measurements
at different frequencies and should give

00:40:00.720 --> 00:40:08.480 align:start position:19%
a more accurate uv index
i wish

00:40:06.160 --> 00:40:12.160 align:start position:19%
i used a bus pirate and a python script
to test the sensor so we can see the

00:40:10.000 --> 00:40:15.599 align:start position:19%
exact numbers and following the formula
in the example i was reading a uv index

00:40:14.720 --> 00:40:18.960 align:start position:19%
of
17.

00:40:17.040 --> 00:40:22.720 align:start position:19%
now this was in london about lunchtime
in the middle of june but even so i

00:40:21.040 --> 00:40:26.640 align:start position:19%
don't think the index goes that high
anywhere on the planet

00:40:24.880 --> 00:40:30.720 align:start position:19%
if i had a calibrated uv meter to
compare it to that would just make

00:40:28.319 --> 00:40:35.280 align:start position:19%
things far too easy so instead i started
looking at the government defra uv index

00:40:33.359 --> 00:40:38.160 align:start position:19%
graphs for the uk
there are a bunch of monitoring sites

00:40:36.640 --> 00:40:42.400 align:start position:19%
throughout the country which are plotted
here but most infuriatingly the london

00:40:40.560 --> 00:40:45.359 align:start position:19%
site is currently offline undergoing
maintenance

00:40:43.839 --> 00:40:48.560 align:start position:19%
still looking at the other sites it's
pretty amazing just how much the index

00:40:47.280 --> 00:40:51.760 align:start position:19%
changes throughout the day and
throughout the year

00:40:50.160 --> 00:40:56.640 align:start position:19%
when the sun is lower in the sky the
light travels through more atmosphere

00:40:53.920 --> 00:41:00.720 align:start position:19%
and less of the uv makes it through
so even the sunniest day in december

00:40:58.400 --> 00:41:04.560 align:start position:19%
barely makes it to 0.5
while the same site in summer can reach

00:41:02.640 --> 00:41:08.880 align:start position:19%
9 or more
when it's cloudy the index drops a

00:41:06.800 --> 00:41:13.359 align:start position:19%
variable amount but looking at a bunch
of sites it seems so long as there

00:41:10.880 --> 00:41:18.480 align:start position:19%
aren't clouds above most of the uk sites
agree within one or two units

00:41:16.480 --> 00:41:22.079 align:start position:19%
so if i can fudge my numbers a bit until
the sensor agrees roughly with what the

00:41:20.319 --> 00:41:25.599 align:start position:19%
other sites are saying i'll be happy
enough the amulet doesn't need to be

00:41:23.920 --> 00:41:29.839 align:start position:19%
that accurate it just has to say whether
you need suntan lotion

00:41:27.599 --> 00:41:34.480 align:start position:19%
well okay i also wanted it to compare
uva and uvb levels

00:41:32.240 --> 00:41:38.160 align:start position:19%
supposedly uvb doesn't go through glass
but uva does

00:41:36.880 --> 00:41:42.560 align:start position:19%
whether that's true or in what
proportion is obviously also going to

00:41:40.560 --> 00:41:47.280 align:start position:19%
depend on the type of glass the
thickness the angle of incidence whether

00:41:44.720 --> 00:41:51.520 align:start position:19%
it's coated whether it's double glazed
there are so many variables

00:41:49.200 --> 00:41:55.280 align:start position:19%
do we need to wear sunscreen indoors i
really wanted the amulet to answer that

00:41:53.359 --> 00:41:58.960 align:start position:19%
question
i tested the sensor while covering it

00:41:57.040 --> 00:42:02.880 align:start position:19%
with a plastic water bottle
pet plastic is pretty close to a brick

00:42:00.880 --> 00:42:07.280 align:start position:19%
wall filter at 300 nanometers so
covering the sensor should make the uvb

00:42:04.960 --> 00:42:11.760 align:start position:19%
reading drop to zero while the uva
remains about the same what i actually

00:42:09.440 --> 00:42:15.359 align:start position:19%
saw was both readings dropped by about
the same amount

00:42:13.440 --> 00:42:19.520 align:start position:19%
and so we come to the most disappointing
aspect of all the disappointing aspects

00:42:17.440 --> 00:42:24.240 align:start position:19%
of this sensor i can't believe i didn't
spot this sooner it claims to be

00:42:21.680 --> 00:42:28.400 align:start position:19%
measuring uvb it consistently refers to
that channel as uvb but if you actually

00:42:26.560 --> 00:42:33.119 align:start position:19%
look at the numbers on the sensitivity
diagram the uvb peak is about 330

00:42:31.760 --> 00:42:40.000 align:start position:19%
nanometers
the iso standard quite clearly states

00:42:35.200 --> 00:42:47.119 align:start position:19%
that uvb is considered from 280 to 315.
so this vemmal 6075 this supposed uvb

00:42:43.760 --> 00:42:51.680 align:start position:19%
sensor is almost entirely measuring uva
just two different flavors of it

00:42:49.920 --> 00:42:55.680 align:start position:19%
it's far too late in the day to change
sensor so let's plow ahead and hope that

00:42:54.000 --> 00:42:59.280 align:start position:19%
nobody notices
i've always found that the best way to

00:42:57.520 --> 00:43:04.000 align:start position:19%
deal with such disappointments is to
play with some noxious chemicals

00:43:02.000 --> 00:43:07.599 align:start position:19%
i built two sets of metal parts on
consecutive evenings and i'm showing

00:43:05.839 --> 00:43:12.079 align:start position:19%
this because just look at how much the
finish has degraded in 24 hours

00:43:10.480 --> 00:43:15.520 align:start position:19%
this brass has some adjectives in it
which makes it machine nicely but it

00:43:14.160 --> 00:43:19.680 align:start position:19%
seems to have the side effect of
tarnishing extremely quickly

00:43:18.160 --> 00:43:23.920 align:start position:19%
normally i solve this problem by
varnishing the pieces but i've never

00:43:21.520 --> 00:43:28.079 align:start position:19%
been satisfied with that solution
so it's time to try something i've

00:43:25.280 --> 00:43:30.720 align:start position:19%
wanted to do for ages that is gold
plating

00:43:29.119 --> 00:43:34.800 align:start position:19%
i'm far too stingy to buy an
off-the-shelf plating kit the only thing

00:43:33.119 --> 00:43:41.520 align:start position:19%
we actually need to buy is the
electrolyte this is potassium cyanide

00:43:38.960 --> 00:43:47.680 align:start position:19%
apparently it's harmful
this tiny bottle contains 0.2 grams of

00:43:44.560 --> 00:43:51.040 align:start position:19%
gold and yeah if you drink it you'll die
you won't get sick you'll just straight

00:43:49.280 --> 00:43:55.280 align:start position:19%
up die
with electroplating the most important

00:43:53.359 --> 00:43:57.680 align:start position:19%
thing is to make sure the parts are
clean

00:43:57.839 --> 00:44:04.319 align:start position:19%
lacking any proper degreaser i'm just
soaking the parts in some diluted bleach

00:44:02.640 --> 00:44:06.720 align:start position:19%
and you can tell how clean it is from
the way the liquid gathers on the

00:44:05.760 --> 00:44:10.960 align:start position:19%
surface
if it forms droplets then it's

00:44:08.319 --> 00:44:15.359 align:start position:19%
contaminated if it wets it smoothly then
it's clean

00:44:13.119 --> 00:44:19.040 align:start position:19%
that copper wire will be one electrical
contact and as for the anode because i

00:44:17.440 --> 00:44:22.640 align:start position:19%
don't really know what i'm doing i've
folded this piece of kitchen towel and

00:44:20.720 --> 00:44:28.240 align:start position:19%
held it in a crocodile clip
now we dip this in the cyanide which has

00:44:25.440 --> 00:44:31.119 align:start position:19%
a rather dashing fuchsia color or maybe
it's magenta

00:44:34.960 --> 00:44:40.160 align:start position:19%
the power supply is at five volts and
then we just wipe this over all the

00:44:38.880 --> 00:44:44.240 align:start position:19%
surfaces
the color change from brass to gold is

00:44:42.319 --> 00:44:47.760 align:start position:19%
very subtle you can tell it's working
because little bubbles of hydrogen are

00:44:45.760 --> 00:44:51.359 align:start position:19%
forming at the surface
at the same time oxygen is generated at

00:44:49.760 --> 00:44:55.040 align:start position:19%
the crocodile clip which is why it's
corroding to all hell

00:44:53.040 --> 00:44:58.880 align:start position:19%
i had to stop and scrape the oxides off
several times as that was adding

00:44:57.119 --> 00:45:02.520 align:start position:19%
resistance to the circuit and the
current dropped accordingly

00:45:10.640 --> 00:45:14.920 align:start position:19%
oh
satisfying

00:45:25.200 --> 00:45:30.720 align:start position:19%
i'm going over all the surfaces
repeatedly because the gold finish is

00:45:28.480 --> 00:45:36.160 align:start position:19%
not as smooth as it could be so we need
to make the coating thick enough that it

00:45:32.240 --> 00:45:36.160 align:start position:19%
can survive another polishing afterwards

00:45:42.079 --> 00:45:49.599 align:start position:19%
at last the circuit boards arrived now
not a moment too soon

00:45:46.560 --> 00:45:52.800 align:start position:19%
kind of like little pogs aren't they
well that doesn't look too bad

00:45:53.440 --> 00:45:56.800 align:start position:19%
commence soldiering i guess

00:45:57.200 --> 00:46:03.839 align:start position:19%
i'll be hand soldering most of this the
easiest way to do these 0603 parts is to

00:46:01.599 --> 00:46:07.520 align:start position:19%
put a blob of solder on one pad then
tack the part in place

00:46:05.680 --> 00:46:12.480 align:start position:19%
spin it around solder the other side
properly and finally go back to the

00:46:09.200 --> 00:46:12.480 align:start position:19%
first joint and clean it up

00:46:12.800 --> 00:46:20.079 align:start position:19%
i was too lazy to use a stencil
i suppose i'm afflicted by a unique kind

00:46:17.680 --> 00:46:22.400 align:start position:19%
of laziness where you end up doing more
work

00:46:26.000 --> 00:46:33.119 align:start position:19%
for the vqfn part it's better to use too
little solder than too much we can

00:46:30.800 --> 00:46:37.760 align:start position:19%
always add more afterwards
gently warm it with the heat gun

00:46:35.359 --> 00:46:37.760 align:start position:19%
and

00:46:37.920 --> 00:46:43.200 align:start position:19%
yeah maybe that wasn't enough solder you
can still see some worrying about some

00:46:42.079 --> 00:46:46.640 align:start position:19%
copper
let's splat some more on there

00:46:54.000 --> 00:46:58.400 align:start position:19%
now's as good a time as any to confirm
the chip is working which means

00:46:57.119 --> 00:47:00.880 align:start position:19%
soldering all the test points on the
back

00:46:59.359 --> 00:47:05.440 align:start position:19%
it's also the perfect time to remember
that better lighting is available

00:47:03.520 --> 00:47:08.839 align:start position:19%
and with that we can do the sensor same
deal as before

00:47:15.920 --> 00:47:21.200 align:start position:19%
for the leds it's important to get them
centered and straight

00:47:19.520 --> 00:47:25.200 align:start position:19%
if they're wonky it's going to be really
obvious when they light up

00:47:23.680 --> 00:47:29.280 align:start position:19%
oh man did i mention i couldn't actually
find anywhere to buy the ttp223

00:47:28.000 --> 00:47:31.920 align:start position:19%
it's not a problem because i can just
unsolder it from these breakout boards

00:47:30.960 --> 00:47:35.359 align:start position:19%
but
it's about par for the course isn't it

00:47:36.800 --> 00:47:44.160 align:start position:19%
and finally last of the leds
starring daniel day lewis

00:47:50.000 --> 00:47:54.319 align:start position:19%
incidentally this footage has been sped
up

00:48:00.240 --> 00:48:07.760 align:start position:19%
the chip is flashed the capsense button
works the leds all light up

00:48:05.680 --> 00:48:11.520 align:start position:19%
now is the last chance we have to alter
the code and behavior before it gets

00:48:09.760 --> 00:48:16.000 align:start position:19%
locked in place forever
i'm mostly happy with it at the last

00:48:13.520 --> 00:48:20.079 align:start position:19%
minute i've decided to increase the gain
on the a and b channels because they're

00:48:18.319 --> 00:48:24.400 align:start position:19%
not calibrated units and the scale
doesn't need to be the same

00:48:22.319 --> 00:48:30.839 align:start position:19%
for the battery contact i had planned to
use a proper spring but this pseudo

00:48:26.720 --> 00:48:30.839 align:start position:19%
paperclip will have to do

00:48:44.720 --> 00:48:50.960 align:start position:19%
one disadvantage to using soft solder on
the attachment point earlier

00:48:49.200 --> 00:48:55.440 align:start position:19%
is that if we overheat the part now
it'll all come apart and will have

00:48:52.400 --> 00:48:55.440 align:start position:19%
ruined everything

00:48:56.720 --> 00:49:04.880 align:start position:19%
also because this thing is gold plated
the solder will now stick anywhere even

00:49:01.040 --> 00:49:08.880 align:start position:19%
without flux and wreck the gold finish
luckily everything is under control and

00:49:07.440 --> 00:49:12.720 align:start position:19%
the trick for this last part is that
i'll flood these through holes with

00:49:10.640 --> 00:49:15.839 align:start position:19%
solder then use them to transfer heat to
the join from behind

00:49:14.480 --> 00:49:21.800 align:start position:19%
i'm going to keep poking the circuit
with tweezers until the solder melts and

00:49:17.920 --> 00:49:21.800 align:start position:19%
the joint lies flat

00:50:21.200 --> 00:50:25.599 align:start position:19%
turns on
goes through the modes

00:50:24.319 --> 00:50:29.839 align:start position:19%
turns off again
let's take it outside

00:50:27.760 --> 00:50:33.680 align:start position:19%
at the time of filming it's a very sunny
day towards the end of june and these

00:50:32.079 --> 00:50:38.000 align:start position:19%
leds are not going to be able to compete
with direct sunlight but it's okay

00:50:35.760 --> 00:50:42.559 align:start position:19%
because i anticipated this problem and
added a feature where if you hold the

00:50:39.760 --> 00:50:46.559 align:start position:19%
pentagram it will freeze the display so
you can take a measurement then shade

00:50:44.000 --> 00:50:51.280 align:start position:19%
the display to be able to read it
four leds corresponds to a uv index of

00:50:49.119 --> 00:50:55.200 align:start position:19%
about six which agrees with the defra
website

00:50:53.119 --> 00:51:00.480 align:start position:19%
i already regret making the scale go up
to 11. if it only went up to eight then

00:50:57.599 --> 00:51:03.760 align:start position:19%
one led would be one unit on the scale
and let's be honest if the index ever

00:51:02.000 --> 00:51:06.800 align:start position:19%
does go above eight you probably don't
need an amulet to tell you to wear

00:51:05.280 --> 00:51:10.319 align:start position:19%
sunscreen
how about indoors by our sunny

00:51:08.880 --> 00:51:14.559 align:start position:19%
windowsill
the reading here is roughly a quarter of

00:51:12.319 --> 00:51:18.559 align:start position:19%
the uv index outside which
is believable i suppose

00:51:16.880 --> 00:51:22.800 align:start position:19%
i increased the gain on the individual
channels by a factor of four so we can

00:51:20.559 --> 00:51:27.280 align:start position:19%
compare this with a higher resolution
i think the biggest variable is that the

00:51:25.040 --> 00:51:31.520 align:start position:19%
amount reflected by the window depends
on the angle the sunlight hits it which

00:51:29.520 --> 00:51:36.079 align:start position:19%
is always changing so there isn't really
a hard and fast rule about this

00:51:34.160 --> 00:51:40.480 align:start position:19%
i'd love to keep playing with this but
unfortunately the deadline looms and

00:51:39.119 --> 00:51:43.280 align:start position:19%
there's one last thing we need to make
before i can consider this project

00:51:42.079 --> 00:51:48.319 align:start position:19%
complete
the instruction manual

00:51:46.319 --> 00:51:52.559 align:start position:19%
i had a vision for this right from the
very start of the project it's not just

00:51:50.480 --> 00:51:58.079 align:start position:19%
a manual or the nitty-gritty details of
how it works it's about the symbolism

00:51:54.800 --> 00:52:01.520 align:start position:19%
the magic the fusion of art and science
and what i really wanted on the cover of

00:51:59.920 --> 00:52:06.559 align:start position:19%
the manual was
an anime girl drooling over the render

00:52:04.880 --> 00:52:09.839 align:start position:19%
that's done with blender's freestyle
render and the sailor moon screenshot i

00:52:08.400 --> 00:52:13.920 align:start position:19%
put through photoshop to give it a
screen tone effect so it looks even more

00:52:11.760 --> 00:52:18.280 align:start position:19%
like a printed manga
become

00:52:15.040 --> 00:52:18.280 align:start position:19%
a scientist

00:52:18.960 --> 00:52:26.559 align:start position:19%
of course why build one when you can
build two for twice the price

00:52:24.400 --> 00:52:30.240 align:start position:19%
if you forget the lead time on the pcb
then this whole project was less than

00:52:28.000 --> 00:52:34.800 align:start position:19%
two weeks long and yet it still somehow
took me four months to edit the video

00:52:33.200 --> 00:52:38.480 align:start position:19%
i have plenty more projects to make
videos about as and when i can find the

00:52:36.960 --> 00:52:42.559 align:start position:19%
time to do so
but if you enjoyed this and you want to

00:52:40.640 --> 00:52:46.480 align:start position:19%
send me money and you can put up with my
erratic schedule then consider joining

00:52:44.800 --> 00:52:49.880 align:start position:19%
my patreon
thanks for watching

