• Wednesday, May 14, 2014

    #tessel #technical machine #manufacturing #worthington assembly #pick and place #packaging

  • Testing Tessel with Testalator

    Tuesday, May 13, 2014

    5/13/2014— Jia Huang

    We recently started a production run of 2.5k Tessels. When we put something in production, it’s not just a matter of telling our manufacturer to start placing components on boards. We also have to make sure that every Tessel we produce is programmed and tested, and that’s where Testalator comes in.

    Testalator

    Testalator is Tessel’s programming and test rig. It programs Tessel up with all its firmware and then makes sure the Tessel can operate to spec.

    The physical Testalator is made up of a few key parts:

    • A mechanical jig that holds the Tessel in place
    • A second Tessel that checks that all the pins on the Tessel being tested works.
    • A Raspberry Pi that hooks up to the jig, programs and checks Tessel, and then streams those logs online.

    The jig

    This is the physical setup required to connect all the pins of Tessel for testing. It involves around 60 pogo pins, 22 standoffs, and 2 cut pieces of acrylic that hold the Tessel in place. There’s also a few indicator LEDs showing the progression of the test.

    “Wow Jia, you should try Mechanical Engineering”, said no one. The clear flanges that held the Tessel in place were too loose at first so Eric “fixed” it with some hot glue.

    The Pi

    A Raspberry Pi operates the entire test. The jig connects to the Pi’s GPIO and USB ports. Testing & programming involves going through the following stages:

    • One Time Program (OTP) the board. This sets up the version of the board, and makes it boot from internal flash by default. We also stick on our custom bootloader so we can update the firmware later.
    • Put Tessel’s firmware on the board
    • Upload some JS to do a pin test
    • Upload some JS code while switching power sources
    • Connect to wifi and do a ping test

    There are some more checks in between each stage, but this covers most of the functionality of the board.

    Tessel tests Tessel

    One core part of Testalator is the pin test. The pin test is the test that checks to make sure that all the pins on the module headers (GPIO/SPI/I2C/ADC/etc) can operate as intended.

    We use a Tessel to do the pin test on Tessel. The Tessel tester is hooked up on the bottom of the jig using vertical headers:

    The Pi uploads some JS code to the Tessel being tested which starts up the pin test. After that, the two Tessels communicate for which test is commencing and what the expected output should be.

    Streaming test logs

    Testalator also streams all the test logs online as it operates.

    Since manufacturing is still done in Massachusetts and we’re across the country in Berkeley right now, these logs give us an easy way to see which tests have passed or failed, and which bench did the testing. We’ve found this pretty helpful in debugging any consistent failures during manufacturing. Using this, I can see which failure modes are happening often, ssh into the Pi, and fix the test remotely.

    The Testalators have programmed and tested about 100 boards so far, so there’s still quite a few more to go.

    Here’s to hoping everything goes according to plan.

    Jia

    #jia huang #testing #hardware #testalator #tessel #technical machine #manufacturing #qa #quality control #firmware

  • Hidden Costs of Office Space

    Friday, May 9, 2014

    5/9/2014— Jon McKay

    In the past year, Technical Machine has worked out of an incubator, college dorm rooms, various apartment buildings, and a co-working space. But we’ve always wanted an office to be able to hack on projects with other people and to generally be our loud, boisterous selves without upsetting others. We started looking for a space in March, and now we’re finally moved into a beautiful workspace in Berkeley!

    As with most tasks involved with starting a company, I had no experience finding and leasing an office. As someone who hasn’t lived in the same place for more than a few months since 2009, the process of securing a multi-year lease was pretty abstract. In my mind, the only operating figure was rent but I was wrong. Some of the logistics will be familiar for anyone who has rented housing before, but others are unique to offices.

    Below is a list of costs associated with leasing an office that may not be apparent if you’re in shoes similar to mine:

    • Rent: I thought this would be a simple term in the lease but it turns out to be way more complicated. Obviously, rent will vary from location to location; property in Berkeley is about $1.50 per sq. foot, whereas SF proper is about $4 per sq. foot. You will probably be required to pay several months of rent up front. You might have more negotiating power if you can pay more upfront than the landlords originally ask for. Here are some other good questions to consider:
      • How many years will you be leasing at this price, and do you have the option to stay longer?
      • If you are staying longer, is the price for the extension pre-negotiated or will you figure it out in the future?
      • What’s the fee for paying rent late?
      • Can you rent your space out to other people? For example, if you wanted to let a smaller companies rent extra square footage.
    • Security Deposit: There will be a security deposit to make sure you don’t destroy the building. Ours was $10k for the 2800 sq. feet workspace.
    • Insurance: Most leases will require you to get several types of insurance before you can step foot on the premises. Your insurance costs will vary by the insurance coverage and size of your company. As a benchmark, our insurance for six people will cost about $1500 a year. If an incident occurs, you will have to pay a deductible – ours is $500. I recommend asking around for an insurance broker to save you from having to talk to insurance companies directly. They charge anywhere from 15 - 25% of the annual cost. The common types of insurance are:
      • General Liability (if a non-employee gets injured on the premises, someone drives their car into a wall, etc.)
      • Property (cover the items inside the property such as computers, furniture)
      • Business Interruption (if something outside your control prevents you from doing business and you lose sales)
      • Worker’s Compensation insurance (an employee gets injured on the job).
    • Utilities: Gas, electric, and water! Don’t forget to set it up before you get there. As with personal housing, you may be splitting your utilities with other tenants of the property, or you’ll have to set it up yourself. I don’t have a good estimate of how much utilities will cost per month yet but I expect it to be several hundred dollars.
    • Internet/Phone: You may not need phone service, but you’ll need internet. Check with the landlord to see what service is already available at the building. You can get a cheaper installation cost with a service that’s already routed to the building. This will cost you $100-$200 per month depending on the speed of internet. I recommend buying your own cable modem and router.
    • Furniture: As we found out the hard way (literally), you’ll need things to sit on besides the floor if you want your employees to be happy and healthy. We went to IKEA, bought about $4k worth of shelves, desks, chairs, and conference tables. The real kicker here will be the time spent putting it all together. We opted to use TaskRabbit to hire to guys to come put it together for us. Instead of paying IKEA $3k to install it, we paid for 15 man hours with only $300. Don’t try to do it all yourself!
    • Miscellaneous: You never really notice all those little items you depend on every day until you try to work in an empty office. I’m talking about tape, scissors, kitchen towels, printers, drills, vacuums, soap, and TP. This is where you could really break the bank. I’d estimate that we’ve spent about $2k on these types of items so far.
    • Time: The biggest cost here is time. Negotiating lease agreements back and forth, opening up Amazon shipments, online shopping, putting checks in the mail. It takes hours out of your day and pulls your attention away from the product. You really need to outsource as much as you can. Use insurance brokers, real estate brokers, TaskRabbit, Amazon Prime. If you have the money, it’s totally worth it.

    If we include all those factors, (non-recurring costs spread out over the remainder of the lease), the actual cost per month is about 20% higher than just rent alone. Be sure to account for that in your planning.

    Now that we’re starting to get acclimated to the new office, I love it and think that the whole process was totally worth it. I can’t wait to get some picnic tables in here, start hosting events and meet the community. If you’re in the bay area starting next month, keep your eye out for meetups! Or just drop on by:

    Technical Machine
    1101 Cowper St.
    Berkeley, CA 94702

    –Jon

    #jon mckay #tessel #technical machine #office #startup #budgeting #startup advice

  • Tessel Update 20: Manufacturing

    Friday, May 2, 2014

    5/2/2014— Updates

    Current Status

    2500 Tessel PCBs have been manufactured, and have just arrived at Worthington Assembly in western Massachusetts:

    Worthington will assemble the boards, using pick-and-place machines to surface-mount solder the thousands of circuit components onto the PCBs, load our firmware code, and run the shiny new Tessels through a suite of tests.

    When they’re satisfied, they package them up in antistatic bags for us and send them to Gilroy, California for fulfillment by Rush Order.

    Rush Order is already receiving modules that have completed manufacturing . When they have received all of the modules and the Tessels, they will begin packing and sending individual orders.

    What we’re working on

    Meanwhile, we’re making sure all of the software is ready: making last-minute improvements to Tessel’s firmware, adding polish to the module code, writing lots of documentation.

    We opened up our first pass at Tessel’s API documentation last week, and updated our hardware documentation as well.

    Expect to see more of our code open-sourced soon!

    All the best,
    Kelsey, Jia, Tim, Eric, Kevin, and Jon

    #updates #tessel #technical machine #manufacturing #fulfillment #PCBs #assembly #timeline #firmware #hardware #documentation #update

  • High-Level Automated Hardware Debugging

    Wednesday, April 23, 2014

    4/23/2014— Tim Ryan

    The CC3000 is the on-board component that enables the Tessel to connect to WiFi. This $12 chip communicates over SPI, has a built-in TCP/IP stack, and comes with a host library that enables using it indistinguishably with the BSD sockets API.

    For example: Tessel, while not running Linux, can easily drop in a library like c-ares (used to look up the IP address correlated with a domain name) because we’re using the same API used to make TCP/UDP queries on the desktop.

    A chip this capable is naturally complicated, and so is Tessel’s firmware. Debugging can occasionally be much more difficult than throwing open a GDB console and stepping through code. Is the state of the CC3000 chip known by the code? Was an incorrect command sent most recently, or a thousand commands ago? Is this TCP command originating through the JavaScript VM or directly from third-party code?

    Instead of debugging all of these subsystems simultaneously, it’s more straightforward to just analyze a) what commands the Tessel sends and b) what commands the CC3000 sends back. Using these exposed pins on the Tessel board and a logic analyzer, we can record the SPI communication emitted by any Tessel code and dissect exactly what went on.

    Tessel exposes breakout SPI pins for the CC3000.

    We have several of the Saleae Logic line of logic analyzers around our office. The Logic and its larger brother the Logic 16 can record high-speed signals, for example the 4MHz SPI communication to the CC3000, as well as I2C, UART, or USB signals, then display them in a zoomable graph.

    The startup SPI sequence of the CC3000.

    The interface for the Logic analyzer is nice for being able to visualize erroneous communications, but we aren’t much closer to understanding what is happening on the signal level. In particular:

    1. The Logic analyzer has helpful visual tools to see what bytes are actually being sent over the protocol, but not what groups of bytes mean.
    2. We have to specify an upper bound for the number of samples we want to take, rather than continuously logging.
    3. The options to export data have to be configured each time.
    4. We can’t use the command line.

    Luckily, the open source world of reverse engineering is alive and well!

    Sigrok

    Sigrok is an open-source library with a collection of drivers for various open-source projects. In our case, Sigrok supports a family of logic analyzers using the FX2 chip, including the Logic 8. Using brew install sigrok or any version 0.4.0 or newer from your repository, we can communicate with our analyzer directly from the command line.

    sigrok-cli \
      --driver fx2lafw \
      --continuous \
      --config samplerate=8M \
      --output-format vcd \
      --output-file /tmp/sigrok.vcd \
      --probes 0=cs,1=miso,2=irq,3=mosi,4=sck,5=sw_en
    

    We’re using the fx2 driver, with a sample rate of 8MHz (twice the speed our CC3000 runs at), outputting in vcd format to /tmp/sigrok.vcd, with probes 0-5 (named according to how they are named in the first diagram).

    The command will begin logging data from the Logic analyzer in perpetuity using the --continuous option, as long as the USB drivers can keep up*.

    Now that we’re logging to /tmp/sigrok.vcd, we can throw together a few Node modules to utilize it:

    • tail-stream creates a stream of a file that is actively being written, outputting more data whenever the file size grows.
    • vcd parses a textual value-change dump file, turning it into a series of “sample” events.
    • cc3000-log is our own script for interpreting the signals of the CC3000, interpreting them as SPI and generating a human-readable list of communication:

    The interpreted output of the CC3000 communication. Support for interpreting the payload bytes on the right is partially implemented.

    Instead of adding extensive debug facilities to many locations in our code (slowing it down and impacting the operation of the CPU), we can now be a silent observer: tapping the communication of the Tessel and the CC3000 and viewing in real-time how the IC is being controlled. This technique doesn’t just apply to the CC3000, but for any module or IC that the Tessel communicates with!

    TLDR: Sigrok is an open source library for communicating with commercial logic analyzers. Using it, you can make powerful, customized tools to debug ICs and signals from your command line, a welcome addition to automated testing.

    We highly recommend and use the Saleae Logic. But if you’re looking for something much cheaper (in price and quality) or throwaway devices to augment automated hardware testing, there are a variety of clones from foreign markets also.


    * 8Mhz samples are a lot; originally I was trying to set --output-format as binary or hex, which would inevitably cause the device to stop responding. It wasn’t bounded by my USB driver, it was bounded by the I/O speed of piping that many bytes to a file! The VCD format only outputs when values have changed, creating a drastically smaller log. In the future, we would bind directly to libsigrok for even faster throughput, but first hack first.

    #tim ryan #wifi #cc3000 #hardware #reverse engineering #open source #tessel #technical machine #logic #saleae logic #saleae #SPI #tcp #ip #sigrok #debugging #high level #automated debugging

July 2017

February 2017

November 2016

October 2016

September 2016

August 2016

July 2016

June 2016

April 2016

March 2016

February 2016

November 2015

September 2015

August 2015

July 2015

June 2015

May 2015

March 2015

February 2015

January 2015

December 2014

November 2014

October 2014

September 2014

August 2014

July 2014

June 2014

May 2014

April 2014

March 2014

February 2014

January 2014

December 2013

November 2013

October 2013

September 2013

August 2013

July 2013