Project X-Ray

Two of our Hybris Labs prototypes need a tag-to-YaaS mapping. Infinite Cart  uses NFC (Near field communication) where the Tag ID is mapped as product code (SKU number). For the Changing Room prototype we are using RFID (Radio-frequency identification) tags. When we started with this prototype you had to hold a RFID tag near an RFID scanner and then had to check the log files to find its ID.

With the RFID Action Reader, which we’re also using for our Expose prototype, you can read the RFID ID on a Raspberry Pi. But I also built a custom made Arduino Shield with an Indy RS500 chip (from Impinj), which sends the the RFID value via USB port. This made life much easier and gave me the idea for Project X-Ray. Continue reading

Andreas, no Lego this time?

The last time I asked Andreas what on earth he was doing, his desk was full of Lego. Quite a valid question in that case. The result of this work is called Augmented Commerce.

This time things look a little more ‘conservative’…

IMG_2629 1

…but still: “Andreas, what technology are you just working on?”

“I’m working with some old friends of hybris labs: a Raspberry Pi and an Arduino. And of course we have the usual suspects like Neopixel rings and so on…  But this time we’re also trying to connect to YaaS.”

“Ok, now what connects to what? What does what and why?”

“The Raspberry Pi does the talking to the YaaS platform, taking control of the whole process. And the Arduino is responsible for the hardware stuff, like LED’s and proximity sensor. This time we’re also using a coin slot which is kind of new. Basically, we’re trying to enable the customer to pay on the YaaS platform with coins.”

“So, we’re building a smart vending machine…”

“I wouldn’t call it that, because it can be more. The idea is that you can connect anything to what we’re building here. We’re not providing a complete vending machine, but only the YaaS-connection. You have your front end through which you can pay and interact with this device, but it’s only the interface of YaaS. What you connect it to in the end is up to you.”

“Apart from lights flashing when I throw in a coin, what else happens? There’s something going on with NFC or RFID, right?”

“At the moment it’s RFID (developer language for: ‘I’ve got no idea if this is going to work. It could be anything at the end. RFID, NFC, telepathy…’). The idea was that somehow you have to authenticate yourself to access your YaaS account. We wanted to do this with RFID, at least that’s the plan for the moment (for translation see above). So, you go up to the machine and through the proximity sensor it notices you’re approaching. It greets you and says ‘Hello, please swipe your card, NFC tag, RFID token, whatever… (Ok, now I’m being a bit mean. To be fair, the things Andreas builds usually work really well. There is a reason his second name is Brain.) Once it knows who you are, you can order the product of your choice. Then you are asked to please pay. You can either throw in coins, or you use the credit you already have on your YaaS account, or you pay by Bitcoin.”

“So, you can either pay physically or digitally via your account. But when you overpay with coins you don’t get any change back, right?”

“That’s the idea, because it simplifies our device. We only take money and don’t return any…”

“Makes sense, sounds good.”

“…yes. What you overpay goes directly to your YaaS account and you can use it the next time.”

Thanks Andreas, we’re curious to see the finished prototype.

How do you fit a bedroom into a shopping cart?…

…or a kitchen? …or a garden? Answer: you don’t. Our next prototype is coming soon! Here’s a short preview:

It’s going to be a prototype for any scenario within which the customer is not able to put the items of interest into a shopping cart or basket. Either because they’re too big, or too heavy, or the items are only samples in a showroom. You could also imagine a B2B scenario. For example a cook of large-scale kitchen collecting ingredients from a wholesale market. The idea behind “Infinite Cart” is that the customer does not have to make notes, or take photos of the potentially desired products. Instead, all the required information will be stored on a device we’re just building ourselves.

FullSizeRender[1]

As you can see, it’s a wearable…will be…sometime…perhaps… In any case, there’ll be some flashing LED’s. Oh, and we’re resurrecting NFC. Apart from all of that it’s going to be integrated with YaaS.

If you have any ideas or suggestions, please contact us!

Coupon Boxes – small, simple & orange

We’ve had them for a while and have been demoing them regularly at events, but never got round to present them here. That’s not really fair though. Okay, they’re probably not as controversial as Google Glass and not as magical as Stream… but they’re orange, they flash (a bit) and we like ‘em.

Right, let’s be a bit more serious. Our Coupon Boxes are a great way of handing out vouchers to customers. They can be placed basically anywhere. The customer just needs to tap the box with his phone to receive the coupon, a signed URL, which is transmitted via NFC. Adopting the coupon to gender is also possible, if a facebook profile is detected.

So where’s the extra benefit in handing out vouchers this way? Well, for a start it can be interesting to know where a coupon was picked up. Taking a more active approach, Coupon boxes can be used to guide customers to specific places, adding an element of gamification to the shopping experience.

Again, both sides can profit: customers receive a voucher, retailers gain a bit of information and everybody’s happy.

DSC_1183

Creating a dynamic NFC Tag with Arduino and the TI

Creating a dynamic NFC tag, e.g. a NFC Tag that looks like a static tag to an Android/Windows Smartphone but whose content (e.g. URL) can be changed dynamically, is a bit complicated if you’re not using the Android APIs and accept the “form factor” of a smartphone. There are commercial solutions available, like the DTAG100 but you pay an extra $100 for not knowing how to update an NFC chip. So figuring out how to program a dynamic NFC Tag has been a long time goal of mine. Finally, I’ve something to share.

IMG_20130902_090543

What you see above is the RF430CL330H from Texas Instruments (TI). Actually, you see the target board that includes the chip in the middle. The target board adds some electrical components such as a few resistors and capacitors here and there that are required to make the chip work correctly. Also, the target board adds a built-in NFC antenna and makes it really easy to connect wires to it. The wires shown are connected to an Arduino.

To understand how to program the NFC chip, you have to dive into a few protocols and standards. The NFC target board communiates with the Arduino via I2C, a pretty well-known communication protocol that only consumes 2 wires on an Arduino and is therefore very popular. It is all byte-based, so you read and write from registers to communicate with the NFC chip. We’ll not go into detail here, but the above link to the NFC chip would give you the register info for the NFC chip.

Next up is NDEF – NDEF is the NFC Data Exchange Format – a standard by the NFC Forum. It defines, which byte-array exactly makes up a valid NFC message – for a URL for example. It’s again bytes, lot’s of bytes. Around 40 for a smaller 10 character URL. The hard part here is the composition of the bytes. “http://” in a typical URL is for example replaced with a single byte, as it saves space and NFC tags typically cannot hold a lot of data.

Together with Ten Wong, whom I met via the TI Forums and we later communicated along on Google+, I was able to put it all together. He also wrote a library which abstracts the NFC chip. There is one pretty bad issue with the Arduino Wire library, which does the I2C Communication: it will send a stop-bit after 20 or so characters. The problem is that the NDEF message is > 40 bytes. That was causing the messages to be broken. Which files to change exactly can be seen here.

My final addition to this mix was to make the Arduino communicate via a serial connection to a PC or Mac and update the NFC chip with the URL received via Serial. The format is this:

^www.hybris.com^

I am omitting the http:// at this point and only support http:// URLs. Changing that is not very hard though.

Finally, here is the code that is required to make this all work. It is processing code, Arduino Uno and Mega compatible. It will assume the TI NFC Target board is connected as shown in the pic above to I2C and the +3.3V and GND.

The loop() method is waiting for the first ^ and will then call the updateURL method, which will read all data from Serial till another ^ is received. This method is also calculating the dynamic NdEF byte array and then finally hands it over to Ten’s library for storage on the NFD chip.

The cost of the setup is around $15 for the dynamic nfc chip on the target board, plus an Arduino. If you buy a clone, you can get one for around $10 which brings the total solution to a price point of around $25 plus shipping. Of course, this is prototyping and mass producing this probably costs a few dollars only.