Date: Wed, 3 Aug 2016 20:39:33 -0700
From: Bret Victor
Subject: Re: barcode scanner
A few more notes:

 - The cable that comes with the scanner was intended for a PS2 keyboard so the RS-232 TXD line is not exposed, and Toby and I couldn't find a replacement molex connector and cable.  Probably the right thing to do would be to insert and crimp a wire into the existing connector, but I don't know how to do that.  Instead, I found the TXD signal on a solder pad for an unstuffed part on the PCB, and I soldered a wire directly to the pad.

 - If we were to build more of these, we wouldn't need the full level-shifter board, just a single level-shifter.

 - The perf board and the scanner module are mounted to the battery case with poster tape.

 - Most of the connections were wire-wrapped!  Wire-wrapping has apparently gone out of fashion, and you won't hear about it on the Spark Funs or the Ada Fruits, but it's absolutely the best way of doing point-to-point wiring of header pins in a prototype.  I love wire-wrap.



On Aug 3, 2016, at 7:00 PM, Bret Victor wrote:

Today I made a wireless barcode scanner.  You can boop barcodes.



<IMG_9503.jpeg>

<IMG_9507.jpeg>

This is the schematic and BOM (such as it is).

<barcode-scanner-schematic.jpeg>

The scanner outputs RS-232 and XBee inputs RS-232, so there wasn't a need for a microcontroller (at least for now) -- the scanner sends ASCII directly into the XBee, which then transmits it through the air to any other XBee listening at that address. 


Notes:

 - The barcodes generated by sticker.dynamic.land are a bit small for this scanner.  It only scans them when held just so.

 -  The XBee runs at 3V and the scanner runs at 5V.  I used a 2xAA battery pack for 3V, with a step-up converter to turn it into 5V, and a level-shifter to step the scanner's data line back down to 3V for the XBee.

 - I configured the XBee "by hand" using the USB breakout board and the XCTU app.  I used channel C, PAN ID 74A0, MY address 1, destination address 2.

 - The only configuration change I made to the scanner was to set it to RS-232 mode.  (It defaults to PS2 mode.)  This is done by scanning special barcodes in the quick guide.

 - The battery case has an on-off switch.  I haven't measured how much idle current the devices draw.

 - If we were to make more of these, we wouldn't use the USB breakout board in the design.  I used it because the XBee device itself has a narrow pin spacing which doesn't fit into a perf board, and the USB breakout board was the only breakout board I had.