Weekly Wrap 18 – 25 April

Marbled butter biscuits

Work

  • Not much pub­lic work to show, mostly invest­ig­at­ing poten­tial man­u­fac­tur­ing partners.
  • Far­nell order is drib­bling in, my PCBs and Ali­Ex­press orders have been shipped. All the pieces should be ready when I get back next week.

Play

  • Went to Can­berra on Fri­day to catch up with folk and party, stay­ing for the week.
  • Dis­covered Coconuts Duo, amaz­ingly fun to play and spectate. It’s prob­ably even fun sober.
  • Made marbled but­ter bis­cuits (pic­tured). Annoy­ingly fra­gile to being burnt but for­tu­nately I made so many that after chuck­ing 15% I still needed two con­tain­ers to store them all.

Other

Last week’s wrap

Weekly Wrap 11 – 17 April

Delicious butterhorns

Work

Fin­ished Grideye USB board design, order­ing and blog writeup.

Play

Made But­ter­horn Dan­ishes (pic­tured) and delivered them to Jen’s work.

Last week’s wrap

Grideye USB

One of the key fea­tures of my microwave is Panasonic’s Grideye thermal sensor. This is a (rel­at­ively) low cost thermal sensor that I have placed at the top of the microwave to meas­ure the sur­face tem­per­at­ure of the food.

The sensor is an I2C device which requires a 5V or 3.3V sup­ply. Want­ing to keep everything rel­at­ively high level I am imple­ment­ing it as a USB device.

For the demo I used a Bus­Pir­ate as an I2C-USB bridge. This got me through the demo but the pro­to­cols com­bine very badly res­ult­ing in a max­imum frame rate of about 1fps. The high latency of USB com­mu­nic­a­tions com­bines with the chatty­ness of I2C caus­ing everything to be very slow. So a prac­tical imple­ment­a­tion can’t be a bridge, it must have some logic to con­trol the device and present a pro­cessed USB data stream.

There is an exist­ing one, Digikey has a break­out board that their Applic­a­tion Engin­eers developed. Sadly due to Panasonic’s lim­it­a­tions on dis­trib­ut­ing the GridEye sensor they only ship them within the US. The Applic­a­tion Engin­eers team runs in an open hard­ware man­ner, the pro­ject page for the break­out board includes the cir­cuit dia­gram and firm­ware code. I got in con­tact with the author, Chris Baird, and while he didn’t have any blank PCBs he could ship he was happy to share the ger­ber files so I could make my own.

The story doesn’t end here though, because a solid dose of Not-Invented-Here hit, jus­ti­fied by the twin desire to eval­u­ate KiCad and want­ing to imple­ment the USB Video pro­tocol, driven in part by an absurd desire to shovel yet another driver into the Linux Kernel.

As a nice bonus I reduced the cost, sig­ni­fic­ant com­pon­ents, exclud­ing the GridEye, cost $9.81 AUD for the Digikey board com­pared to $2.60 AUD for mine. Though that it no way com­pensates for the time spent and comes with the dis­claimer that the Digikey board actu­ally works.

All files for the design being dis­cussed are avail­able at https://​git​hub​.com/​l​o​d​/​g​r​i​d​e​y​e​_​u​s​b​_​e​l​e​c​t​r​o​n​ics.

Cir­cuit Design

My cir­cuit design is below, I took a rather dif­fer­ent approach to the Digikey board, wir­ing an Atmel AVR dir­ectly to the USB input. This will use V-USB, a soft­ware USB stack to com­mu­nic­ate. The ATTiny AVR used is cap­able of run­ning V-USB on it’s internal crys­tal, it should also have enough memory allow­ing me to do USB based reprogramming.

Eeschema circuit

The AVR must run off 5V in order to be fast enough to handle the USB com­mu­nic­a­tions. USB com­mu­nic­a­tions how­ever are a 3.3V sig­nal and while driv­ing it at 5V typ­ic­ally works it’s cer­tainly not a nice thing to do. The weak zen­ner diodes are a bid­irec­tional level con­ver­sion tech­nique.

The power net­work actu­ally allows for two dif­fer­ent voltage levels into the GridEye. It isn’t clear from the data­sheet what impact a dirty power sup­ply has, so I have fit­ted an LDO to cre­ate a smooth 3.3V sig­nal. There is also a 5V GridEye vari­ant (which I don’t cur­rently have) that could be run dir­ectly off the USB rail. To sup­port both cases I have an LDO designed in as well as pads for a zero ohm res­istor to bridge the rails, one or the other should be fitted.

The I2C bus uses an open-collector sig­nal so nicely adapts to whatever voltage the GridEye is powered on. Run­ning at 5V the AVR reads 2.5V as high, com­fort­ably sup­port­ing 3.3V communication.

I would have liked to have a spare IO to be able to dis­able the LDO in low power mode. How­ever the GridEye can be soft­ware con­figured into a low power state and the LDO does not con­sume much power when idle. I could repur­pose the reset line for the job but that has sig­ni­fic­ant downsides.

Single Sided PCB

Click image for inter­act­ive 3D model
Loading …

My first attempt at a PCB was a two layered single sided PCB, it is func­tional but not optim­ized as I decided the approach was wrong and cre­ated a double sided PCB for manufacturing.

It is a fairly long, simple, PCB with a simple flow left to right of the USB port, AVR chip and GridEye sensor.

I cre­ated two ground planes, a shield plane around the out­side which is con­nec­ted to the USB shield and the screw holes, it is designed to be con­nec­ted to the chassis. The cen­ter of the board has a stand­ard digital ground con­nec­ted to vari­ous com­pon­ents and the USB ground line. In my microwave sys­tem there should be a cent­ral (star) ground point, some­where else, which con­nects these two grounds. To provide flex­ib­il­ity, mainly for applic­a­tions without a metal chassis, there is an empty 0603 pad in each corner to bridge the two ground planes with either a capa­citor or a 0 ohm resistor .

After doing this lay­out I felt a two layer design would be much bet­ter. It would allow the board to be much smal­ler and I wanted the sensor to be more cent­ral. Later I learnt that the pro­to­type PCB man­u­fac­tur­ers all up their rates for boards over 5cm, so my 6cm board was fairly expens­ive. I swapped the large six pin con­nector with a Tag-Connect con­nector to try and be less ugly, with mixed success.

Two Sided PCB

Click image for inter­act­ive 3D model
Loading …

I star­ted this board more pro­fes­sion­ally, defin­ing a 3cm by 2cm board with M2 holes on each corner. It was a little bit of a struggle to get everything to fit nicely but that prob­ably means it was the cor­rect size.

My main con­cern with the new design is that one of the USB data lines is also used in the pro­gram­ming pro­cess. I tried to make it as short as pos­sible but the pro­gram­ming con­nector wouldn’t fit any­where but the far side of the board to the USB con­nector. So that line is a long stub dur­ing oper­a­tion, not a nice thing to do to an RF sig­nal. Anec­dotal evid­ence from for­ums sug­gests that I will get away with this but hav­ing the pro­gram­ming cable con­nec­ted will cause it to fail, I’m happy with that.

The Tag-Connect con­nector can be seen on the far side to the USB port. It is actu­ally just a care­fully arranged col­lec­tion of pads with holes to guide the plug. I haven’t used the Tag-Connect sys­tem before, I am attrac­ted to it for a num­ber of reas­ons. The foot­print is smal­ler, in board size, only con­sum­ing one layer and not hav­ing a high part per­man­ently attached. Being a lay­out of pads it is cheap per board. And for man­u­fac­tur­ing it is easy to design a pogo pin setup to hit the pads or use a bed of nails sys­tem. There is also a series of test points expos­ing the USB lines for manufacturing.

Sev­eral people have com­plained about the Tag-Connect rout­ing mean­ing that you take up as much board space as the stand­ard, lar­ger, con­nector. I cer­tainly found the rout­ing was annoy­ing, espe­cially with the holes at either end requir­ing lines to go the long way around. I cheated some­what by pla­cing vias on the pads, effect­ively mak­ing some of the pins through holes, this made rout­ing much easier for me. For a two layered board the Tag-Connect bene­fits are prob­ably mar­ginal, with more lay­ers the bene­fits would be add up rapidly.

Order­ing

An order has been placed at OSH­Park for both the Digikey board and mine, the pro­cess was remark­ably good, lots of feed­back as to what would be man­u­fac­tured as you pro­gressed. My board has an oval hole which OSH­Park doesn’t sup­port but I’ll fix that some­how after the board is delivered.

The Digikey board 20.35×22.91 mm (0.8×0.9 inches) and cost $1.20 USD per board.
My board is 30.02×20.02 mm (the 0.02mm is the cut line thick­ness) and cost $1.55 USD per board.

Within 24 hours both boards had been sent for fab­ric­a­tion, mine got a free upgrade to the spe­cial rush order stream.

I have ordered an 0603 res­istor and an 0603 capa­citor part book from Super Deal Tech­no­logy with some empty pages. The Digikey board uses 0804 parts (designed for old folks with fad­ing eye­sight) but I’ll just put 0603s onto the lar­ger pads. Part books are by far the best way to man­age SMD components.

The remain­ing parts have been ordered from Element14, Digikey was cheaper on the parts but more expens­ive with shipping.

Return top