AI Watches You Sleep; Knows When You Dream

If you’ve never been a patient at a sleep laboratory, monitoring a person as they sleep is an involved process of wires, sensors, and discomfort. Seeking a better method, MIT researchers — led by [Dina Katabi] and in collaboration with Massachusetts General Hospital — have developed a device that can non-invasively identify the stages of sleep in a patient.

Approximately the size of a laptop and mounted on a wall near the patient, the device measures the minuscule changes in reflected low-power RF signals. The wireless signals are analyzed by a deep neural-network AI and predicts the various sleep stages — light, deep, and REM sleep — of the patient, negating the task of manually combing through the data. Despite the sensitivity of the device, it is able to filter out irrelevant motions and interference, focusing on the breathing and pulse of the patient.

What’s novel here isn’t so much the hardware as it is the processing methodology. The researchers use both convolutional and recurrent neural networks along with what they call an adversarial training regime:

Our training regime involves 3 players: the feature encoder (CNN-RNN), the sleep stage predictor, and the source discriminator. The encoder plays a cooperative game with the predictor to predict sleep stages, and a minimax game against the source discriminator. Our source discriminator deviates from the standard domain-adversarial discriminator in that it takes as input also the predicted distribution of sleep stages in addition to the encoded features. This dependence facilitates accounting for inherent correlations between stages and individuals, which cannot be removed without degrading the performance of the predictive task.

Anyone out there want to give this one a try at home? We’d love to see a HackRF and GNU Radio used to record RF data. The researchers compare the RF to WiFi so repurposing a 2.4 GHz radio to send out repeating uniformed transmissions is a good place to start. Dump it into TensorFlow and report back.

Continue reading “AI Watches You Sleep; Knows When You Dream”

4.4 GHz Frequency Synthesis Made Easy

How hard is it to create a synthesizer to generate frequencies between 35 MHz to 4.4 GHz? [OpenTechLab] noticed a rash of boards based on the ADF4351 that could do just that priced at under $30. He decided to get one and try it out and you can find his video results below.

At that price point, he didn’t expect much from it, but he did want to experiment with it to see if he could use it as an inexpensive piece of test gear. The video is quite comprehensive (and weighs in at nearly an hour and a half). It covers not just the device from a software and output perspective but also talks about the theory behind these devices.  [OpenTechLab] even sniffed the USB connection to find the protocol used to talk to the device. He wasn’t overly impressed with the performance of the board but was happy enough with the results at the price and he plans to make some projects with it.

Continue reading “4.4 GHz Frequency Synthesis Made Easy”

Real World RF Filter Design And Construction

We bet when [devttyS0] made his latest video about RF filter design (YouTube, embedded below), he had the old saying in mind: in theory, there’s no difference between theory and practice, but in practice, there is. He starts out pointing how now modern tools will make designing and simulating any kind of filter easy, but the trick is to actually build it in real life and get the same performance. You can see the video below.

One of the culprits, of course, is we tend to design and simulate with perfect components. Wires have zero resistance, capacitance, and inductance. Inductors and capacitance have no parasitic elements in our rosy design world. Even the values of components will vary from their ideal values and may change over time.

Continue reading “Real World RF Filter Design And Construction”

PCB Design Guidelines To Minimize RF Transmissions

There are certain design guidelines for PCBs that don’t make a lot of sense, and practices that seem excessive and unnecessary. Often these are motivated by the black magic that is RF transmission. This is either an unfortunate and unintended consequence of electronic circuits, or a magical and useful feature of them, and a lot of design time goes into reducing or removing these effects or tuning them.

You’re wondering how important this is for your projects and whether you should worry about unintentional radiated emissions. On the Baddeley scale of importance:

  • Pffffft – You’re building a one-off project that uses battery power and a single microcontroller with a few GPIO. Basically all your Arduino projects and around-the-house fun.
  • Meh – You’re building a one-off that plugs into a wall or has an intentional radio on board — a run-of-the-mill IoT thingamajig. Or you’re selling a product that is battery powered but doesn’t intentionally transmit anything.
  • Yeeeaaaaahhhhhhh – You’re selling a product that is wall powered.
  • YES – You’re selling a product that is an intentional transmitter, or has a lot of fast signals, or is manufactured in large volumes.
  • SMH – You’re the manufacturer of a neon sign that is taking out all wireless signals within a few blocks.

Continue reading “PCB Design Guidelines To Minimize RF Transmissions”

Michael Ossmann Makes You An RF Design Hero

To a lot of people, radio-frequency (RF) design is black magic. Even if you’ve built a number of RF projects, and worked your way through the low-lying gotchas, you’ve probably still got a healthy respect for the gremlins lying in wait around every dimly-lit corner. Well, [Michael Ossmann] gave a super workshop at the Hackaday Superconference to give you a guided tour of the better-illuminated spaces in RF design.

five_rules[Michael] is a hacker-designer, and his insights into RF circuit design are hard-won, by making stuff. The HackRF One is probably his most famous (and complex) project, but he’s also designed and built a number of simpler RF devices. And the main point of his talk is that there’s a large range of interesting projects that are possible without getting yourself into the fringes of RF design (which require expensive test equipment, serious modelling, or a Ph.D. in electro-wavey-things).

You should watch [Mike]’s workshop which is embedded below. That said, here’s the spoilers. [Mike] suggests five rules that’ll keep your RF design on the green, rather than off in the rough.

Continue reading “Michael Ossmann Makes You An RF Design Hero”

Radio Receiver Build Log And More

At Hackaday, we like to see build logs, and over on Hackaday.io, you can find plenty of them. Sometimes, though, a builder really outdoes themselves with a lot of great detail on a project, and [N6QW’s] Simple-Ceiver project certainly falls into that category. The project logs document many different stages of completeness, and we linked the first one for you as a starting point, but you’ll definitely want to read up to the present. (There were 16 parts, some spanning multiple posts, last time we checked).

It is definitely worth the effort though. The project started out as a direct conversion receiver, but the design goes through and converts it into a superheterodyne receiver. Along the way, [N6QW] shares construction techniques, design advice, and even simulation plots (backed up with actual scope measurements). The local oscillator, of course, uses an Arduino and an AD9850 synthesizer.

Continue reading “Radio Receiver Build Log And More”

Android And Arduino RF Outlet Selector

ardAndRFoutlets

Cyber Monday may be behind us, but there are always some hackable, inexpensive electronics to be had. [Stephen’s] wireless Android/Arduino outlet hack may be the perfect holiday project on the cheap, especially considering you can once again snag the right remote controlled outlets from Home Depot. This project is similar to other remote control outlet builds we’ve seen here, but for around $6 per outlet: a tough price to beat.

[Stephen] Frankenstein’d an inexpensive RF device from Amazon into his build, hooking the Arduino up to the 4 pins on the transmitter. The first step was to reverse engineer the communication for the outlet, which was accomplished through some down and dirty Arduino logic analyzing. The final circuit included a standard Arduino Ethernet shield, which [Stephen] hooked up to his router and configured to run as a web server. Most of the code was borrowed from the RC-Switch outlet project, but the protocols from that build are based on US standards and did not quite fit [Stephen’s] needs, so he turned to a similar Instructables project to work out the finer details.

Stick around after the break for a quick video demonstration, then check out another wireless outlet hack for inspiration.

Continue reading “Android And Arduino RF Outlet Selector”