Wednesday, April 4, 2018

LoRaWAN in central New Jersey in early 2018?

I bought a couple of LoRa RF modules, including a 915 MHz Hope RF RFM95, last fall. The plan was to hook it up to an Arduino and use IBM's LMIC library to make a simple LoRa transceiver, get a developer account with a LoRaWAN service provider and start experimenting.

However, there was a snag. Senet does offer developer accounts, but doesn't currently have coverage in my neck of the woods, in central New Jersey, about halfway between Philadelphia and New York City. Comcast offers LoRa service, but calls it "machineQ", and also doesn't currently have coverage at my location. I didn't find any information about Comcast LoRa developer accounts. In fact it sounds like it's mandatory to use the Murata mQModule with the Comcast mQSpark dev kit to connect to the Comcast LoRaWAN, not very developer friendly.

So not only is there currently no coverage by commercial LoRaWAN service providers, they might not let you connect with your uncertified $5 RFM95 transceiver. The cheapest certified LoRa RF module I can find is the $15 RN2483, not only a bit pricey for use with an IoT sensor, but might still not let you connect with machineQ.

recent blog post by Omkar Joglekar documents how he built a LoRa transceiver very similar to what I had in mind, but much more ambitious with nice weatherproofing and a fancy monopole antenna with ground radials. He was able to get credentials to connect to the Tata Communications LoRaWAN. Clearly Tata Communications knows how to get early buy in from developers!

My current Plan B is to join The Things Network (TTN) by setting up my own LoRa gateway, since the nearest gateways on their coverage map are about 20 miles away, way too far even for LoRa. I have a single-channel LoRa gateway on the way on the slow boat from Shenzhen.

Wednesday, March 21, 2018

Bug zapper power supply

I have a $4 bug zapper that uses two AA batteries for a voltage source. I've measured the output voltage before to about 1.4kV and today I decided to measure the power supply operating frequency and ripple amplitude. Here's the bug zapper with an improvised high-pass filter and my trusty pocket scope standing by:

Hey, this actually works! Notice the hands-free high-tech solution for keeping the bug zapper on while I fiddled with scope settings:

And a close up of the scope:

So the operating frequency is a disappointingly low 18.8kHz, but the ripple amplitude is an impressively low ±30mV riding on 1.4kV DC. A modified bug-zapper booster design for neon glow lamps definitely seem worth revisiting down the road, but for now I'll stick to refining the voltage-multiplier version.

Voltage-multiplier boost converter for neon glow lamp

And now back to the regularly scheduled programming! I had second thoughts about pursuing the inductor-based boost converter design to power a neon glow lamp with a standard 9V battery. Non-ideal effects are significant for both the inductor and the transistor switch and it wasn't obvious that I'd be able to get the booster to operate above a megahertz. I might return to this design later and hope to ultimately replace the inductor with a flyback transformer, but for now I'm going with a more straightforward voltage-multiplier boost converter.

For the first iteration, the square-wave oscillator is unchanged except that it's input voltage is doubled to 18V by using two 9V batteries in series. I wasn't sure how many stages the voltage multiplier would need, but with 18V input I got away with using a 4-stage Greinacher (a.k.a. Cockcroft-Walton) multiplier. Here it is on two mini breadboards (voltage multiplier to the left and NE555 square-wave oscillator in the back to the right:

The components were what I had available. The diodes were bargain "germanium" diodes I bought a couple of years ago. I'm pretty sure they're just generic silicon signal diodes, but they seem to work well enough for this application. The voltage rating of the caps was a bit marginal and I used the lowest capacitance values a SPICE simulation told me I could get away with without reducing the output voltage. I did this over two months ago and I don't remember the oscillator frequency, but it must have been less than 200kHz. Anyway, this first crude attempt was encouraging enough. Here's a cheap multimeter showing an output voltage of 80.8V, more than enough to light a neon glow lamp:


Saturday, February 3, 2018

Humerus Varnhemiensis

recent imgur re-post  of a not-so-recent facebook post by Historiska, the Swedish national historical museum, has created a lot of attention for Humerus Varnhemiensis, the Varnhem humerus, a medieval bone repaired by a copper-sheet cylinder. The machine translation of the original FB post from Swedish to English is lacking, and a friend asked me for my translation. This piqued  my interest and since it seems that the authoritative scientific paper on Humerus Varnhemiensis is not as widely read as it deserves to be, I'll make this post with a link to it, a summary, and some of my own idle speculation.
Picture of Varnhem humerus (from Swedish Wikipedia page on Varnhem)

Varnhem is now a small, and shrinking, town in the middle of nowhere in south-central Sweden. The Varnhem Cistercian monastery is historically prominent as a center of early Swedish Christianity, with Christian graves dating back to the 800s, and as the burial place of Swedish regent Birger Magnusson, who founded the new capital of Stockholm in 1252. The Varnhem humerus was found in the cloister aisle in 1928. It probably dates to between 1260 and 1527 and is remarkable because it shows signs of healing after being repaired with a copper-sheet cylinder. It is a unique example of seemingly anachronistic, successful, advanced surgery from the Middle Ages. My initial reaction when I heard about it was very skeptical, but Hallbäck's scholarly work on the topic seems convincing to me, as a layman in this area.

With the usual search engines, I could not find Hallbäck's paper, published in the journal "Ossa: international journal of skeletal research". However, using LIBRIS, the catalog search engine for all Swedish libraries, I found a PDF with a scan of the relevant issue. I extracted a 1.1 MB PDF with the paper of interest: Hallbäck, D.-A. (1976/7). A Medieval (?) bone with a copper plate support, indicating an open surgical treatment. Ossa 3/4, 63–82. It's a 20-page paper, written in English, and well worth a read in its entirety. There are 12 figures, 4 of them X-ray images, providing very compelling evidence.

In summary Hallbäck finds that the humerus is probably from the late medieval time period, 1260-1527, and less probably from 1150-1260. There is also a slight chance that the bone is as recent as from 1674-1695 (hence the awkward question mark in the title of the paper), when the church was used for burials of nobility, but its location in the monastery, not the church, contradicts that. Carbon-14 dating could not be used without unacceptable damage to the bone. The bone is wrapped in a "remarkably pure copper" cylinder, 7.3 cm long, and and about 0.7 mm thick. The cylinder has three pairs of holes, where it would have been held together by rivets, or similar, now gone. When the holes are lined up, the cylinder snugly fits around the bone. The paper refers to the cylinder material as copper plate, but if I went to Home Depot to buy some, I'd ask for copper sheet. A plate would be thicker and not possible to bend with your bare hands. The bone has a healed fracture ("proliferative bone reaction"), a porous area indicative of infection, and two "exostoses", bone growths on the surface of the bone, the larger of which has begun to cover the copper sheet! There is thus overwhelming evidence that the patient survived the surgery and recovered.
Figure 5 from the paper. The copper sheet is marked "cp", the proliferative bone reaction "br" and the exostoses "e".

The paper concludes: "My assumption is that the injury was caused by a cut from, for instance an axe or a sword, which led to an open wound, with the bared bone visible. The bone was probably not cut in two pieces. The plate was placed round the bone to bring about stabilization. At the same time, the pure copper had an antibacterial effect on the wound. Whether this effect was deliberate or not is impossible to say. Judging from the bone, and considering the well developed exostoses and the proliferative bone reaction, as well as the lack of fracture notches on the X-ray pictures, the patient must have survived for years, may be decades. Note that nothing can be said about the function of the arm after the operation".

My speculation is that the patient was a warrior and local nobleman with rare access to state-of-the-art medical care provided by Cistercian monks at the Varnhem monastery. His left arm was nearly severed in combat when an axe splintered his shield, peeled the flesh off the bone on the outside of the upper arm and fractured the bone. By the time he reached Varnhem the wound was infected and his physician decided to kill two birds with one stone and use a copper sheet wrapped around the already partially exposed bone to both stabilize the fracture and fight the infection. The recovery of the patient is impressive, but I find the skill of the physician even more impressive. Quoting Hallbäck: "The fixation of the plate so closely to the bone as in this case entails seriously damaged soft parts, and it is a true surgical exploit to carry through this operation so that the patient survived". Where did this Cistercian monk learn to perform medicine at this level? Was this kind of medical knowledge widespread within his order? Did he attend medical school at one of the handful of universities that existed at the time in continental Europe (Sweden's first university, in Uppsala, did not open until 1477)?