Bus Pirate Ultra display board v1d

Sorry for the poor image export. What have they done to Eagle?

The LCD carrier board for Bus Pirate prototype “Ultra” v1d went out today. This update matches the form factor of Ultra v1d (in progress) and has several minor changes:

  • Uses 10 pin 0.5mm flexible PCB connector, wired to the main board with a 1:N connection. This connector is much smaller and thinner than the 1.25mm connector on v1b, it reduces the space needed between the display board and the main board.
  • Flipped LCD orientation 180 degrees so font data can be written into bounding boxes in a more natural “left-to-right” orientation, eliminating the need to precalculate the text end point and write characters in reverse sequence
  • Nudged the display towards the IO header. We’ll experiment with some buttons in the remaining available space
  • Decoupling capacitors on LCD power pins

The 2 inch 240*320 IPS LCD display we’re been testing has a very pleasing pixel density, but we’re also itching to try the bigger 2.8 inch version. Next week we’ll send out a prototype carrier board for the bigger display, as well as some Bus Plug breakout boards.

Cheaper yet powerful camera solutions

The Landingfield writes:

It’s been a while since my last blog post. During this past year, I’ve built a few other cameras yet released on this blog. In the meantime, I have been looking into options to make this work available to fellow amateur astronomers as a viable product. One major blocker here is the cost. FPGAs are expensive devices due to two factors: 1. They are less produced compared to ASIC and still uses state of art silicon process. 2. Massive area dedicated to routing and configuration logic. Let’s look at a simple comparison. The MicroZed board I’m using cost $200 with dual Cortex-A9 core clocking at 666MHz. This contrasts with quad core Ras Pi 3B clocking at doubling frequency. And it only cost $30.

See the full post on The Landingfield blog.

BUS PIRATE: ADS7042 Analog to Digital Converter chip

Source: ADS7041 datasheet

In Bus Pirate prototype “Ultra” v1b we added analog voltage measurement to all the IO pins using a 74HCT4051 8:1 analog multiplexer and an op-amp. In the next revision we’re moving control of as many peripherals as possible into the FPGA. The FPGA doesn’t have an Analog to Digital Converter feature, so we need to add an external ADC chip.

We chose ADS7041/ADS7042 10/12 bit ADCs capable of 1MSPS with an SPI interface. The 12 bit version is $1.75 in 100s, the 10 bit version is slightly cheaper ($1.06). The 10 and 12 bit versions are pin-compatible. We’ll try both and decide later what works best.

There are much cheaper SPI ADCs, but for around a dollar this chip does 1 MSPS with a simple 3 wire interface. That’s the same top speed as the DSO Nano v3, so we can record samples in the two SRAMs and have a very minimal oscilloscope function on any IO pin.

Source: ADS7041 datasheet

The interface is read-only and doesn’t have any registers to configure, that’ll keep it simple to work with from the FPGA. Each conversion begins with two clock ticks, then the 10 or 12 bit reading follows. The maximum clock speed is 14MHz to achieve 1MSPS, easy to do with the FPGA.

This post is just a quick followup to yesterday’s look at three Digital to Analog Converter chips.

#FreePCB via Twitter to 2 random RTs

Every Tuesday we give away two coupons for the free PCB drawer via Twitter. This post was announced on Twitter, and in 24 hours we’ll send coupon codes to two random retweeters. Don’t forget there’s free PCBs three times a every week:

  • Hate Twitter and Facebook? Free PCB Sunday is the classic PCB giveaway. Catch it every Sunday, right here on the blog
  • Tweet-a-PCB Tuesday. Follow us and get boards in 144 characters or less
  • Facebook PCB Friday. Free PCBs will be your friend for the weekend

Some stuff:

  • Yes, we’ll mail it anywhere in the world!
  • Check out how we mail PCBs worldwide video.
  • We’ll contact you via Twitter with a coupon code for the PCB drawer.
  • Limit one PCB per address per month please.
  • Like everything else on this site, PCBs are offered without warranty.

We try to stagger free PCB posts so every time zone has a chance to participate, but the best way to see it first is to subscribe to the RSS feed, follow us on Twitter, or like us on Facebook.



BUS PIRATE: three inexpensive SPI Digital to Analog Converters

Source: Microchip MCP4902 datasheet

As much as possible, we’d like to move control of all the Bus Pirate peripheral hardware to the FPGA. Then everything can be controlled through the state machine command pipeline. In Ultra v1c we moved analog voltage measurement to the FPGA by adding an SPI ADC. In a future revision it would make sense to move a few other things to the FPGA:

  • Pull-up resistor control
  • Programmable output power supply enable
  • Programmable output power supply margining (using a DAC)
  • v1d stuff not yet announced

For debugging and self-testing we need to keep some redundant connections to the MCU as well, but primary control should be through the FPGA.

We had a look at a few chips that could replace the Digital to Analog Converter in the MCU, here’s a few inexpensive options we considered:

Continue reading “BUS PIRATE: three inexpensive SPI Digital to Analog Converters”

4 Port high power USB hub

Dilshan Jayakody has published a new build:

In the last couple of years, I tried several powered USB hubs to drive some development boards and USB peripherals. Most of the USB hubs which we can find in the local market are unreliable or not designed to drive more than 500mA of a load.
After having a few bad experiences with powered USB hubs, I decided to build a USB hub by myself. I specifically design this hub to drive USB powered development boards and experimental peripherals.

See the full post on his blog.

BUS PIRATE: pipelined and non-pipelined commands

Bus Pirate prototype Ultra v1b uses an FPGA to process commands sent through a FIFO buffer to a state machine. Pipelined commands can be 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 is unpredictable and depends on many factors such as USB operations the MCU may be servicing.

Continue reading “BUS PIRATE: pipelined and non-pipelined commands”

BUS PIRATE: first test of Ultra v1b with SPI EEPROM

Bus Pirate prototype “Ultra” v1b successfully wrote to and read back from a 25LC020A SPI EEPROM chip. The image shows the Bus Pirate reading 8 bytes of 0x02 from the EEPROM at address 0x00, and the bus activity can be verified on the logic analyzer graph. Still a long way to go, but it’s nice to have everything working.

Tomorrow we’ll finish the major SPI commands and general purpose mode features like analog measurement and manipulation of the auxiliary pins. As always, you can follow our latest progress in the forum.

Evolution of the Bus Pirate, the road to Ultra

Sjaak @ SMDprutser has been instrumental in pushing the Bus Pirate firmware and hardware ever forward. Check out his history of the evolution Bus Pirate “Ultra” for some great background:

Unfortunately we run more or less into the same issues as we had with the Microchip controller: USB need regularly attention, which interferes with our interaction on the protocols, so we end up with stalls. Another big issue was that the peripherals were designed with moving data efficiently around and not in an educational way (as the BusPirate is ment to be). For example the I2C is nicely designed for reading memories or writing displays fast, but we need to know beforehand which byte is last. As we only can send a stop byte one or two bytes in advance of the stop bit. The design of the BusPirate menu system doesn’t cope with this properly (without major redesign).

As always, you can join Sjaak and Ian for development fun in the forum.

JTAG debugging the ESP32 with FT2232 and OpenOCD

Erich Styger has written an article on how to use an inexpensive FTDI evaluation board as JTAG debug interface to debug ESP32 based devices:

In “Eclipse JTAG Debugging the ESP32 with a SEGGER J-Link” I used a SEGGER J-Link to debug an ESP32 device with JTAG. I looked at using one of the FTDI FT2232HL development boards which are supported by OpenOCD. The FT2232HL is dual high-speed USB to UART/FIFO device, and similar FTDI devices are used on many boards as UART to USB converters. With OpenOCD these devices can be turned into inexpensive JTAG debug probes. This article shows how to use a $10 FTDI board as JTAG interface to program and debug the Espressif ESP32.

More details on MCU on Eclipse blog.

BUS PIRATE: Ultra v1c board update

Bus Pirate prototype “Ultra” version 1c is technically done, but we came up with some hot last minute additions this weekend. We’ll skip this board and send out the updated version 1d with the additional features at the end of the week.

Version 1c changes:

  • 4 layer PCB
  • 1MHz 12 bit SPI ADC connected directly to the FPGA
  • Vout/Vref is also measured through the analog multiplexer, which is changed to to the bigger 16bit version (74HCT4067). This will probably change to two 74HCT4051s instead because supplies of the 4067 are skimpy! We can have one “divide by two” 4051 for 5volt measurements on the IO pins, and one 3.3volt 4051 tied directly to the ADC for measuring lower voltage analog stuff
  • Beefier 3.3volt supply
  • The 1.2volt supply is now monitored by the MCU for self testing
  • 0.5mm flex cable connector for the display board opens up a bit of board space
  • Additional ADC measurement point before the back-current shut down protection on the power supply. This gives us a way to include it in the self test and detect when it activates

Boards and schematics are in our git repo, and you can follow the latest developments in the forum.

A self-expanding ESP32 PWM board

Eric Gunnerson writes:

I’ve been working on a little ESP32 expansion board/shield for an LED project I’ve been working on. One of the nice things about the ESP32 is that it has a peripheral known as “LED control” that provides 16 independent channels of PWM for controlling LED brightness, and my project uses that capability.
One of my projects is going to require all 16 channels, so I wanted to do a board that would support 16 channels, but I also wanted a version of the board that would only support 8 channels.

Project info at Eric’s Arcana and RiderX site. It’s also up on Tindie.

Check out the video after the break.

BUS PIRATE: pin order and cable colors

The Bus Pirate pinout was supposed to be intuitive, except for one Arduino-like mistake.

Each protocol uses the same pin for similar functions, and the pins used are supposed to “walk” up the row. 1-Wire uses Master Out Slave In (MOSI, pin number 1). I2C uses MOSI (1) and CLOCK (2). UART uses MOSI (1) and Master In Slave Out (MISO, 3). SPI uses MOSI (1), CLOCK (2), MISO(3), and Chip Select (CS,4).

It should have been a nice intuitive progression, except for the unfortunate use of a hideous 2x5pin IDC connector. It’s hard to recall why we used this connector. Probably to keep the board small, provide a keyed connector, and likely because it was in our parts box.

The IDC connector was a poor choice. Not only is it ugly, probes end up using crappy ribbon cable that makes it look even worse. The connector was added without regard for the proper pin order, and used something hard to remember – MISO, CS, MOSI, CLK. Once it was loose in the wild we were stuck with that convention, and that’s how Bus Pirates have been produced for over 10 years!

Bus Pirate Ultra uses a 1x10pin connector called TJC8 2.54mm or 2543 by Chinese suppliers. It’s keyed, but also fits common 2.54mm “DuPont” connectors laying around most workshops. The pinout is DIO1 to DIO8, Vout, and Ground. Each protocol mode is in charge of naming the DIO pins, and the labels are displayed on the LCD above the connector.

We also want to give some thought to the color codes used on the pinout display and probe cables. Typically cable manufacturers stock wire in ten colors: red, orange, yellow, green, blue, purple, gray, white, black, and brown.

Goal one is to make the power and ground pins an intuitive color pair. Black and red, white and black, maybe even red and green. A color pair that a beginner in electronics has probably seen somewhere before.

Goal two is to follow the rainbow. Most people are probably familiar with ROY G BIV, the acronym for the order of colors in a rainbow. We want to start with red and progress downwards in a logical order so that pin one is instantly obvious, and the pins can be identified in a tangled messy probe cable without tracing them back to the source. Indigo and violet colored cable isn’t standard and the colors are hard to tell apart, so they’re usually substituted with purple and brown.

Pin 1 (DIO1) is assigned red. DIO2 to DIO7 are assigned orange, yellow, green, blue, purple and brown. With three colors remaining (gray, black, white), white and black are the obvious choice for the power/ground pin pair. Grey is assigned to DIO8.

Eventually we’ll need to choose good quality wire and some decent probe hooks for the cable. Sigrok, the open source logic analyzer software project, has a good overview of probe hook options. The rest of this week we’ll work on getting the firmware cleaned up and Ultra v1c board routed. As always, you can follow our latest progress in the forum.

App note: Emitters and detectors for infrared (IR) touchscreens

App note from OSRAM about IR LEDs and IR detectors used on touchscreen technologies. Link here (PDF)

Touchscreens as a popular user interface are more and more common. Applications span from public information systems to customer self-service terminals. Thus, as a logical step, more and more devices today feature this kind of user interface, e.g. bank automatic teller machines (ATMs), personal digital assistants (PDAs), mobile phones and PC displays. The widespread popularity is actively supported by standard computer based operating systems, such as e.g. Windows® 7.

The rapid development of CMOS imaging sensors and the development of high power infrared (IR) emitters in slim packages have led to a series of new optical touchscreen technologies. Many of them contain proprietary technology and solutions.

BUS PIRATE: 2bit anti aliased font for small color LCDs

Bus Pirate prototype “Ultra” v1b has an IPS LCD to show pinout labels, voltage levels, and other useful info. The background image was done in Photoshop and is stored in the 32Mbit flash chip on the board. Pin labels and voltage readings are drawn on top of the background image with a fixed-width font.

1bit font generator by maxpromer

Most LCD fonts represent each pixel with a single bit (on or off). This is an efficient way to store a font, but the results look jagged and unprofessional. To get a better look, we anti aliased an open source font and then extracted two bits per pixel of color data. The results, shown above, use a four color lookup table to represent the background, text color, and two intermediate colors for anti aliased pixels.

Continue reading “BUS PIRATE: 2bit anti aliased font for small color LCDs”

Sequence controller

Eric Gunnerson has been working on a sequence controller project:

Yeah. Those pins are beautifully aligned a very precise 0.1” from where they are supposed to be…
Pro tip: Print out your design and put your components on it so that you can check the design.
Meta pro tip: Follow your pro tips.
Anyway, that’s not the only problem; it turns out that the power and LED parts of the connector are right underneath the end of the board, so you can’t use a normal header on them (you could use a right-angle one if you wanted), so I did a new revision of the board with 1.0” rather than 1.1” for the ESP and extended the board so the connectors are out on the end. That’s on the slow ship from China right now.

See the full post on Eric’s Arcana and RiderX blog.

Chinese cable and connector vocabulary

Bus Pirate prototype “Ultra” v1c will use a 0.5mm flex cable (FFC/FPC) to connect the display board. Of course we could just order the standard parts from Mouser or SZLCSC, but rooting around on Taobao is fun and gives a better idea of the range of stuff out there. Here’s some Chinese vocabulary that helped us order parts.

Cables that are connected 1:1, pin one of one connector is wired to pin 1 of the other connector, are called 反向. Cables that are connected 1:N, pin one of one connector is wired to the highest number pin of the other connector, are called 同向. We ordered the wrong version of the 1.25mm display cable for v1b, but fortunately the crimps can be carefully removed and replaced in reverse order. This won’t be an option with the flex connector.

Most FPC/FFC connectors are available in two types. Metal contacts on the bottom of the connector slot are called 下接. Metal contacts along the top of the connector slot are called 上接.

Orientation is really important because FPC/FFC cables generally only have contacts exposed on one side of each end. FPC/FFC cables are also available in 反向 / 同向 (1:1/1:N), meaning the exposed contacts are on the same side or opposite side of the ends. We’ll post some photos of these cables when they arrive.

DIY AD9833 signal generator

Daumemo has been working on a DIY signal generator based on an AD9833 IC:

In this post I am going to continue with the DIY signal generator based on the AD9833 IC where I have left in the previous part. Earlier, I have talked how I had built my first analog signal generator’s stage – variable gain amplification circuit. Usually, a generator needs to have an ability to change not only the signal’s amplitude, but also its offset. So, today I will walk you through a circuit which adds an offset to the DIY generator’s output signal.

More details on his blog. See part 1 of this series for the analog signal generator’s stage.

BUS PIRATE: LCD with pinout labels and live info

The Bus Pirate prototype “Ultra” v1b has a 10 pin 1.25mm connector for a display daughterboard. We wanted a more dynamic way to keep track of the pinout and other handy information like pin states and voltage levels.

There are various reference stickers and labeled probe cables for the Bus Pirate v3 and v4, but a display frees us from strict pinout conventions and makes setup a lot easier for new hackers. More on the display below.

Continue reading “BUS PIRATE: LCD with pinout labels and live info”

Arduboy with removable flash cart

A homebrew Arduboy with removale flash cart from Facelesstech:

I’ll start with the Arduboy its self. I wanted to make a small Arduboy that anyone with basic soldering skills could make. I don’t think its the easies of boards to solder but its the only way I could make it small enough and have all the features I wanted. I just went with the standard SSH1106 0.96″ screen that most people use in their homemade builds. The buttons I went with are the ones I’ve been using on my other RetroPie builds in the past. They are soft touch but they are not mushy like some are and have a small foot print.

More details on Facelesstech homepage.

Check out the video after the break.