It’s not every day that the mayor of a major city hails the installation of a vending machine. But the automated dispenser that has just debuted in Boston is likely to merit the fanfare.

At a time when bike-sharing programs are among the hottest trends around the world, this machine promises to solve a vexing and potentially dangerous problem by finally letting riders not only check out bicycles from kiosks to commute, ride across town, or sightsee, but also to cheaply rent the helmets they need to protect themselves from traffic.

Short-term bike rental programs have been sprouting in cities across the country since Washington D.C. launched the nation’s first large-scale urban network in 2008, with 34 now in operation—not including countless more on university campuses. That’s just a fraction of the 535 bike-sharing programs worldwide, according to the Earth Policy Institute, which collectively loan out an estimated half-million bicycles in cities, on campuses, and at resorts.

Trouble is, more than four out of five people who borrow bike-share bikes don’t wear helmets, according to a study of cyclists in Washington and Boston by the Harvard-affiliated Beth Israel Deaconess Medical Center—increasing by an estimated 88 percent the likelihood that they will suffer head injuries if they’re in an accident, compared to riders who do, the researchers said. But figuring out a way to make helmets easily available has taken years, and even when planners in Boston thought they had it solved, a last-minute glitch caused another two-month delay.

So while the fast-growing bike-share programs may cut down on traffic and emissions, they’ve created another problem: millions of cyclists riding around on city streets worldwide with unprotected heads.

“It’s been a huge frustration,” says Andy Clarke, president of the advocacy organization the League of American Bicyclists. “The beauty of bike-share is that it’s simple, quick and intuitive to grab a bike and ride,” Clarke says. “To worry about whether you can find a helmet or not, it takes the spontaneity out of the process. So it’s been a real hindrance” not having a way to offer helmets easily and cheaply.

In some cities, this has proven more than just an inconvenience. A bike-share program in aggressively green Vancouver was thwarted for years by a British Columbia law requiring cyclists of all ages to wear helmets. In Melbourne and Brisbane, Australia, which also require helmets by law, the bike-share programs were so underused that the government gave away 200 helmets for free.

Hunting for a better solution, planners have toyed with the idea of inflatable helmets, foldable helmets, and rental helmets with plastic liners for each new user. None worked out. What bike-share programs really needed was a vending machine from which users could rent helmets at the same location where they borrowed bikes.

“It was always clear what the solution should be,” says Nicole Freedman, Boston’s bicycle coordinator. So two years ago, Freedman brought that challenge to an MIT class in mechanical engineering.

The obstacles were numerous: helmets are an awkward shape, and hard to stack, and people don’t like putting things on their heads that have previously been on other people’s heads. And while it was possible to sanitize the helmets using intense heat, which requires a lot of energy, Boston’s machines would have only a limited amount of power from solar panels, which they need to run the credit-card scanners.

The toughest obstacle, surprisingly, was figuring out a way for users to return the helmets. An open receptacle on a city street might attract trash. So the designers came up with the idea of putting RFID, or radio-frequency identification chips, in loaner helmets, which activate a door on the machine. They will then be picked up, cleaned, and rented out again.

“Being able to design a low-power, compact dispensing mechanism that could handle the supply of helmets was a major engineering challenge,” says Chris Mills, one of the MIT students who was assigned the project and decided to keep working on it after graduating last year.

“This is the kind of stuff we love to do,” Mills says. “Many, many prototypes were made. Lots of chalk and coffee was consumed.” The designers kept helmets around their workspace, he says, to put on and literally bang their heads against the wall.

The eventual result was the HelmetHub, which was initially planned to be attached to four of Boston’s 130 Hubway bike-share stations where the Beth Israel Deaconess researchers found riders were least likely to wear helmets. Ten more have been ordered, at a cost of more than $10,000 apiece. Each can hold 36 unisize helmets with adjustable straps. A 24-hour rental will cost $2 on a credit card.

Proving just how complicated this was, problems with the credit-card reader caused a two-month delay in the launch, just hours before Boston Mayor Tom Menino was to appear at a ribbon-cutting ceremony for the machines in September.

And when what the city says is the nation’s first helmet dispenser finally debuted at Massachusetts Avenue and Boylston Street this week, the observance was limited to a written statement from the mayor while planners set about using the lone machine to do real-world tests of the technology through the rest of the Boston bicycle season, which ends around Thanskgiving. They’ve already discovered that, in some locations, the return slot in the back of the device may be blocked by walls or fences.

“When you put something on the street, it’s got to work, and it’s got to work from the start,” says Freedman.

Still, says Mills, “There was nothing like this in the world, and now we’re happy to have something that works.” The HelmetHub, echoes Freedman, is “a huge step forward.”

It’s also potentially hugely lucrative. Vancouver has already inspected a prototype, according to that city’s manager of streets activities, Scott Edwards. There has been interest from companies that supply bike-share bikes. And there are applications for the same technology at ski resorts and for mountain-climbing, Clarke says.

“I don’t think there’s been a visible market for it in a way bike-sharing has clearly created,” he says. “But I don’t think I would stop at bikes.”

Mills and Breanna Berry, his fellow MIT graduate and business partner, have found investors and gotten manufacturing advice from Big Belly Solar, a Massachusetts company that makes solar-powered public trash compactors.

“This vending machine idea could be big,” says Jim Sebastian, “active transportation manager” for Washington, D.C., whose Capital Bikeshare program gave bike-sharing its first foothold in the United States just five years ago. “We’re definitely watching the Boston project closely. It could be a big help in getting more helmets on more bike-share users’ heads.”

Chiming in: something like over 90% of fatal bike accidents do not have head trauma as the cause of death. It's usually due to injuries for which there isn't protective gear available (other than... a car of your own)

The best way to enhance cyclist safety is to take measures that ensure that cars never collide with vulnerable road users.

I always recommend wearing a helmet when riding a road-style bike with low handlebars. But severe head injuries are fairly uncommon for upright bike riders not traveling at fast speeds - the typical bikeshare user, because the riding posture is upright and the bikes are extremely heavy. Still wear a helmet if you can, but ride cautiously if one isn't available - it's not a huge concern.

This whole article is based on the idea of a "Big Safety Problem" that doesn't actually exist.

Bike share riding is *safer* than regular bike riding. All bike share programs in the US have an incredible safety record, and fears of inexperienced people riding in the streets and causing chaos were totally unfounded. We should celebrate that fact rather than fearmonger about imaginary problems.

Really. It solves very little. Until there is actual disincentive for driving in an unsafe manner, and "Oh, I didn't see the bicycle/pedestrian." is no longer a free pass for killing someone, helmets will not be able to do much. But I understand the safe feeling it gives cyclists (myself included) and drivers. But helmets will do very little to stop murder by vehicle.

@Average_Joe_PDX Couldn't agree more! This is the same fearmongering that Al Jazeera America brought up in a recent piece about bike share being a 'public safety hazard.' I expect this type of stuff from the NY Post, not Time and Al Jazeera.

@BeverleyStrain I bike and drive often. Driving in an unsafe manor may apply to some drivers but most of the blame goes on bikes as far as I can tell. They often run red lights, they often ignore bike lanes, they often ride bike with headphones in (so they can't hear me coming up from behind them) and they often ride at night with dark clothing and no light. On the biking front my biggest gripe with drivers is parking in the bike lane.

There are good drivers and good bikers out there but I have had several instances in a car where I almost killed a bike only because I didn't see them before they chose to jump out in front of me. The attitude in Boston is "Bikes just do what they want". Maybe it is different where you are.