Skip to main content

Design Hardware With The imp003

Required Components, Board Layout Recommendations And Best Practices

The imp003 module offers great WiFi performance and easy integration of the Electric Imp platform in a small, inexpensive package. Because the imp003 does not include the WiFi antenna and several supporting components in the module package, some care must be taken beyond that required for other module-based designs. This guide will walk you through the necessary steps to getting excellent performance from an imp003-based design.


Required Components: All Designs

Your design will require the following in addition to the imp003 module:

1. Phototransistor to sense the BlinkUp™ signal used to configure WiFi

The required circuit is very simple: you just need a phototransistor and a resistor.

  • Your phototransistor must be able to sense visible light. Do not use a phototransistor with a visible-light filter. Refer to the imp003 datasheet for a list of recommended parts.

  • The value of the bias resistor used in the BlinkUp detection circuit will depend greatly on your mechanical design and on the opto-electrical components you have selected. This value will need to be tuned to suit your design, by following the BlinkUp Tuning Guide. A larger value for RBIAS will result in a larger signal during BlinkUp, but also makes your design more susceptible to saturation from ambient light. A smaller value reduces sensitivity to ambient light, but will produce a smaller signal during BlinkUp. A 22kΩ to 68kΩ resistor is a good place to start tuning.

2. Bi-color (Red/Green) LED to allow the imp to show users its WiFi status

This LED uses different color patterns to show different status conditions (see the BlinkUp codes guide for more information).

  • Your LED configuration needs to be able to produce three colors: red, green and amber. Most designs use a single bicolor LED to achieve this; some use two discrete LEDs and a lightpipe.

  • You may use either a common-cathode or a common-anode LED in your design; the imp003 will detect the LED polarity automatically. Two-pin (“either-or”) bicolor LEDs are not supported: it must be possible to turn red and green on at the same time. A list of recommended bicolor LEDs is available in the imp003 datasheet.

  • A 10kΩ resistor is required in parallel with the red side of the bicolor LED to allow the imp to detect LED polarity.

BlinkUp detection and bicolor LED circuit

3. 4.7µF bypass capacitor and 0.1µF filter capacitor on each VDD domain

These capacitors are required to prevent noise from coupling into the imp003’s power supply and to help buffer the power supply rail during load spikes caused by running the radio. Including these components is critical for meeting FCC and other wireless certification requirements for a manufactured product. A bypass and filter capacitor are required for:

  • VDD
  • VDD_PA, the power amplifier domain
  • VDD_WLAN, the WiFi radio domain

Bypass and Filter capacitors on the imp003 Wireless Certification reference design

4. 4Mbit or larger SPI flash

An external SPI flash part is mandatory. The minimum size of the SPI Flash is 4Mbit (512kB), and the maximum size is 128Mbit (16MB). The area below address 0x70000 (448KB) is reserved for use by the OS. The remainder of the available space is made available to user code programmatically through the Spiflash class. Areas below address 0x70000 will be erased and reprogrammed by the OS; applications using pre-programmed SPI flash components must not use space below this address. See the imp003 datasheet for a list of recommended parts.

Note The imp003’s SPI flash chip must support both 4kB and 64kB erases across the entire device and the Page Program command (command 0x02). You must also ensure that the SPI flash you use is able to run down to the minimum operational voltage of the imp003 to ensure that the SPI flash is operational at all times that the imp is operational. This is critical during upgrades in low battery states. If you are running from a single LiMnO2 cell (eg. CR123), you should use a wide voltage range SPI flash that is operational from 1.7-3.6V such as the Macronix MX25R8035FM2IH0.

SPI flash on the imp003 Wireless Certification reference design

5. Inductor and capacitor for internal DC/DC switching regulator

The imp003 module includes an internal DC/DC regulator used by the WiFi radio. This requires that an inductor and capacitor be placed adjacent to the module. The required part numbers are available in the imp003 datasheet. Note that the low side of the required capacitor must not be connected directly to the ground plane on the top layer; some effective series resistance is required. Route ground from the internal ground plane to the low side of this capacitor with a via to provide the required ESR.

6. Antenna matching components

The RF trace from the imp003’s RF_OUT pin to the antenna used in your design must be impedance-controlled (more information in RF Trace Routing, below). Your antenna will require matching components in order to achieve a good 50Ω impedance match to maximize antenna efficiency and minimize Standing Wave Ratio (SWR) on your RF line. The value of these matching components will depend on your antenna design.

Required Components: Low-Power Designs

If your design requires that the imp be able to enter low-power sleep, the following components are also required:

1. 32kHz Crystal

The imp003 does not include an internal timing crystal to run the internal Real-Time-Clock (RTC) while the imp is in deep sleep. If your design requires that the imp be capable of low-power deep sleep, it must include the crystal so that the imp can set timers and use them as a wake source. See the imp003 datasheet for a list of recommended 32kHz crystals. (Note: Make sure the crystal has a load capacitance of 6pF. Higher values may prevent the oscillator from starting up.)

imp003 with 32kHz Crystal

If you are not connecting a 32kHz crystal, the imp003’s OSC32_IN pin must be tied to ground, either directly or through a 0Ω resistor.

2. Load Switch

The imp003 requires an external load switch in order to disconnect power from the high-power VDD_WLAN and VDD_PA domains when sleeping. This prevents wasteful power consumption when the radio is not in use. See the imp003 datasheet for a list of recommended load switches.

imp003 power domains for low-power designs

imp003 load switch

Important Design Considerations

The imp003’s IO pins can only source or sink up to 8mA each

Applying more load than this to the imp003’s pins will damage the module. If your design requires you to move more current around, use an imp pin to switch a FET or transistor.

The imp is not 5V tolerant

Your design must not expose any of the imp003’s pins to a voltage greater than VDD (the supply voltage provided to the module). Consult the imp003 datasheet for more information on electrical characteristics and absolute maximum ratings.

VDDA must be connected

The VDDA pin on the imp003 is used to provide the power supply used for the module’s analog-to-digital converters, which are used during BlinkUp and whenever squirrel application code requires them. Most designs can simply connect VDDA to VDD. Some designs might wish to use a separate supply rail for better isolation and reduced noise, like the Lala reference design. If a separate supply is used, it must be able to source 500µA, and must not exceed VDD at any time. Note that this means that during power-on, the VDDA rail must not come up faster than VDD. Note that VSSA, the analog ground, must also be properly connected.

Use external pull-up or pull-down resistors to set a default state for nets that must not float

The imp003’s internal pull-up or pull-down resistors will be cleared when the imp reboots, and these nets will be tri-stated.

Tie the imp003’s OSC32_IN pin to ground in all designs that do not use low-power mode

If you are not connecting a 32kHz crystal, the imp003’s OSC32_IN pin must be tied to ground, either directly or through a 0Ω resistor.

PCB Layout Guidelines

It’s very important that your design follow a few simple rules when it comes time to place and route your printed circuit board in order to take advantage of the imp003’s simplicity and maximize performance.

Minimize impedance to ground

The imp003’s ground pins should have a clear path back to ground, without running through many narrow traces or bottlenecking at a single via. While a via may be rated for much more DC current than your design calls for, the impedance of the ground path needs to be as low as possible to prevent noise from becoming a problem in your design. This applies to other parts of your design as well, so minimize ground impedance everywhere.

  • Use Ground Pours Flood ground on the top and bottom of your PCB to provide a good ground path to all components. The imp003’s antenna tuning ‘expects’ a ground pour under the non-antenna portion of the imp. If the ground pour is omitted, the antenna will be de-tuned, which will negatively impact range and performance, and may prevent your product from passing wireless certifications.

  • Stitch ground planes around the edge of your board and throughout the interior of the board. Use more vias than you need for the DC current your circuit requires; this will lower the impedance of the ground paths and reduce noise.

Place bypass and filter capacitors as close to VDD pins as possible

Bypass capacitors will dump noise to ground, but if the trace on the filtered side is long, it presents an opportunity for that trace to pick up noise again.

Do not tie VDD domains together

Route power from the power supply line or internal power plane up to each VDD domain separately. VDD pins in a single VDD domain (VDD, VDD_PA, VDD_WLAN) may be tied together directly, but must not be tied directly to pins in another VDD domain.

Separate traces used to route power from the power plane to VDD_PA and VDD_WLAN

Use a via to provide required resistance for on-board DC/DC regulator

The imp003 module includes an internal DC/DC regulator used by the WiFi radio; this requires an external inductor and capacitor. Do not connect the low side of this capacitor directly to your top ground plane; some effective series resistance (ESR) is required between this capacitor and ground. Route the low side of the capacitor to ground on the ground layer or bottom of the board through a via to provide the required ESR.

Routing the low side of the DC/DC's capacitor through a via to ground to provide required ESR

Pull back top-layer ground pour around 32kHz crystal

The parasitic capacitance of a nearby ground plane may exceed the required load capacitance for your 32kHz crystal (if used). To avoid de-tuning the crystal (which can severely affect performance or prevent the imp003 from operating entirely), pull ground pours back around the 32kHz crystal and cystal load capacitors.

Ground Pour pulled back around 32kHz crystal

A poorly-routed switching power supply will send noise all over the board and severely impact performance and range. This is easily avoided by following the recommended layout in the datasheet for nearly any switching power supply IC.

Recommended Layout for the TPS62172 Buck Regulator, as shown in TI’s datasheet

Noise on your board directly diminishes your WiFi performance, and can prevent you from passing FCC certifications. Keep all noisy parts (switching power supplies, high-speed signaling) as far from the imp’s antenna as possible.

Prioritize your signal routings

Routing signals in the correct order can significantly simplify a design:

  • Place your power supply and route VDD It’s generally a good idea to avoid vias on your power supply rail; these increase the impedance of the trace and create an opportunity for noise to impact your design.

  • Route high-speed signals directly and avoid vias By keeping the path between devices that communicate over a high-speed interface such as SPI direct and short, you minimize the possibility that noise will couple into the line, or that the signals on the line will couple into other parts of your design as noise.

  • Keep analog signals clear of noisy digital signals, and route them as directly as you can Routing an analog signal right next to a digital signal creates an opportunity for digital noise to couple into the analog signal. Keep them apart and pour ground in between to provide some shielding.

  • Route GPIOs last A signal which is simply used to poll a button or toggle an LED does not need special considerations. If a GPIO signal crosses a higher-priority signal such as a SPI bus or an analog line, the lower-priority signal should via around the higher-priority one.

PCB Requirements

Because a board incorporating the imp003 must include a microstrip transmission line from the imp003 to the antenna, a four-layer PCB is required in order to achieve 50Ω impedance control of the RF trace.

A 4-layer PCB is also required in order to gain access to the inner row of pads in the imp003’s LGA footprint. Access to these pads will also require smaller vias than are typically used on a low-density 2-layer PCB design.

RF Trace Routing

Electric Imp has performed pre-testing and FCC modular certification for two antenna designs for the imp003: PCB Trace ‘Inverted-F’ antenna (‘PIFA’) and an SMT Chip Antenna. Designs derived from these reference designs, using the same layer stackup and antenna design, and carefully adhering to the relevant layout guidelines here, may attach and re-use the relevant modular certification rather than repeating FCC intentional emitter testing.

Note that modular certification is only available for the 1.6mm board thickness. Design files are provided for the PIFA design in 1.0mm thickness, but this design is not pre-certified.

Layer Stackup

Modular pre-certification has been performed with the layer stackup shown below. If a different layer stackup is used, modular certification may not be used. Note that changing the layer stackup will also affect the values of the RF matching components and possibly the dimensions of the RF trace in order to maintain a 50Ω characteristic impedance.

Layer Stack used for imp003 pre-certified design

RF Trace

The RF trace must be a 50Ω ± 2Ω impedance controlled transmission line which is referenced to a solid, unbroken ground. The trace width and distance to the ground plane must be adjusted to achieve the target impedance. The trace should not have sharp changes in direction and should use curved traces when needed.

The RF trace on the imp003 pre-certified design from the RF_OUT pad to the antenna feed

The RF_OUT pad on the imp003 is surrounded by ground pads; these should be tied together to form a a ground reference around the end of the RF trace. The RF trace should be kept as short as possible. Sharp bends should be avoided in the RF trace.

Detail view of the RF_OUT pad on the imp003 pre-certified design

PIFA Antenna

The antenna must be placed at the edge of the PCB, with a copper keep-out under the entire antenna element on all PCB layers. No other traces or components may be placed in this region. A row of stitching vias is required along the edge of the ground pour below the antenna section; this ground pour, including the vias, is part of the antenna. The module, antenna, and RF trace must all be placed on the top layer of the board.

The PIFA Antenna may be mirrored (left/right) as required for mechanical design as long as the dimensions of the antenna are preserved and all other design rules are followed.

The PIFA Antenna

Chip Antenna

The antenna must be placed at the edge of the PCB, with a copper keep-out under the entire antenna on all PCB layers. No other traces or components may be placed in this region. A row of stitching vias is required along the edge of the ground pour below the antenna section. The module, antenna and RF trace must all be placed on the top layer of the board.

The SMT Antenna recommended in the reference design is available in right-handed and left-handed versions; both are permitted for modular certification provided all other design rules are followed.

The SMT Chip Antenna

RF Testing

Final imp003-based designs may be required to undergo RF testing and certification. To do this, you must:

  • Place an imp003 pre-programmed with RF test software on the final board.
  • Modify the board to attach an FTDI USB-to-Serial cable to uartQR on the imp UART pins.
  • Run RF test software on a host PC to place the RF test imp’s radio in different modes.

To be able to perform this procedure, the imp003’s UART pins must be made accessible in the final board design as these will be used to connect the imp to the host PC via the FTDI cable. The imp containing the RF test software is not able to run Squirrel code, so peripheral devices connected to it will not be configured in the usual manner. If any are required to be configured for the RF test, they will need to be configured separately.

For more information, please see the imp003 RF Certification Guide.

LED Error Codes

Because the imp003 loads WiFi configuration and operating system data from an external flash unit, it must check that external flash is connected and can be read. This takes place at start-up, and any errors encountered are signalled on the three-color LED attached to the imp003. The following table lists these error signals; click on an error’s Play link to view an animation of the LED pattern.

SPI Flash not found  500ms 250ms Repeat
SPI Flash error  500ms 250ms Repeat

imp003 Design Checklist

  • BlinkUp phototransistor has clear lens
  • BlinkUp RBIAS value tuned for best performance
  • Status LED uses a supported bicolor LED
  • Status LED has 10kΩ resistor in parallel with red LED for polarity detection
  • 4Mbit or larger SPI flash included with no pre-programmed content below address 0x70000
  • Required inductor and capacitor included for onboard DC/DC regulator
  • Required bypass and filter capacitors on each VDD domain
  • VDDA connected and properly sequenced
  • 32kHz crystal included, if appropriate, with correctly-sized load capacitors
  • If no 32kHz crystal is to be used, tie the OSC32_IN pin to ground
  • Load switch included, if appropriate
  • No imp003 pins exposed to voltages exceeding VDD
  • No imp003 pins sourcing or sinking more than 8mA per pin
  • VDD domains routed separately from power plane or power feed
  • Onboard DC/DC capacitor tied to ground through a via
  • Ground pour pulled back around 32kHz crystal, if used
  • RF_OUT trace impedance controlled to 50Ω, with RF Trace Routing guidelines followed
  • Antenna matching components included as appropriate
  • Antenna routing guidelines and keepouts followed
  • Any switching power supply has been routed according to manufacturer’s recommendation
  • Power lines routed cleanly and directly, with high-speed lines routed at next-highest priority
  • Ground pours included on top and bottom layers
  • Ground pours stitched together around board edge

impOS Image Download

Get the latest impOS firmware for pre-installation on device SPI flash.

Document History

Date Notes
November 24, 2021 Add link to impOS downloads page
August 03, 2018 Correct imp003 datasheet links
April 11, 2017 Noted RF test UART is uartQR
August 12, 2016 Updated SPI flash requirements