Shared posts

06 Mar 19:25

What’s Inside A Neonode Laser Sensor?

by Elliot Williams

Every once in a while, you get your hands on a cool piece of hardware, and of course, it’s your first instinct to open it up and see how it works, right? Maybe see if it can be coaxed into doing just a little bit more than it says on the box? And so it was last Wednesday, when I was at the Embedded World trade fair, and stumbled on a cool touch display floating apparently in mid-air.

The display itself was a sort of focused Pepper’s Ghost illusion, reflected off of an expensive mirror made by Aska3D. I don’t know much more — I didn’t get to bring home one of the fancy glass plates — but it looked pretty good. But this display was interactive: you could touch the floating 2D projection as if it were actually there, and the software would respond. What was doing the touch response in mid-air? I’m a sucker for sensors, so I started asking questions and left with a small box of prototype Neonode zForce AIR sensor sticks to take apart.

The zForce sensors are essentially an array of IR lasers and photodiodes with some lenses that limit their field of view. The IR light hits your finger and bounces back to the photodiodes on the bar. Because the photodiodes have a limited angle over which they respond, they can be used to triangulate the distance of the finger above the display. Scanning quickly among the IR lasers and noting which photodiodes receive a reflection can locate a few fingertips in a 2D space, which explained the interactive part of the floating display. With one of these sensors, you can add a 2D touch surface to anything. It’s like an invisible laser harp that can also sense distance.

The intended purpose is fingertip detection, and that’s what the firmware is good at, but it must also be the case that it could detect the shape of arbitrary (concave) objects within its range, and that was going to be my hack. I got 90% of the way there in one night, thanks to affordable tools and free software that every hardware hacker should have in their toolbox. So read on for the unfortunate destruction of nice hardware, a tour through some useful command-line hardware-hacking tools, and gratuitous creation of animations from sniffed SPI-like data pulled off of some test points.

Cracking Open the Case

In retrospect, it’s probably not necessary to take one of these things apart — the diagrams on the manufacturer’s website are very true to life. Inside, you’ll find a PCB with an IR laser and photodiode every 8 mm, some custom-molded plastic lenses, and a couple of chips. Still, here are the pretty pictures.

The lenses are neat, consisting of a 45-degree mirror that allows the PCB-mounted diodes to emit and receive out of the thickness of the bar. The lasers and photodiodes share lenses, reducing the manufacturing cost. Most of the thin PCB after the first three cells is “empty”, existing just to hold the laser and photodiode chips. It’s a nice piece of hardware.

The chip-on-board ICs aren’t even covered in epoxy — although these boards are marked “prototype” so who knows if this is true of the production units. According to the advertising copy, one of these two chips is a custom ASIC that does the image processing in real-time and the other is a custom STM32 ARM microcontroller. Speculate about which is which in the comments!

The PCB is glued in place under the metal frame, and there are certainly no user-serviceable parts inside. Sadly, some bond wires got pulled loose when I was removing the PCB. When I put this one sensor stick back together, an area near the custom ASIC gets hot. Sacrificed for my idle curiosity! Sigh.

The Basics: The USB Interface

I was given a prototype version of the sensor demo kit, which includes a breakout board for the USB and I2C finger-detection functionalities of the sensors, so of course, I had to test them out. Plugging it in, and typing dmesg showed the “Neonode AirModule 30v” as a USB HID device, which means that figuring everything out about its USB functionality is going to be a cakewalk because all the data it spits out is described in a data descriptor.

I used usbhid-dump to read in the descriptor, and [Frank Zhao]’s excellent descriptor decoder to get it all in plain text. It looks like it’s a standard digitizer that supports six fingers and has a vendor-defined configuration endpoint. Here’s the descriptor dump if you want to play along. Dumps like this are great starting points if you’re making your own USB HID device, by the way. See what functionalities your mouse has.

But frankly, pouring through a descriptor file is hard work. dmesg said the sensor was attached as /dev/usb/hiddev3, so why not see what it’s doing in real-time while I wave my finger around? sudo cat /dev/usb/hiddev3 | xxd takes the raw binary output and passes it through xxd which turns it into a “human-readable” hexdump. (The genius of xxd is the -r flag which turns your edited hexdump back into a binary, enabling 1990’s-era cracking on the command line.) Just by watching the numbers change and moving my finger, I figured out which field represented the finger count, and which fields corresponded to the 16-bit X- and Y-coordinates of each finger. And it’s reporting zeroes for the un-measured fingers, as per the descriptor.

Of course, all of this, as well as the complete specs for the I2C interface are available in the zForce online documentation. The commands are wrapped up in ASN.1 format, which is a dubious convenience. Still, if all you want to do is use these devices to detect fingers over USB or I2C, it’s just a matter of reading some documentation and writing a driver.

Logic Analyzer vs. Test Points

To have a little more fun with these sensor bars, I started poking around the test points exposed on the back of the unit. The set closest to the output connector are mostly duplicates of the pins on the connector itself, and aren’t that interesting. More fun are a constellation (Pleiades?) of seven test points that seem to only be available on the sensor bars that are longer than 180 mm.

One point had a clear 21 MHz clock signal running periodically, and two other lines had what seemed to be 10.5 MHz data, strongly suggesting some kind of synchronous serial lines. Two other pins in this area emitted pulses, probably relating to the start of a sensor sweep and the start of processed data, but that wouldn’t be obvious until I wired up some jumpers and connected a logic analyzer.

I really like the open-source Sigrok software for this kind of analysis. The GUI pulseview makes it fairly painless to explore signals that you don’t yet understand, while switching up to the command-line sigrok-cli for repetitive tasks makes some fairly sophisticated extensions easy. I’ll show you what I mean.

I started off with a Saleae Logic clone, based on the same Cypress FX2 chip. These are a great deal for $5 or so, and the decent memory depth and good Sigrok support makes up for the low 24 MHz sampling rate. That gave me a good overview of the signals and confirmed that the device goes into a low-power scan mode when no fingers are present, and that triggering when pin 5 went low isolated the bulk of the data nicely. But in order to actually extract whatever data was on the three synchronous serial pins, I needed to move up in speed.

The Openbench Logic Sniffer (OLS) will do 100 MHz, which is plenty for this application, but it has a very short 24 k sample memory that it has to relay back to Sigrok over a 115,200 baud serial line. Still, I could just squeeze a full read in at 50 MHz. Using Sigrok’s SPI decoders on the clock and two data lines gave me what looked like good data. But how to interpret it? What was it?

The Command Line, Graphics, and Real-Time Fingerwaving

Getting one capture out of pulseview is easy, but figuring out what that data means required building up a tiny toolchain. The command-line and sigrok-cli to the rescue:

sigrok-cli --driver=ols:conn=/dev/ttyACM3 --config samplerate=50m --samples 20k \
            --channels 0-5 --wait-trigger --triggers 5=0 -o capture.sr  

This command reads from the OLS on the specified serial port, waiting for a trigger when channel 5 goes low and outputs the data in Sigrok’s (zipped) data format.

sigrok-cli -i capture.sr -P spi:clk=0:miso=1:cpha=1 -B spi | tail -c +3 > spi1.bin
sigrok-cli -i capture.sr -P spi:clk=0:miso=2:cpha=1 -B spi | tail -c +3 > spi2.bin

These two commands run the SPI decoders on the acquired data. It’s not necessary to do this in a separate step unless you’d like the output in two separate files, as I did. The -P flag specifies the protocol decoder, and -B tells it to output just the decoded data in binary. Tail aligns the data by dropping the three header bytes.

Now for the real trick: plotting the data, waving my finger around interactively, and hoping to figure out what’s going on. You’d be surprised how often this works with unknown signals.

t=`date +%s`
convert -depth 8 -size 15x45+0 gray:spi1.bin -scale 200 out1_${t}.png
convert -depth 8 -size 15x45+0 gray:spi2.bin -scale 200 out2_${t}.png
convert  out1_${t}.png spacer.png out2_${t}.png +append image_${t}.png
convert  out1_${t}.png spacer.png out2_${t}.png +append foo.png

Convert is part of the Imagemagick image editing and creation toolset. You can spend hours digging into its functionality, but here I’m just taking bytes from a file, interpreting them as grayscale pixels, combining them into an image of the specified dimensions, and scaling it up so that it’s easier to see. That’s done for each data stream coming out of the sensor.

The two are then combined side-by-side (+append) with a spacer image between them, timestamped, and saved. An un-timestamped version is also written out so that I could watch progress live, using eog because it automatically reloads an image when it changes.

Cobbling all of this together yields a flow that takes the data in from the logic analyzer, decodes it into bytes, and turns the bytes into images. That was enough for me to see that I’m capturing approximate position data from (probably) the output of Neonode’s custom ASIC. But why stop there? I turned the whole endeavor into a video by combining the images at 8 FPS:

ffmpeg -r 8 -pattern_type glob -i "image_*.png" \ 
  -c:v libx264 -vf fps=8 -pix_fmt yuv420p finger_hand_movie.mp4

That’s me moving my finger just above the bar’s surface, and then out of range, and then moving one hand, and then both around in the frame. The frames with less data are what it does when nothing is detected — it lowers the scanning rate and apparently does less data processing. You can also see the reason for picking the strange width of 15 pixels in the images — there are 30 photodiodes in this bar, with data for 15 from one side apparently processed separately from the 15 on the other. Anyway, picking a width of 15 makes the images wrap around just right.

There’s a bunch of data I still don’t understand. The contents of the header and the blob that appears halfway down the scan are still a mystery. For some reason, the “height” field on the bottom side of the data is reversed from the top side — up is to the right in the top half and the left in the lower half.

But even with just what I got from dumping SPI data and plotting it out, it’s pretty apparent that I’m getting the post-processed X/Y estimate data, and it has no problems describing the shapes of simple objects, at least like the flat palm of my hand. It’s a lot richer dataset than I got from just the default finger sensor output, so I’ll call the hack a success so far. Maybe I’ll put a pair of these in a small robot, or maybe I’ll just make a (no-)touch-pad for my laptop.

Regardless, I hope you had as much fun reading along as I did hacking on these things. If you’re not a command-line ninja, I hope that I showed you some of the power that you can have by simply combining a bunch of tools together, and if you are, what are some of your favorite undersung data analysis tools like these?

06 Mar 19:25

This Cheap, Playable Smartphone Case Is Triggering my Eternal Love For the Game Boy

by Andrew Liszewski

As an avid portable gamer, you might assume smartphones, and their app stores filled with million of titles, would be my ideal device. But part of me still yearns for physical buttons to mash, like my beloved Game Boy had. That’s probably why I find this case that puts a bunch of basic video games on the back of a…

Read more...

31 Jan 17:10

MEEELLIONs of Brits stick with current broadband provider rather than risk no Netflix

Switching suppliers could save people of UK £327m a year

Millions of Brits would rather pay through the nose for services via their existing broadband provider than switch suppliers and risk a prolonged period without access to the web, a poll has found.…

02 Oct 15:17

Release of 'Bulletproof Love' Proves We Need a Luke Cage Soundtrack

by Beth Elderkin on io9, shared by Rhett Jones to Gizmodo

It wouldn’t be ‘tis the season of Luke Cage without some Sweet Christmas songs. Marvel has released Adrian Younge and Ali Shaheed Muhammad’s dynamic track, “Bulletproof Love” (featuring Method Man), but the thirst has not been quenched. We need a full soundtrack.

Read more...

12 Jul 19:06

IIHS study finds that small SUVs have terrible headlights

by Joel Patel

Filed under: Videos,Safety,SUV

Small SUVS may be practical and stylish, but the IIHS has found that the vehicles have deplorable headlights.

Continue reading IIHS study finds that small SUVs have terrible headlights

IIHS study finds that small SUVs have terrible headlights originally appeared on Autoblog on Tue, 12 Jul 2016 14:01:00 EDT. Please see our terms for use of feeds.

Permalink |  Email this |  Comments
01 Jul 15:24

In Madagascar, pineapple jokes are a form of dangerous, soon-to-be-banned dissent

by Cory Doctorow

Ananas-Mg-2

Madagascar, one of the world's poorest nations, is led by president Hery Rajaonarimampianina, who infuriated his people by insisting that the economy was doing well and that naysayers couldn't "provide evidence that the country was getting poorer." (more…)

24 Oct 16:21

Three Uses for Instagram That Don't Involve Photo Sharing

by David Nield on Field Guide, shared by Maddie Stone to Gizmodo

Instagram keeps on adding users and adding features , but there’s more to the app than sharing photos and wondering which filter is going to bring out the best in your latest collection of beach shots. Here are three alternative ways of using Instagram you may not have come across before.

Read more...

14 Jul 16:34

America's transgender military ban to be phased out

by Andrea James
torbakhopper

U.S. Secretary of Defense Ash Carter released a statement today confirming that America's "current regulations regarding transgender service members are outdated and are causing uncertainty that distracts commanders from our core missions." Read the rest

02 Jan 15:25

Consider Inflation if You’re Still Scared of Investing

by Kristin Wong

Consider Inflation if You’re Still Scared of Investing

Investing is an important part of building wealth, but it can be intimidating. There's a lot to learn, there's upfront work, and then you have to worry about the risk. If you've been putting it off for these reasons, consider what inflation is doing to your nest egg.

Read more...

02 Oct 16:28

From 53 kilobytes of RAM in 1953

by Samuel Arbesman
From 53 kilobytes of RAM in 1953

“In March of 1953 there were 53 kilobytes of high-speed random-access memory on planet Earth.” This line from George Dyson’s Turing’s Cathedral makes it clear how far we have come since computing’s dawn. My own laptop now has more than 100,000 times the RAM of the entire planet less than a century ago. While I […]

The post From 53 kilobytes of RAM in 1953 appeared first on WIRED.








01 Sep 18:14

Physicist shows why your WiFi sucks in that one room

by Steve Dent
If WiFi can track a heartbeat through walls, why can't I get internet in my corner bathroom? Jason Cole was trying to figure that out too, but unlike me, he's a PhD student in physics. So he mapped his own apartment and assigned refraction values to...
31 Jul 16:17

Michigan Man Crashes Into Empty House Filled With Bees, Dies

by Aaron Foley on Jalopnik Detroit, shared by Damon Lavrinc to Jalopnik

Michigan Man Crashes Into Empty House Filled With Bees, Dies

Some tragic news from Michigan today, as police investigate a man who apparently lost control of his car, drove into a vacant home filled with swarms upon swarms of bees and later died from his injuries, according to a local report.

Read more...

11 Jul 20:36

MIT Thinks Lighting Drones Could Be the Perfect Photography Assistants

by Andrew Liszewski

MIT Thinks Lighting Drones Could Be the Perfect Photography Assistants

If you've ever been to a photography set, you've probably noticed how much time the photographer and their assistants take to perfectly position the lighting—only to have their efforts foiled when the model moves. That's why researchers at MIT are proposing using drones as lighting, as they can constantly ensure they're always in the perfect spot.

Read more...

28 May 07:17

Why You Shouldn't Use Spreadsheets For Important Work

by Soulskill
An anonymous reader writes "Computer science professor Daniel Lemire explains why spreadsheets shouldn't be used for important work, especially where dedicated software could do a better job. His post comes in response to evaluations of a new economics tome by Thomas Piketty, a book that is likely to be influential for years to come. Lemire writes, 'Unfortunately, like too many people, Piketty used spreadsheets instead of writing sane software. On the plus side, he published his code on the negative side, it appears that Piketty's code contains mistakes, fudging and other problems. ... Simply put, spreadsheets are good for quick and dirty work, but they are not designed for serious and reliable work. ... Spreadsheets make code review difficult. The code is hidden away in dozens if not hundreds of little cells If you are not reviewing your code carefully and if you make it difficult for others to review it, how do expect it to be reliable?'"

Share on Google+

Read more of this story at Slashdot.








18 Apr 10:18

This pizza cake can change civilization FOREVER

by Jesus Diaz on Sploid, shared by Casey Chan to Gizmodo

This pizza cake can change civilization FOREVER

This is not something you can buy yet but—come this summer—you may be able to order Boston Pizza's Pizza Cake, a clear sign of the demise of our civilization, which apparently has been replaced by a bunch of reckless individuals with no sense of what's good or evil.

Read more...

30 Mar 11:50

An Hour With Adam Savage

by Chris Higgins

Adam Savage, cohost of MythBusters, gave the keynote address at this year's SXSW Interactive Conference. His topic was "Art and Science," and the speech is fantastic. But where it really gets fun is twenty minutes into the video, when he sits down with Norm Chan (of Tested.com) for an extended Q&A. Block out 54 minutes, get some popcorn, and enjoy.

My favorite part: a series of MythBusters anecdotes starting around 41:30, including Jamie getting drunk in a gutter and then attempting to instruct a blind man how to drive. (For science, of course.) Also, Savage discusses the running-versus-walking-in-the-rain myth, and the YouTube comments go nuts.

March 29, 2014 - 9:00am
09 Mar 08:44

$2,400 'Introduction To Linux' Course Will Be Free and Online This Summer

by timothy
kc123 writes "Earlier this week, The Linux Foundation announced that it would be working with edX, a non-profit online learning site governed by Harvard and MIT, to make its "Introduction to Linux" course free and open to all. The Linux Foundation has long offered a wide variety of training courses through its website, but those can generally cost upwards of $2,000. This introductory class, which usually costs $2,400, will be the first from the Linux Foundation to run as a Massive Open Online Course (MOOC)."

Share on Google+

Read more of this story at Slashdot.








01 Feb 19:14

Finnish Hacker Isolates Helicopter GPS Coordinates From YouTube Video Sounds

by Soulskill
An anonymous reader sends a post by Finnish electronics hacker Oona Räisänen, who heard a mysterious digital signal in the audio accompanying a YouTube video of a police chase. The chase was being filmed by a helicopter. Räisänen wrote: "The signal sits alone on the left audio channel, so I can completely isolate it. Judging from the spectrogram, the modulation scheme seems to be BFSK, switching the carrier between 1200 and 2200 Hz. I demodulated it by filtering it with a lowpass and highpass sinc in SoX and comparing outputs. Now I had a bitstream at 1200 bps. ... The bitstream consists of packets of 47 bytes each, synchronized by start and stop bits and separated by repetitions of the byte 0x80. Most bits stay constant during the video, but three distinct groups of bytes contain varying data." She guessed that the data was location telemetry from the helicopter, so she analyzed it to extract coordinates. When she plotted them and compared the resulting curve to the route taken by the fleeing car in the video, it was a match.

Share on Google+

Read more of this story at Slashdot.








29 Jan 17:31

How Good Data Makes Transit Feel More Efficient—Even When It's Not

by Alissa Walker

How Good Data Makes Transit Feel More Efficient—Even When It's Not

I tried a little experiment the other day—and I'm not sure why I hadn't tried it before. Before I walked to the bus stop to go downtown, I checked the real-time arrivals for my stop. It turned out the bus wasn't coming for another 11 minutes, so I did the dishes first and only then left the house. The bus arrived when it said it would, and I was on my way.

Read more...

20 Sep 15:15

Grumpy cat wants a gnu Internet

by Cory Doctorow


Hugh sez, "EFF'r Parker Higgins tells me this sign was at a rally he spoke at in Berlin recently."

Grumpy Cat builds a GNU Internet [Frerk Meyer/CC BY-SA]

(Thanks, Hugh!)

    






10 Aug 23:29

If you have not tried eggplant fries, you just...

by fromcalculustocupcakes



If you have not tried eggplant fries, you just have to try these! They are super delicious!

(Want more? See Tasteologie and NOTCOT.com)
01 Aug 22:47

Make Two-Ingredient Pizza Dough for a Fresh Pie When You Want It

by Adam Dachis

Make Two-Ingredient Pizza Dough for a Fresh Pie When You Want It

We love two-ingredient recipes because you can make awesome food quick and easily. We've made ice cream, but you can make it a party with pizza. This incredibly simple pizza dough recipe only requires self-rising flour and Greek yogurt for a fresh pie in minutes.

Read more...

31 Jul 23:28

Vanilla Rum Panna Cotta with Rum Roasted Cherries

by lifesafeast



Vanilla Rum Panna Cotta with Rum Roasted Cherries

(Want more? See Tasteologie and NOTCOT.com)
18 Jul 22:41

Here's the New Lego Back to the Future Set

by Jesus Diaz on LEGO, shared by Raphael Orlove to Jalopnik

Here's the New Lego Back to the Future Set

This is the back of the box of the Lego Back to the Future set, which I got last week. While I'm still disappointed with how they made the hood, it's still a nice set. That car's front is easily fixable if you get some extra pieces—and the third movie's car actually looks nice.

Read more...

08 Jul 19:09

Every Public Sculpture Should be a Full-Size Chrome T-Rex

by Eric Limer

Every Public Sculpture Should be a Full-Size Chrome T-Rex

Every public, abstract sculpture in the world suddenly seems super lame. Why? Because right now there's a full-scale, blinged-out Tyrannosaurus Rex standing over the Seine in Paris. Nothing will ever be the same again.

Designed and constructed by French artist Philippe Pasqua, the 'saur is made up of 350 chrome-molded bones and stands 12 feet tall, and 21 feet long. As for why it's there, the answer appears to be pretty simple: because it's awesome, and because contemporary art along the Seine is good for getting tourists stoked about taking boat rides.

But whatever the reason, it's just good to know that somewhere, there is a chrome T-Rex looming over passers-by. Now we just need to put one in every city. [Philippe Pasqua via Designboom]

Every Public Sculpture Should be a Full-Size Chrome T-Rex

07 Jul 19:10

The Rockwell Integrated Space Plan (Vector Redux Version)

by Sean Michael Ragan
Ron Jones' Rockwell International Integrated Space Plan, color-coded by Dr. Nicolas Ray.  Don't like the color scheme? Download the vector art and add your own!Ron Jones' famous infographic, now 100% as beautiful and inspiring at less than 1% of the file size, thanks to Caltech's Dr. Nicolas Lee. Hooray, vector art!

Read more on MAKE

26 Jun 17:27

Cray X-MP Simulator Resurrects Piece of Computer History

by timothy
An anonymous reader writes "If you have a fascination with old supercomputers, like I do, this project might tickle your interest: A functional simulation of a Cray X-MP supercomputer, which can boot to its old batch operating system, called COS. It's complete with hard drive and tape simulation (no punch card readers, sorry) and consoles. Source code and binaries are available. You can also read about the journey that got me there, like recovering the OS image from a 30 year old hard drive or reverse-engineering CRAY machine code to understand undocumented tape drive operation and disk file-systems."

Share on Google+

Read more of this story at Slashdot.



25 Apr 16:10

Barbecue WIN

barbecue,Steampunk,custom,DIY,train,g rated,win

Submitted by: (via Neatorama)

Tagged: barbecue , Steampunk , custom , DIY , train , g rated , win
22 Mar 07:05

Bakery automation mixes single cookies

by Mike Szczys

bakery_automation

[Ben Krasnow's] latest project is a delicious one. In the image above he’s showing off the beginnings of his cookie dispenser. No, it’s not another take on a way to eat Oreo cookies. It actually comes much earlier in the production chain. His device is akin to a 3D printer for baked goods in that it will be able to automatically combine raw ingredients to form production runs as small as a single serving of cookie dough.

When we first heard about it we wondered why you would want to bake just one cookie? But of course that’s not the purpose at all. The machine will allow you to bake a full sheet of cookies, but provides the option of making each one of them with a different recipe. As with all baking, combining ingredients in the proper proportions is paramount. In the post linked at the top he’s working on a butter dispenser. But in an earlier post he hacked an electronic scale to help weigh other ingredients. You can watch both video clips after the break.

Imaging a dozen cookies with slightly different amounts of flour in them. A few test sheets and he should be able to dial in the very best recipes.


Filed under: cnc hacks, cooking hacks
19 Mar 07:08

Compulsory upgrades to Windows 7 SP1 will start rolling out tomorrow

by Zachary Lutz

Compulsory upgrades to Windows 7 SP1 will start rolling out tomorrow

If you're a Windows 7 user and you've been dragging your heels when it comes to that Service Pack 1 upgrade, then prepare to get an extra dose of encouragement from Microsoft. Starting tomorrow, the company will begin deploying SP1 via Windows Update to all neglected PCs, and just so you're aware, the update won't require your consent. The push will happen a phased rollout over the next few weeks, and as for the consequence of not upgrading, Microsoft will no longer support Windows 7 RTM as of April 9th. Naturally, PCs that are managed by system admins can be shielded from the deployment, but for everyone else, it seems that you'd best prepare for the inevitable.

Filed under: Software, Microsoft

Comments

Via: TNW

Source: Microsoft