*configure the default number entry format. currently numbers are interpreted as decimal without the 0x or 0b prefix. I'd always prefer HEX as a default. that means we need a prefix for decimal, probably 0d. *Use HiZ mode setup function during initialization. Currently it is kind of a combination of overlapping stuff
The Ultra has an input and output FIFO (currently 512x16, but could be much bigger) connected to a state machine in the FPGA. Pipelined commands are loaded into the FIFO and executed by the state machine with per-clock repeatability. Non-pipelined commands halt the state machine while the MCU takes over to perform the command, the delay here is unpredictable and depends on many factors such as any USB operations the MCU may be servicing.
These commands are currently pipelined:
Delays (ms, us)
These commands can be pipelined, but are currently handled in registers:
These commands will be pipelined in v1c and later:
ADC reads (on any pin, Vout)
These commands could be pipelined with some hardware updates:
Pull-up resistors toggle
Power supply enable
Power supply margining (DAC)
These commands cannot be pipelined because they happen outside the FPGA:
Mode change (reloads the FPGA)
Jump to bootloader
Self-test (involves tests on the MCU and FPGA)
There are also mode macros to consider, which probably need to be a combination of pipelined commands and non-pipelined commands.
Last year Sjaak and I (mostly Sjaak!) tried to build a modern STM32-based Bus Pirate. Once we got deep into peripherals it was obvious that they weren't suited to a Bus Pirate like interface. This is actually something that crops up a lot. There was the revision B2 silicon bug in the 24FJ64GA002 that forced us to use software I2C. The I2C peripheral in the STM32 needs to know one byte in advance when the transaction will end, something impossible to guess consistently based on human-speed user input. We keep running into situations where the hardware peripherals are limited or down-right standing in our way.
When the ICEstorm open source Lattice ICE40 stuff came out, Sjaak suggested we just build our own peripherals in an FPGA and access it through the 16 bit static ram interface on the biggest STM32F103. The Bus Pirate "Ultra" was born.
This summer we've been hacking on V1a. It's the same basic concept as previous Bus Pirates:
5 IO pins, 1 analog pin, two power supplies, and pull-up voltage pin
3.3volt and 5volt power supplies
4 pullup resistors on MOSI, CLOCK, MISO, CS
But we also have some extra goodies:
ICE40 FPGA + STM32F103 MCU
Fully buffered interface with 1.2 to 5.0volts direct interfacing
2 serial SRAMs for a live-capture logic analyzer
A 32Mbit flash chip to hold tons of different bitstreams that can be loaded into the FPGA
2 USB CDC endpoints, one for dumping logic analyzer data (will be pure USB eventually)
File system for storing and loading the FPGA bitstreams
Access FPGA registers and FIFO through 16bit FSMC (static memory controller)
Basic interactions with the "Bus Pirate State Machine" in the FPGA
Configure SRAMs/logic analyzer. Control capture and dump samples
These things are all working to some extent. We're not to the point of actually talking to any chips with our SPI peripheral, but we can control it and capture the bus activity using the built in logic analyzer. It's so cool!
Check this out! This is Bus Terminal, a really crappy Qt program we hacked together. Type commands into the Bus Pirate terminal, and every time you hit <enter> the Bus Pirate runs the commands while capturing the signal. The logic graph updates instantly! No setting triggers, no arming, no trying to get a logic analyzer probe stuck in an odd little place. Boom! You type and then you see what happens! This will be even cooler when we get a driver written for SigRok and have live protocol decoding as well
Look at that timing in the logic graph. It is tight, and it is clocked exactly the same each time. That's because the FPGA unbinds us from the USB housekeeping constantly going on in the MCU.
16bit static ram interface
Control SRAMs for logic capture/dump
IO control (enable, tristate, open drain, direction) mapped to registers
IN and OUT FIFOs (512 words, but can be 2096 each?)
SPI peripheral, PWM
Bus Pirate State Machine that processes: read/write bus, delay, start/stop logic analyzer, pin state, and halt instructions
Getting the logic analyzer working was our first priority, and it probably took longer than anything else. Once it was done though, wow, what a delightful development experience. Not only can we see live what is happening with the pins, we can also point the logic analyzer to things inside the FPGA to debug the HDL.
This is the basic outline of how it all works. Between the MCU and FPGA there is a 16 bit bi-directional data bus and 6 (?) bits of address pins. The memory controller in the MCU reads and writes through this bus just like it's a local system register. The registers in the FPGA are attached to things like pin mode (enabled, in/out, open drain, etc), logic analyzer stuff, and speed settings.
One register, currently register 7 but eventually register 0, is connected to a 512 word FIFO buffer. The buffer feeds a state machine with commands like write xbits, read xbits, delay, halt, enable/disable logic analyzer. Our current development firmware loads up the FIFO with commands, then enables the state machine. Because this all happens inside the FPGA, everything is exactly the same each time a command is run, down to the clock tick! Sometimes we think the logic analyzer is stuck because nothing changes between runs.
Forget the standard blue, red, yellow, black, white and boring old green. How would your project look on a unique, custom color PCB?
We've been working with a super high quality board house in northern China to make PCBs in "Pantone matched" custom colors. The latest results have been really impressive, such as TINRS's TinyGame shown here in pink and white. These are easily the best quality 2 layer PCBs we've ever seen.
Over Spring Festival we added a PCB group buy feature to DirtyPCBs. It's the same basic deal as other PCB pooling services, but with a custom mystery color twist. Upload your designs to add them to the panel. We'll accept orders until the 50x50cm panel is full (or for 10 days, whichever is less), then send them to be fabbed in a mystery custom color silkscreen and solder mask combination. The exact color will be a surprise, but it will never be any of the ordinary colors (or purple!).
You can join a group buy of these high quality, unique PCBs for $0.75 per square centimeter (includes 3 copies). I'm super excited about this new feature and hope some of the custom color combinations are popular enough to become standard options in the future. The planned mystery colors are truly unique combinations that we've never, ever seen before. Here's some more details, or jump straight to the group buy page.
Your projects will really impress with these unique custom color PCBs! Add your PCBs to the panel. When a panel is full (or at least every 10 days) we choose a mystery color and fab it at a super high quality Chinese board house. You never know what color silk and soldermask you'll get, but it'll never be the standard combinations!
This is a group buy! Your designs will be added to a group panel until the panel is full (not more than 10 days). 3 copies of this panel will be fabbed in a custom mystery soldermask and silkscreen color combination at a high end PCB manufacturer. We'll break the panel down and mail out your boards.
Minimum 3 copies! We make three copies of the panel to spread out setup costs, therefore the minimum quantity is 3 pieces. You can also order more, but only in sets of 3!
Readable gerbers only for now! While we beta test the system we are going to refuse any gerbers that our automated filters can't deal with. This means an outline is required, drills must be scaled properly, and you should have no silkscreen outside the outline. If our script chokes on your outline and mis-measures the boards (and charges too much!), we ask that you not order for now.
This isn't cheap! This is a premium, unique service. These panels go to a super high end board house in Northern China. The quality is amazing, but it comes with steep setup fees. The custom color setup fees alone can be $200, depending on several factors. This is a low quantity pooled PCB panel service, but expect higher prices than the purple panel people!
Sorry, not taking requests! Here's a secret: we've had mixed luck with custom colors. Sometimes we get stunning results, sometimes they're noting like the colors we requested! These panels are a way to dial in on the capabilities of custom colors without set expectations. We're super sorry, but we're ABSOLUTELY NOT YET interested in trying to make PCBs in YOUR custom color.
Suitcases have been spotted already, it's starting to happen. The world's largest human migration - from the manufacturing regions in the Pearl River Delta to the coal-fired villages in the chilly North. All the workers who make your stuff will head home to give family and friends little red envelopes of cash.
We can't make any promises about PCB delivery during spring festival. Here's the information we have, everything is best effort. If a delay in your project would be super upsetting, maybe this is a good time to splurge on a locally produced PCB.
[s:]15th[/s:] 14 January Last day factory will accept files. We will push boards 13th and 14th [s:]and 15th[/s:], but that DOES NOT mean they will ship before Spring Festival. It was 15th, but today they informed us work stops a day earlier. 19th January Last shipment from factory to us 20th January Last shipment from us. 4th February Factory resumes production 5th February First shipments after holiday
Every year the Spring Festival disruption seems a bit less extreme, or maybe we're all just learning to roll with it. We're not expecting any major problems, but PCBs will not flow for two solid weeks.
Support will be available during the entire holiday. We'll also continue to push updates to the new DirtyPCBs.com store (did anyone notice credit applied for shared PCBs?).
Immediately after Spring Festival we're going to open a new PCB-related feature. I'm personally SUPER excited about it. Beta testers already have access - if they can find it - but please no spoilers!
I'll pop back to post pictures of the exodus as it intensifies, and then the ghostly shell of Huaqiangbei left behind.
DirtyPCBs.com has been migrated from a few ragged scripts to the "dangercore" site we've been testing at dangerousprototypes.com for the past year. There were several bugs in the upgrade but we've worked most of them out over the week. To the best of our knowledge no regular orders were delayed, though a few rush orders were not charged rush fees and were held for a few hours longer than normal to find out what happened.
A few things:
I'm sorry the sites have the same theme, we are working on that!
Please keep in mind that there are two separate sites, accounts and orders were not merged:
Dangerousprototypes.com/store remains active and has all user accounts and orders you made at (dev.)dangerousprototypes.com
DirtyPCBs.com has all your old dirtypcbs orders and boards and shares, and a user account if you created one. If you did not create an account your orders are still attached to your email and you can (hopefully!) retrieve it with the lost password feature.
If you can't login to the upgraded site with your email, don't worry, you can still place orders while logged out and they will attach to your email address. It seems like we are having email deliverability problems especially with the forgot password feature (might seem to spammy?), our server admins are working on that.
If you have a previous order at DirtyPCBs.com could you please login and check to see if everything looks right?
How to login
The old DirtyPCBs doesn't have a login or account concept, so I imported all the orders based on email address. Your order history and PCBs should all be associated with the email used with the order.
1. If you used the "quick load" address feature of DirtyPCBs and set a password
Login to the testing site with your email address and the password used at DirtyPCB.com. You will be prompted to set a username (and possibly password if the old one doesn't conform to new site rules).
2. If you ordered but didn't set a "quick load" password
Things to know 1. Everything on the test site will be wiped prior to the final upgrade. You'll have to do this whole process again after the migration to retrieve your account. 2. The site is not taking orders. It is currently in test mode and attached to a paypal sandbox account, it is not possible to place orders. 3. A new theme is on the way, sorry about that. The old site scripts are coming apart at the seams and the support flow is maddening and overwhelming, we have no choice but to push onto the new software to improve everyone's experience. Until then enjoy the comic sans. 4. This is an upgrade of DirtyPCBs.com. Even though they run the same software and have the same features, orders from dangerousprototypes.com remain separate from DirtyPCBs.com after the upgrade.
Pushed a somewhat premature updateto the new site over the last few days.
*rendering gerbers/print3ds show a progress indicator as they are handled by the backend. when complete the boards are shown. Yeah!
*(logged in) users can edit PCB properties in the cart and in the order views!! A bit experimental. Here's the rules: --Cart can change anything (if logged in, this is a bug, logged out change coming Monday) --order view can make changes that don't change the price. In the future refunds/billing will be added for changes that modify price, but that isn't a priority (use cancel order for now).
*Click the PCb thumbnails in the cart or order to see all the PCB renderings created for a gerber file. (logged in required, will be fixed soon) (better viewer by monday)
*Fixed bug where canceled orders weren't set to refund (whoops!)
*bug fixes for BOM edit and Edge/IE
*Fixed major shipping price cache bug that caused some countries (RU GB) not to quote. Tested all cases and hardened the SQL query against any similar issue if it should happen again
Coming next: 1. Clean and polish edit PCB properties and PCB viewer 2. new PCB file upload moved to properties editor 3. import and install at dirtypcbs.com 4. Analysis of layers and debug/trouble shooting wizard for PCBs
We changed logistics companies on the new site only. Espeed just couldn't automate our export control documents so we had to find an expert in cross border ecommerse to help us. The new company seems much more professional and generally have their shit together better than espeed.
DHL DHL Hong Kong for all destinations instead of a combination of DHL Hong Kong and DHL China. Timing is 1-7 days, same as Espeed, so we'll have to see what happens. Price for popular destinations seems the same, I didn't check others. I'm using an old value for currency exchange as well. RMB today is all the way at 6.6/USD, when updated our shipping prices will drop around 5-10% I imagine.
DHL next day is suspended, probably indefinitely, until the Chinese currency control laws change. We can still do next day, but you'll need to pay around $60 extra for the export declarations.
Airmail options Replaced Hong Kong Airmail with PostNL Dutch mail. Supposedly this is much faster, slightly cheaper, and registered mail is an option. We will no longer refund or replace lost untracked packages, use that option at your own risk.
Known Issues The new logistics API is quite slow to give price quotes. You may see a momentary loading message when opening the cart if your combination of country and weight has not been refreshed in the last 7 days.
It is not clear how the new logistics API will actually give a tracking number when available. We know where to get it, but we haven't seen exactly how it will be presented in the JSON feed. Once one package goes through we will be able to see and adjust the system in a few minutes.
The next update to the parts library has parts manufacturer and type information. We'll also have a page showing the current free and stocked parts.
Stocked parts is a misnomer. Basically: everything in the catalog is stock, except chip resistors and ceramic capacitors, because we can easily buy 100pcs+ from our supplier. Chip resistors and capacitors are free if you use our preferred values, otherwise for most values you buy a reel and use as many as you want (even more than a reel, its just the setup and run around time fee). Obviously some more expensive parts like 10uF chip caps should be stock and have a per unit charge as ray pointed out in the other thread.
Currently (or shortly) these parts should be free: Resistors: 0R, 330R,470R,1K,2K,10K,12K,100K (0402/0603/0805) Capacitors: 18pF (?), 10nF, 100nF (0402/0603/0805) *needs better pF range for crystals
These parts are stocked, meaning no setup fees, but have a per unit cost: Capacitors: 220nF, 470nF, 1uF, 2.2uF, 10uF (0402/0603/0805)
Any other values? Again, this is just thick film chip resistors and ceramic chip capacitors. Everything else is available by the unit.
Getting stuff manufactured is tough. One thing I've struggled with is specifying parts in a way that Seeed knows which parts could be substituted with cheap local unbranded "cockroach" or "jellybean" or "duff" parts.There's also a huge information asymmetry where it is almost impossible for a designer outside China to know how to spec parts that are common and dirt cheap.
In my "get stuff made" presentation there's a couple slides about the level of detail I use to try to hit the sweet spot. Chips get full part numbers. Resistors and capacitors NEVER get a proper part number, there's too much risk the sourcing agent will price based on buying that part number from a foreign source at 17% VAT.
Transistors and voltage regulators are tougher. How do you make it clear to your sourcing partner that you simply need a 150mA SOT-23-5 3.3volt regulator with enable? An NPN with BEC pinout >5V and >100mA? There's a million part numbers that satisfy the minimum requirements for most open hardware projects but none are standard! Which is cheap in China? The part numbers I used to source from Mouser and Digikey sure aren't the stuff that's cheap and common. We've been using the Richtek - RT9193-33GB and Torex - XC6219B332MR for voltage regulators which are much improved version of the MIC-5205 @ 200ma and ceramic capacitor compatible, but I only know that because I live in the damn market.
You know your design inside and out, every trace, every via, every design decision made to address every constraint. Then an agent sources parts without even the faintest knowledge. It is also highly likely that your sourcing contact is not an engineer, possibly a business English major or just someone with a knack for English. How would they ever be able to make informed decisions about parts? Of course if you're really doing an initial batch of 100,000 then you pay someone to DFM it properly, but that's not what we're talking about.
For agents in China, sourcing sucks. It can take 4-8 hours to quote a simple board. Finding parts, calling manufacturers back and forth, navigating distributors, and followup questions. That's a lot of upfront work to build 100-500 units, and profit of a couple hundred bucks! There's a reason you almost need an introduction and reference to get a quote out of Seeed at times.
Watching agents in the 'hood I'd say less than 1 out of 10 requests for a quote ends with a sale. There's a lot of tire kickers and lookie-loos in the hacker arena who are super excited about their project and "just wondered" how much it might cost to build. And yes, everybody promises to place a huge order immediately, or place a second huge order after a test run. Agents know this NEVER HAPPENS and usually ignore RFQs with stuff like that.
In the early days of Dangerous Prototypes our quotes were black boxes. We got a number for 100/500/1000. If it seemed off by a huge amount it was impossible to know which part was the culprit. I'd ask if there was a part that caused the quote to be so high, then Seeed would come back with a lower price without explanation until it kinda looked right. Talking to several people it seems like Seeed and the other local hardware shops are giving full quotes now, which is great news for designers.
Somewhere in this I tried to identify the major issues I've witnessed and experienced in the hacker hardware manufacturing scene:
* You know your design intimately, but someone with no knowledge chooses what parts to build it with * You don't know what cheap, plentiful domestic parts are a compatible replacement for the stuff you got from Mouser or Digikey * Quoting is time consuming and expensive for sourcing agents, they often won't reply to RFQs without a reference * Quotes are sometimes opaque. You have no idea which component is blowing the budget.
At the second Open Hardware Summit I gave a talk with Eric @ Seeed. Eric introduced his initial ideas for the Open Part Library to help solve the low volume hardware problem. Everything on the OPL is cheap, RoHS, highly available in China, and suppliers have been vetted. Seeed also makes these parts available as a kit so hackers can actually get their hands on them for prototyping. The OPL ballooned up to 1200 parts until earlier this year when they pared it down to 400 components (a big chunk seems to be connectors).
Seeed is using the OPL to hand assemble prototypes in one's and twos. By limiting the universe of parts, they can stuff boards for people more efficiently. There was recently a complaint posted in a blog comment (and several other sites) about the hand assembly service. While I won't deny the poster his dissatisfaction, he seemed completely oblivious to the complexity of the process. Two Seeed people replied to the comment, with the interesting tidbit that they had been using HQChip and Digikey's API to search and match parts not in the OPL. HQChip and Digikey would actually sell in 5s and 10s, while most suppliers deal in reels. They also said they'll no longer work "off OPL" because it was a nightmare for Seeed and the customers (but they get my respect for trying!).
Now let me list some realities of the Chinese part market: *There are no product and price lists. You have to ask for each part and you get a custom price on the spot. If you ask again later they will ask what you were quoted before, they just make up the price as they go along. *Sometimes there's no part numbers. Connectors, buttons, switches are notorious for sketchy cad drawings with no part number at all, but they're the cheap parts you actually want to spec for your design! *Just because you see it on Taobao doesn't mean it is available in China. Taobao has tons of end run clearance stuff that might be one (or 100) of a kind. You cannot use it to estimate the availability of a part in China. *The price on Taobao is not the price. Every page has a warning to chat for an actual price. You cannot use it to estimate the price in China
All of this is just to say it makes sense that Seeed would use expensive international companies like Digikey and HQchip, it would be the only way to get reliable price and availability information.
On the other side of the world super long time Dangerous Prototypes friend LongHornEngineer appears to be working in the highly funded startupy MacroFab assembly and fulfillment service. They're trying to build a Seeed Studio (with nifty API!) in Texas, a place globally recognized for cheap components and electronics manufacturing. I understand they're plugged into the Octopart API for components. Octopart always seemed like a solution in search of a problem, maybe this is it.
So, as with DirtyPCBs, I spent some time thinking about the assembly problem and knocking some poorly written scripts together. I wanted to make something to fix the information asymmetry, put the person most knowledgeable about the design in charge of part selection, and move the upfront cost of sourcing onto the buyer. DirtyBOM/DirtyAssembly is my interpretation of a solution for manufacturing 100 - 1000 units.
DirtyBOM/DirtyAssembly is highly experimental and open only by invitation. We are not going into the assembly business, hell we aren't even making our _own_ hardware, this was just an itch that had to be scratched.
First we scanned every catalog we could find even without price lists, and scraped HQchips and a few taobao shops. We managed a HUGE library of parts, a survey of the market essentially, but the signal to noise ratio was extremely high. How is anyone supposed to choose a part from that mess?
Next we gave the OPL a try. It's a pretty good selection for prototyping, but it lacks completeness for manufacturing.We had to grow our partlist much bigger, but we stuck with the Seeed-tested parts where we could.
In the end I looked over our Dangerous Prototypes partlist wiki and grouped everything into part families. Then for each family we sourced a "complete set" of values in common sizes. Where possible we also include a no-name local manufacturer (cheap) and an established brand (expensive):
Capacitors ceramic 0402 0603 0805 1206 pF - uF range Capacitors electrolytic SMD/PTH 1uF - 330uF (Samsung and "duff" local brand) Capacitors tantalum 1uF-47uF (AVX and "duff" local brand) Voltage regulators: sot-23, sot-23-5, sot-223, DPACK, D2PACK, TO-92, TO-220 in 1.2V, 1.8V, 2.5V, 3.3V, 5V, 9V, 12V, ADJUSTABLE etc, etc, etc
The result is, I think, a very nicely curated set of parts with high availability and reliable major suppliers. I'll write about each family and manufacturer on the blog, and that will also appear in the part library pages to help choose hard to substitute parts like transistors and voltage regulators and diodes.
A quick look around
Browse partlist by manufacturer or type, or search for parts.
Part details and comments.
Upload your BOM as a CSV file. DirtyBOM doesn't force you to use any particular format. All the columns from whatever you upload will be included in the BOM. Columns named "QTY" or "Quantity" are automatically imported as the part quantity.
Add/edit/delete rows of the BOM. The view is super huge and really only suitable for wide displays. There's an experimental "narrow" view that we'll improve in the future.
Obviously the part library won't have full coverage of the universe of parts. For this we added a request quote "?" button for each item in the BOM. The sourcing team (Xiao Tang) gets an email and will attempt to find a supplier.
Whenever possible we'll add complete families of parts at once. If you request a quote on a PIC 24fj64ga002-i/ss we'll try to add all PIC 24s available from our supplier. When a supplier is found, you'll get an email with the details automatically.
We won't hesitate to refuse any order with a hard to source part or a part in short supply. There's no point in fighting this battle with people.
Match parts in your BOM to the part library with a live search. Three prices are shown: Unit cost, Setup cost, and Placement cost. Most passive parts are free, but if you don't use our standard values (10K/100nF/etc, list coming) we charge a setup fee equal to one reel. There is no reason for us to warehouse end runs of of odd valued resistors when a full reel is only a few bucks. If you want to use that 4.7K resistor you're gonna have to buy a whole damn reel for $3...
Attach PCB files and choose options.
BOMs can be saved as different versions and shared publicly.
The cost to manufacture 100 and 500 units is automatically calculated. The pricing formula is a work in progress and after some testing we'll publish it for even more price transparency.
DirtyBOM/DirtyAssembly is open by invitation only. We're looking for a few really friendly testers to play with it. It would be super nice to actually push a project through, but just testing the system is also helpful. Please let me know your new site login name here I'll add you as invitations open.
From the other thread I thought, wow, maybe I could go work at the factory to understand production level pcb manufacturing as well as I know how to make my own. It would be really interesting to spend some real time up there with the engineers and production people to get a feel all the constraints and the limits of the process. Anyone want to commit to two-weeks-working-in-a-PCB-factory camp? Engineering, drilling/routing, inspection. I'd probably avoid the acid pool area, but could be convinced it we have the right safety gear.
Buy a coupon code and give the gift of PCBs, SLA prints, etc.
You can include a message that will be shown when the coupon is used. For example: Good luck on your Kickstart! Happy Birthday! Thanks for cleaning the hackerspace kitchen!
Values can be $5-$250. Coupons expire after 1 year. There is currently no way to retain the balance if you use less than the full value, but we will help with that by manually issuing a new coupon code for the amount unused.
Our logistics agency announced that all Hong Kong airmail will become trackable in the future. I have no idea when, or when their API will give us that info. For now it means we can technically dig up proof to win PayPal "item not received" disputes, though that doesn't really help anyone...
I would really appreciate a couple test orders from kind patient people who understand this will be a rough bring-up and things might take 2 weeks to ship... This is a brand new system and supply chain that has never been tested.
Is it cheap? To be honest I have no idea. At 5 pieces we're charging $0.024 per cm2. That works out to 5 pieces 10x10cm for $12. Price breaks at 10,20,50, and 100 pieces.
We're not going to fret about design complexity or machine time because the prices are quite negligible in China.