Friday, October 24, 2014

PCB's

Working on creating printed circuit boards, since I'm moving to more surface mount components, and the point to point wiring is messy and takes up space.  A few months ago I tried the photo-resist method.  Very sensitive, easy to over expose and expensive.  Did some more reading, and decided to try the Toner Transfer method.  

Results below.

This really works great.  I picked up a Cannon Laser Printer for $60.  
Steps:
1. Design the PCB in Eagle
2. Print on matte photo paper
3. Place on PCB face down, tape edges, iron with highest heat setting and steam for a few minutes.
4. Soak off the paper in warm water
5. Etch

I also did this for a two sided board.  Only warning would be to avoid Radio Shack boards, the copper lifts too easily.

Lots of tutorials on this, some are over thinking the process.  This was very easy.  Surface prep and heat are probably important factors.  I can see no reason to buy a laminator.

Saturday, October 4, 2014

Thursday, May 22, 2014

Calibration Data Part 2

Accidentally deleted the other post, when I tried to update the formatting.  Here's another go, this time with a 7 day old sensor, transitioning to a 0 day old sensor :).  Interesting here to see how the Intercept doesn't change.  Slope was 906 before recalibration, SAME intercept.  This sensor has had other intercept values, most recently 27626.

                                                                                                                -rc (02 2D)--
01 16 02 01 87 06 00 00 03 00 00 00 05 02 2D 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 EA 57
----date---- -- date ---  --slope=767  ----------  
FD C9 1F  0A 94 92 1F 0A  4B 4B 4B 4B 4B FB 87 40  
Intercept=30000--------
00 00 00 00 00 4C DD 40   00 00 00 00 00 00 F0 3F  03 06 00 00 00 00 00 00 00 00 00 02


-- Date---  --gluc--    --counts-   --date ----
D4 C9 1F 0A 88 00 00 00 E0 0C 02 00 67 C9 1F 0A 00
DE C9 1F 0A 88 00 00 00 E0 0C 02 00 67 C9 1F 0A 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 BD B4

With two more calibration data points, slope is at 820, intercept continues to be unchanged.


Wednesday, May 21, 2014

BLE and other new devices

RFDUINO
I got on a kick a while back to use the RFDuino.  The size was appealing and I imagined it could do some things it can't.  For BLE devices, there are two roles, Central and Peripheral.  Watches are peripherals, as is the RFDuino, an iPhone is a Central.   So, after much head scratching, I've realized I can't connect an RFDuino directly to a watch.  Kind of a show stopper.  Other issues with the RFDuino, which may or may not be imagined:
1.  If you use the one and only serial port for something, you can't use the USB for debugging output.  Typical problem with single Uart microcontrollers, but this is why I like the Teensy and Mega ADK.  It's hard hacking when you're running into constraints.  In this case, you run out of options for debug output, and are down to blinking led's.
2.  The programmer is cumbersome, and you need to unplug the board from the circuit to re-program.
3.  When you google this product, mostly what you get are items related to the kickstarter.  Lots of people bought these, then went back to their caves and vanished.  There are few write ups on actual projects out there.

WIXEL
Another strange bird.  Will make you appreciate what the Arduino empire does well.  Constant "service" calls required to keep Serial output open, otherwise "stuff" just shuts down.  Want a simple delay statement, forget it, you'll lose your serial out.  Also, I've noticed that uploading new code, doesn't always happen, although it says it did.  The compiler for this thing is slow.  And then there's the lack of memory.  But, we're all using this for a very good reason, so deal with it...


Wednesday, May 7, 2014

1 year anniversary

Thought I'd summarize where I'm at now.  About a year has passed since I first wrote some C# to automate keystrokes and get glucose readings from the Dexcom Studio Software.

Now I use this:



I'm getting 22 hours on a charge.  This will keep me through racing season this year.  It's reliable, and I'm now using it every day.  I've gotten the watch to hold a charge for about 4 days.  There's a magic "sniff" setting that makes all the difference.

Now I'm working towards a keychain sized receiver that will use BLE to send packets to the watch.  All the pieces are there, I just need the time to put it all together.

That's hard now that the weather is decent again.

Wednesday, April 30, 2014

Evaluating the Rfduino

Got the rfduino in the mail this week. Unfortunately, I got the smt version.
Here's a couple of hours out of my Sunday.

Thursday, April 24, 2014

Matching up Meter Records to Packet Sniffer


Finally matched up some of the packet data to a sensor record on the Dexcom.  Assuming this is the raw counts from the sensor.  Probably should be using all 4 bytes here, not just 3.

88 mg/dl
BD 52 FD 09 54 1B FD 09 C0 93 01 00 70 84 01 00 C8 00 05 93  :From sensor data record
3C 99 E2 1E                                                                                      :From packet sniffer
00111100100110 01111000100001 1110                                        :Convert packet to binary
00111100100110 Reverse->01100100111100 ->193C                    :Reverse the first 14 bits
                                                                                                            And back to Hex

96 mg/dl
15 55 FD 09 AC 1D FD 09 90 99 01 00 70 9C 01 00 C5 00 C2 38  :From sensor data record
packet 99 99 E3 9E                                                                             :From packet sniffer
10011001100110 01111000111001 1110                                          :Convert packet to binary
10011001100110 Reverse->01100110011001=1999

95 mg/dl
41 56 FD 09 D8 1E FD 09 20 9C 01 00 00 9B 01 00 C3 00 29 04  :From sensor data record
packet 43 99 0D 9E                                                                           :From packet sniffer
01000011100110 01000011011001 1110                                        :Convert packet to binary
01000011100110 Reverse->01100111000010 =19C2


95 mg/dl
99 58 FD 09 30 21 FD 09 30 A3 01 00 C0 9A 01 00 BA 00 EE 50  :From sensor data record
packet CC 59 35 9E   :95                                                                   :From packet sniffer
11001100010110 01001101011001 1110                                         :Convert packet to binary
11001100010110 Reverse->01101000110011 = 1A33


120 mg/dl
F9 61 FD 09 90 2A FD 09 80 E2 01 00 E0 D1 01 00 BA 00 DB D0  :From sensor data record
Packet 14 79 78 BE D8                                                                        :From packet sniffer
00010100011110 01011110001011 1110                                           :Convert packet to binary
00010100011110 Reverse-> 01111000101000 =1E28


The sensor data records look like this:
--date------------  --date------------    ----counts---------     --second set ?---                
FD 3F FD 09 94 08 FD 09  20 90 02 00  00 96 02 00 C0 00 14 00 
29 41 FD 09 C0 09 FD 09  C0 85 02 00  80 8D 02 00 C0 00 8D 43 
55 42 FD 09 EC 0A FD 09  60 7F 02 00  E0 88 02 00 B7 00 31 00 
81 43 FD 09 18 0C FD 09  00 7B 02 00  20 84 02 00 AD 00 67 55 
AD 44 FD 09 44 0D FD 09  00 67 02 00  A0 7C 02 00 C4 00 3C D3 
D9 45 FD 09 70 0E FD 09  A0 45 02 00  40 6F 02 00 CA 00 E3 58 
05 47 FD 09 9C 0F FD 09  60 26 02 00  80 59 02 00 B2 00 D7 99 
31 48 FD 09 C8 10 FD 09  60 FE 01 00  80 3A 02 00 B4 00 52 53 
5D 49 FD 09 F4 11 FD 09  90 C1 01 00  80 12 02 00 B6 01 94 6F 
BD 52 FD 09 54 1B FD 09  C0 93 01 00  70 84 01 00 C8 00 05 93 
15 55 FD 09 AC 1D FD 09  90 99 01 00  70 9C 01 00 C5 00 C2 38 
41 56 FD 09 D8 1E FD 09  20 9C 01 00  00 9B 01 00 C3 00 29 04 
99 58 FD 09 30 21 FD 09  30 A3 01 00  C0 9A 01 00 BA 00 EE 50