# My Take on Assistive Tech for the Hackaday Prize

We’re in the last few weeks for entries in the 2016 Hackaday Prize — specifically the challenge is to show off your take on assisstive technology. This is a hugely broad category and I’ve been thinking about it for a while. I’m sure there’s a ton of low-hanging fruit that’s not obvious to everyone. This would be a great time to hit up the comments below and leave your “hey, I always thought someone should make…” ideas. I’m looking forward to reading them and it might just inspire someone to spend the next couple weeks hammering out a prototype to enter.

For me, it’s medication. I knew this can be a challenging problem having gone through a few cycles of prescription medicines in my life. But recently I helped out a family member who was suddenly on many medications taken on eight different times a day — including once, twice, three, and six times per day. This was further compounded by sleep deprivation (having to set alarms at night to take the medicine) and  drowsy/woozy effects from the medicine. I can tell you first hand that this is really tough for anyone to deal with and it’s incredibly easy to make a mistake or not be able to remember if you took a dose.

### Pill Organizers Do No More or Less

We’ve seen a number of pill organizers before and that’s what I reached for in this case. However, that organizer only had four slots for each day. I didn’t hack it (other than writing on the doors with a Sharpie for when to take each) but even if there were added buttons or LEDs I’m not convinced this would be a marked improvement.

What you see above is my proposal for the medicine problem. Smartphones have become ubiquitous and the processing power and cameras of even budget phones are mind blowing. I think it is entirely possible to write an app that uses computer vision to recognize pills and sync them with the schedule. This may mean whipping the phone out of your pocket, or designing a pill box that has a phone stand next to it (saying that makes me think of using RPi and a Pi camera). Grab your pills and validate them under the camera.

### Useful Augmented Reality

The screen of the phone would use augmented reality to overlay information about the pills it sees — you know, like Pokemon Go but in a way that enriches your life. ‘pills, catch ’em all!’ — new pills can be learned of the fly, delivering the user to a screen to identify the pill and the dosing schedule. Taking the validation picture will record when the medicine was taken, and the natural extension of this systems is a pharmacy’s ability to push your dose schedule to your account when you pick up the prescription. A stretch goal would be keeping an eye out for interactions.

This is all very much like how hospitals do it — they’re scanning bar codes on the packaging and the patient bracelet and recording it. This would be an easier user experience and quite frankly I think companies already in this space (like Snapchat and Niantic) could whip this up in a single-day hackathon no problem.

Is it the perfect system? Maybe not. But there is no perfect system or we’d be using it by now. We need you, the world’s talent pool, to step up and make life a little better. Do it in prototype form by October 3rd and you’ll be eligible for one of twenty \$1000 cash prizes and a chance at winning the Hackaday Prize. But even if you don’t build a single thing, one idea could be the spark that lets others change the world for the better. So let’s hear it!

# Hacker Places To Visit: Musée des Arts et Métiers in Paris

The best way to pull off this deception: tell your significant other that you’d want nothing more than a romantic week in Paris. Arrive in Paris, stash your bags, and then take either the number three or eleven Metro. When you get to the station that looks like the inside of a giant steam engine, Arts et Métiers, get out. You’re now ten Euros away from one of the coolest museums a hacker could visit.

A significant portion of modern science’s beginnings is sitting in the Musée, polished and beautiful. Most of them are housed in cabinets so old they’re part of the exhibit. Now, the Henry Ford museum in Detroit Michigan is a monument to industrialization, and cool in its own right, but it leaves some questions unanswered. We’re all spoiled by desktop CNCs, precision measurement tools for pennies, and more. How did we get here? How did they measure a shaft or turn a screw before precision digital micrometers? What did early automation look like? Early construction?

Also did I mention it has Foucault’s Pendulum? You know, the one that finally convinced everyone that the Earth rotated around an axis? No big deal.

The museum has a few permanent exhibits: instruments scientifique, matériaux, construction, communication, énergie, mécanique et transports.

Instruments Scientifiques was one of my favorites. Not only did it include old scientific instruments, it had sections containing some of the original experiments in optics, computation, and more. For example you can see not just one but a few original examples of Pascal’s Pascaline, arguably the first mechanical calculators in the modern era to be used by the layman for every day calculation, signed by Pascal. It’s also worth noting just how incredible the workmanship of these tools are. They’re beautiful.

Matériaux was initially a disappointment as I entered it from the wrong end. For me it started of with a tragically boring and simplistic display on recycling materials designed primarily to torture children on field trips. Luckily it quickly ramped into a fascinating display on materials manufacturing technology. How did we go from hand looms to fully automated Jacquard looms (of which you can see some of the first examples) to our modern day robotic looms? How did ceramic evolve? What was early steelmaking like? It’s very cool and models are all in beautiful condition.

By the time I got to Communication I was reaching the limit of my endurance and also what you can fit into a single day of the museum. It’s a large building. It was packed through many of the early examples of computing, television, and space. There was quite a display of early camera equipment. You could get close enough to some truly massive old computers to smell the still off-gassing phenolics.

Construction held my interest for a long time. It’s not my usual interest, but after living in Paris for a month or so I was absolutely burning with curiosity. How did anyone without a single powered crane or vehicle build so many buildings out of stone? It’s packed for four rooms and two stores from floor to ceiling of beautiful little wood models explaining exactly how.

Énergie was quite cool. It followed the development of steam power for the most part. It started with primitive waterwheels. Moved on to turbines. Then showed the gradual increase in complexity until the the modern day. It had some internal combustion too, but much of that was reserved for the transports section of the museum. It also had some interactive displays to entertain children and Hackaday writers. However they were in desperate need of an oiling and this is by far the most ear-piercingly squeaky exhibit in the whole building.

Mécanique is competing with instruments scientifique as my favorite exhibit. Have you ever wanted to see hundreds of examples of screw machines, old lathes, and the evolution of the milling machine? What about models of the factories that built steam engines or massive wagon wheels. They even had a lathe that belonged to a French king. Apparently he thought metalworking was the way to get in touch with the common people.

Transports was a nice exhibit, but it fell a little short for me since I’d been to the aforementioned Henry Ford museum. However, it covered the history of some of the European automobile manufacturers pretty well. Had a nice section on trains and subways. And even had some models of the ships used in the European Space Agency.

The last exhibit is the museum itself. It’s an historic building. It was originally built as a school for training engineers in 1794 but as the school grew out of it, it slowly transformed into the museum it is today. The architecture is beautiful. It’s adorned in stone and statue like all the French museums. It also has sections cut out in some of the higher storeys of the building so you can see how it was constructed.

Part of its beauty is also related to the school swallowing up the Priory of Saint Martin des Champs (Google translate does a great job if you don’t read French). The Priory is a beautiful old church, founded in 1079. It was home to the last trial by combat the country would see. You can piece together the story between the two pages dedicated to the combatants Jean de Carrouges and Jacques Le Gris.

The final display in the museum is in the church. It holds Foucault’s pendulum, dangling from the center of the sanctuary. If you get there early enough in the day you may get to watch it knock over a peg or two and prove the rotation for yourself.

Rather than the statues of the saints there are statues of the muses of Industrie and Agriculture. The hall is filled with more exhibits. There are cutaway original automobiles. A model of the Statue of Liberty. A catwalk lets you take a high view of the surroundings. It is also beautiful in and of itself. The church is well maintained and painted in the style original to them.

If you find yourself in Paris with a few hours (or days) to spare I highly recommend this museum. Any technical person would be hard pressed to leave uninspired and unawed by the display. It’s good to get a perspective on the past.

Featured Photo CC: Roi Boshi

# How to Run a Pagekite Server to Expose Your Raspberry Pi

Last time I showed you how to expose a web service on a Raspberry Pi (or, actually, any kind of device) by using a reverse proxy from Pagekite. On your Pi, you just need a simple Python script. However, it also depends on the Pagekite server, which isn’t always convenient. There are limits to the free service, and you don’t control the entire thing. The good news is twofold: the same Python script you use to set up the client-side can also set up a server. The other good news is the entire thing is open source.

In practical terms, then, if you have a computer that is always on and has an IP address that can be found on the public internet, you can run your own Pagekite server (they call it a front end) and service your own backends.

# 5 More SuperCon Speakers You Don’t Want to Miss

This morning it is my pleasure to announce five more confirmed speakers for the Hackaday SuperConference. The ultimate hardware conference takes place in just a few weeks: November 5th and 6th in Pasadena, California.

# Expose your Raspberry Pi on Any Network

Everyone’s talking about the Internet of Things (IoT) these days. If you are a long-time Hackaday reader, I’d imagine you are like me and thinking: “so what?” We’ve been building network-connected embedded systems for years. Back in 2003, I wrote a book called Embedded Internet Design — save your money, it is way out of date now and the hardware it describes is all obsolete. But my point is, the Internet of Things isn’t a child of this decade. Only the name is.

The big news — if you can call it that — is that the network is virtually everywhere. That means you can connect things you never would have before. It also means you get a lot of data you have to find a reason to use. Back in 2003, it wasn’t always easy to get a board on the Internet. The TINI boards I used (later named MxTNI) had an Ethernet port. But your toaster or washing machine probably didn’t have a cable next to it in those days.

Today boards like the Raspberry Pi, the Beagle Bone, and their many imitators make it easy to get a small functioning computer on the network — wired or wireless. And wireless is everywhere. If it isn’t, you can do 3G or 4G. If you are out in the sticks, you can consider satellite. All of these options are cheaper than ever before.

## The Problem

What do you do if you want to put a Raspberry Pi, for example, on a network and expose it? If you control the whole network, it isn’t that hard. You usually use some kind of dynamic DNS service that lets the Pi (or any computer) tell a well-known server its current IP address (see figure below).

If there is one instrument that makes an electronic engineer’s bench, it is the oscilloscope. The ability to track voltages in the time domain and measure their period and amplitude is one akin to a light in the darkness, it turns a mere tinkerer with circuits into one in command of them. Straightforward add-on circuits can transform a basic oscilloscope into a curve tracer, frequency response display, and much more, and modern oscilloscopes offer a dizzying array of useful measurement features unimaginable to engineers only a few years ago. And I need your help to pick a new one.

# Grinding Gears: Figuring Out The Ratio

Practically any combination of motor and gearbox can be mathematically arranged to fit all sorts of problems. You could lift a crane with a pager motor, it just might take a few hundred years. However, figuring out exactly what ratio you need can feel bit backwards the first time you have to do it.

A gear is nothing more than a clever way to make two circles rotate in concert with each other as if they were perfectly joined at their circumferences. Rather than relying on the friction between two rotating disks in contact, the designer instead relies on the strength of a gear tooth as the factor limiting the amount of torque that can be applied to the gear.

Everything is in gearing is neatly proportional. As long as your point of reference is correct, and some other stuff. Uh, it gets easier with practice.

$\frac{radius_1}{radius_2} = \frac{velocity_1}{velocity_2} = \frac{tangentialforce_1}{tangentialforce_2} = \frac{torque_1}{torque_2}$

Now as my physics professors taught me to do, let’s skip the semantics and spare ourselves some pedantics. Let us assume that all gears have a constant velocity when you’ve averaged it all out. Sure there is a perceptible difference between a perfect involute and a primitive lantern gear, but for the sake of discussion it doesn’t matter at all. Especially if you’re just going to 3D print the thing. Let’s say that they’re sitting on perfect bearings and friction isn’t a thing unless we make it so. Also we’ll go ahead and make them perfectly aligned, depthed, and toleranced.

Typically, a gearbox is used for two things. You have a smaller torque that you’d like to make into a bigger one or you have one rotational velocity that you’d like to exchange for another.  Typically torque is represented with a capital or lowercase Tau (Ττ) and rotational velocity likes to have a lowercase omega (ω). It also doesn’t matter at all; it just makes your equations look cooler.

Now a lot of tutorials like to start with the idea of rolling a smaller circle against a bigger one. If the smaller circle is a third as large as the big one, it will take three rotations of the small circle to make the big one rotate twice.  However, it is my opinion that thinking it in terms of the force applied allows a designer to think about the gearing more effectively.

If the friction between the two surfaces of the circle is perfect, then any force applied tangentially to one of the circles will result in a perfectly perpendicular and equal force to the other circle at the point of contact between the two. Midway through writing the preceding sentence I began to understand why textbooks are so abstruse, so I also drew a picture. This results in two equations.

$\tau_1 = F * r_1$

$\tau_2 = F * r_2$

Now, when you have a force perpendicular to the line drawn to describe the radius, the equation for torque becomes really simple.

Multiply the length of the “lever arm”, “radius”, etc. by the force to get the preceding equations. Make sure to include the units.

You should end up force-unit * length-unit. Since I usually work in smaller gears I like to use N * mm. American websites typically use oz-in to rate motors. It is technically ozf-in (ounce-force), but the US customary system has a fetish for obtuseness.

We can make some observations. The smaller gear always sees less torque at its center. This initially seemed a bit counter-intuitive to me. If I’m using a cheater bar to turn a bolt the longer I make the bar the more torque I can put on the bolt. So if I touch the outside of a really large gear I should be seeing a ton of torque at the center of a small gear rotating along with it. However, as we mentioned before, any torque applied on the outside of the larger gear is seen equal and tangential on the smaller. It’s as if you’re touching the outside of the small gear. The torque has to be smaller.

This is why you have to pedal so much harder when the rear sprocket on a bicycle gets smaller.  Each time you make the sprocket smaller you shrink the torque input into the wheel. If the perpendicular output where the wheel hits the ground is <input from the small gear> / <radius of the wheel> then it’s obvious why this happens.

It’s also important to note that any time you increase the torque, the speed of the gears slow by the same proportion. If you need 60 N*m out of a motor that can give 20 N*m and you use a 3:1 gearbox to do it. If the motor previously ran at 30 rpm it’s now running at 10 rpm.

Let’s jump right into an example. Let’s say you want to make a device that automatically lifts your window blinds. You’ve got some junk and a 3D printer.

Now you’ve taken a spring scale and pulled until the shutter moves and you know you need 10 lbs. of pull to get the blinds to pull up. To make it easy on yourself you multiply this number by two so you know you need exactly 20 lbs of force to pull the curtain up. Then to make it really easy on yourself convert it all to Newtons. It’s approximately 90 N.

Now you don’t really care how fast the blinds pull up, but you go ahead and pull them up yourself. You get the feeling that the blinds won’t appreciate being lifted faster than the whole range in two seconds. You personally don’t care if takes ten seconds to, but you’d like it not to take too long.

You also measure the length of string pulled out to raise the blinds. It’s 1.2 meters.

Lastly, you only have one spare power supply and a matching motor left in your entire laboratory after you followed the advice in a Hackaday article. Cursing the day the author was born, you sullenly write down the last specifications. You’ve got one of those cheap GM9 gear motors. 5 V, 66 rpm, and 300 N*mm. You damn him as you think fondly of your mountain of windshield washer motors and 80 lb server rack power supplies that you tossed out.

To start with, you do some experiments with a pulley. You arbitrarily pick, 3D print, and find that a 100 mm in diameter pulley seems to wind it up nicely by hand. By the end of the winding the outside diameter of the string is 110 mm. So you use the torque equations above. You find that at the end of the rotation, if you attach the motor directly, there is only 5.45 N of force being applied to the string. Not nearly enough.

So, since you know everything is more or less proportional, you divide 90 N / 5.45 N, and arrive at an answer of 17. So, at a minimum for every turn of the pulley you need 17 turns of the motor to get the torque needed.

That would be okay, but it messes with our other specification. At a 17:1 ratio, it will take our 66 rpm motor pretty close to a minute to wind the blinds up.

This is a moment for some pondering. Make a coffee. Maybe go write a relaxing comment to a Hackaday writer listing their various flaws, perceived and true, in excruciating detail.

What if you wound the string up on a closet rod? Those are only about 30 mm in diameter. You take a bit of rod and wind it up. It seems to work and since it’s wider the string only ends up adding 5 mm to the final diameter. You rework the calculation and find that in this case you only need a ratio of 6! Yes.

Now some of you who have done this before are likely gnashing your teeth, or more likely already down in the comments. Unfortunately it’s all proportional. While you only need a ratio of 6:1 now, nearly a third. You also need to rotate the pulley approximately three times as much to pull the same length of cord.

Sometimes you can’t win. In this case the only solution is to order a new motor. You look online for a bit and realize that one of the 12 V motors you threw away last week would work perfectly for this. You wouldn’t even need a gear box. You could attach it straight to the pulley. You look around your perfectly clean and orderly garage and feel empty.

However, just for fun you build a 6:1 gearbox anyway. It’s a hack after all.

Cover photo of the hilariously complicated Do Nothing Machine credit to the Joe Martin Foundation.