Take it from sex researcher Nicole Prause: Cobbling together an orgasm detector that works on both men and women ain’t easy. You at least know that it has to go in the anus to detect the muscle contractions that the sexes share, so you begin with a butt plug. Many butt plugs, actually.

“We ordered like 20 of these butt plugs off Amazon, and it messed up my recommendation engine for all time,” Prause says. To the butt plugs Prause added piezoelectric discs, which detect deformation. In the anus the device goes, and voilà: You’ve got a way to uniformly measure the physiology of orgasms.

Alas, a complication: “The device was made for sexual stimulation, so it was sloped both going in and coming out,” Prause says. “Which meant if somebody was masturbating vigorously, it had a tendency to pop out. And it usually popped out at the worst possible time: when the contractions would start.”

Then, salvation! Prause was tweeting her misadventures in tinkering with the device when a stranger in Germany offered his expertise. “I think he does cosplay where sometimes their costumes are very Arduino-intense,” Prause says. “They want their wings to light up or whatever it is. So he had a lot of those hobbyist skills.”

Matt Simon covers cannabis, robots, and climate science for WIRED.

Most importantly, he was skilled in computer-aided design. So the two emailed and Skyped back and forth, iterating on details like the length of the device and the size of the head. Until they landed on the “anal pneumatic base for psychophysiology research,” plans for which are now available on Thingiverse, if you’re inclined to 3D-print one for yourself.

You might be thinking a lot of things at this point, hopefully among them: Why, in 2019, did a sex researcher have to go to such lengths to detect the physiological signals of orgasms? Because this is America, my friend, where the only thing more difficult to research than illicit drugs is sex.

Which is a shame, because with her invention, Prause can explore a range of questions beyond the physiology of the orgasm. This includes direct health problems like postorgasmic illness syndrome, in which men are struck with headaches and fatigue following ejaculation. It might be due to some sort of autoimmune response to ejaculate, or it might have something to do with the number of contractions these men have, which the device can measure.

“We want to make sure there are no distinct qualitative differences between the climaxes of those patients and the control population,” says Prause. “We don't currently have a reason to believe that would be the case, but if there is then that leads us down a very different path.”

Orgasms are also an avenue into researching other maladies. Prause’s work was motivated by looking at pleasure responses in depressed people, for instance. When these folks find something that's pleasant, part of their brain comes online quickly to dampen that experience. “It's like, oh, this puppy is very cute ... and it's going to die some day,” Prause says. Maybe, then, depressed people have a higher threshold for pleasure, and maybe studying orgasms is a way to better understand that. “That is, if we got a pleasure that was intense enough, their brain would not be able to dampen it. They could eat brownies, or they could have an orgasm. We can say, look, they orgasmed—it wasn't going to get any better than that.”

There are, of course, plenty of positives about sex to study too: the benefits of sex education, how orgasms might help people sleep, basically everything awesome about sex. But in the US, that’s not how sex is framed.

“The US has a uniquely religious government,” says Prause. “And so these ‘porn as a public health hazard’ bills have been passing state by state.” Some have even cited Prause’s previous work to back up claims of porn addiction. “And that's exactly the opposite of what we found, but there was no way for me to register my objection because it had already passed Congress. They don't really care.”