WROOM32 based, removable ESP32 module and associated programmer

Bitsoko-ESP32-module-v2

So we have been developing a module for the ESP32 above that we can use. Its based on the ESP WROOM32. The design are made in KICAD. The module is removable from the programmer and can be mounted on a product without soldering which is often useful for testing without having a dedicated programming section per product which increases product cost, for something that will be used once.

There is also an associated minimalistic programmer with a standard JTAG 20 pin header where one can connect a JTAG adapter for debugging. Design specifically contains no surface mount parts so should be easy to assemble without importation. The programmer can also be used as a development board.

The designs are in their initial versions but work well. Details shall be released as the project matures and bugs eliminated.

Sync an external kicad project with a copy within a git repository

When I work on projects, I usually run into the following problem when working with PCB design and code together:

  • I set up a repository using git whose location is at X. This repository contains say, code.
  • I later use a separate design program such as Kicad and start a design project whose location in my computer is at Y.
  • I realize I would like to have my Kicad design files in the repository X for versioning purposes and to synchronize with my team members but I do not feel like changing the current location of my Kicad design directory from Y to X.

Procedure

  • Change working directory to git repository
cd /path/to/git/repo
  • Make an empty bash script file in the current directory named  sync.sh
touch sync.sh
  • Open the file with your fave text editor. I use GNU nano text editor to edit the file
nano kicad_sync.sh

Once the file is open for editing use the

 #Include interpreter path if not in the PATH variable #!/bin/bash #sync any design files that are out of folder source_1="/path/to/external/kicad/folder/Y" dest_1="/path/to/destination/folder/within/this/git/repo/X" mkdir --parents --verbose "$dest_1" cp --recursive --update --interactive --verbose "$source_1"* "$dest_1"

Explanation:

  • #!/bin/bash

    Include the interpreter program if it has not been included in the PATH environment variable.

  • source_1="/path/to/external/kicad/folder/Y"

    Stores the kicad source folder path into variable source_1

  • dest_1="/path/to/destination/folder/within/this/git/repo/X"

    Stores the destination folder path into variable dest_1

  • mkdir --parents --verbose "$dest_1"

The line above creates the directories including the parents if they do not exist. Example: ./design/Kicad may be a non-existent directory in the git folder but the command creates the parent folder /design/ first if it doesnt exist, then creates the folder KIcad after that.

cp --recursive --update --interactive --verbose "$source_1"* "$dest_1"

copy from source_1 all files and folders recursively to dest_1 only if they are updated/new and query  interactively.

  • Save and close the bash script file.
  • Now anytime I would make changes to the PCB design and I would like to put those changes in the git project all I have to do is:
    sh kicad_sync.sh

    The file in the git folder is now updated and I can now then continue with my normal git workflow. Remember to add the local kicad project folder to the staging area then commit.

Guide to choosing the right ingredients for an electronic product/device.

When making business decisions about what to have in a product, the decision factor is not binary whereby the decision is based on expensive/affordable among binary options but is a mix of various factors . The factors also depend on geographical location among other factors.

They include:

  • Access to manufacturers and vendors

    An electronic product hinges heavily on the ability to source the cheapest parts that deliver the expected performance for the expected lifetime of the product thus one needs to source and compare from various vendors. The Internet has been of great help to this.

  • Ability to access design and prototyping tools

    Design tools such as Electronic computer aided design(ECAD) and mechanical computer aided design(MCAD)  tools are the link between the designer and the vendors and manufacturers. Such tools output industry standard file outputs that can be understood by all parties allowing one to work with a manufacturer and send design files using the Internet. Point to note is that some of these tools are free while others are non free.

  • Tax complexity and nature of economy

    The tax complexity affects the selling price of goods and this determines the minimum price point you would theoretically be able to sell in order to break even. The problem is further aggravated in developing countries whereby the purchasing power of a people is low and you thus have an upper limit at which one can sell  each product. The nature of the economy(Manufacturing or service) determines the legislations that are passed that affect businesses as a nation wide legislation that positively affects service sectors doesn’t necessarily affect manufacturing sector positively. complexity-fs8

Fig: Simple illustration of cost-benefit variation vs products sold.

  • Device mobility

    Device mobility is very important especially in developing countries where the mobile sector is very vibrant. The smaller and more portable the device the more favorable is its use. According to a statistical report by Gallup group[1] “Nearly two-thirds (65%) of households in 23 countries in sub-Saharan Africa had at least one mobile phone in 2013, with median growth of 27% since 2008 and median annual growth of 5%.” To put it succinctly in my words- “In a mobile world, go mobile or die!”

  • Ready access to the needed, affordable skill set

    The ability to access local skills that one can use when developing a local/ international product. Such knowledge hinges heavily on the local quality of training in the country and the incentives given to the labor market to invest in their skills for this market.

  • Marketing and shifts in marketing practices

    Go mainstream marketing or go on-line marketing?That is a common question asked. It honestly depends on the market one wishes to serve and the ability to receive statistics that one can directly relate to internal business performance. On-line marketing offers this advantages apart from the normal “Daily reach number” quoted by mainstream marketing avenues.

  • References

  1. Africa Continues Going Mobile by Bob Tortora. Gallup group. May 1, 2014.

Understanding digital delay measurement parameters

There are times when I would need to measure relative propagation delay characteristics of digital waveforms my scope. Usually i would resort to the use of manual cursors until I peeked at the  measurement delay menu and wondered the meaning of FFR, FRF, FFR among other parameters.

More so I did not find any articles on the subject so I decided to jot down what I had learnt as this can be a problem especially when the scope in reach does not readily describe the measurement parameters visually.

 

sds00001-fs8

Each delay measurement is described by a 3 letter mnemonic ABC Examples include those in the scope screen shot above such as FRR, LFR, FFF and so on.

In the case of an arbitrary delay measurement ABC, this is what each letter means:

  • A-Refers to First(F) or last(L) edge of channel 2 in the oscilloscope view. It is closely related to C, the type of falling edge on channel 2.
  • B-Refers to Falling(F) or rising(R) edge of channel 1.
  • C-Refers to Falling(F) or rising(R) edge of channel 2.

Note: Every digital delay measurement is related to the first B edge of channel 1 so it is omitted in ABC.

scope-fs8

USE CASE

This is what each of the 3 letters mean in 2 of the 8 cases:

FRR

  • F-Refers to First(F) edge of channel 2 in the oscilloscope view
  • R-rising(R) edge of channel 1.
  • R-Refers to rising(R) edge of channel 2.

This measurement measures time delay from the first rising edge on channel 1 to the first rising edge on channel 2 in the scope view .

scope_frr-1-fs8

LRR

  • L-Refers to Last(L) edge of channel 2 in the oscilloscope view
  • R-rising(R) edge of channel 1.
  • R-Refers to rising(R) edge of channel 2.

This measurement measures time delay from the first rising edge on channel 1 to the last rising edge on channel 2 in the scope view .

scope_lrr-fs8

 

The rest should now be fairly easy to figure out.

Minimising RF emmisions during circuit probing

When probing a digital circuit, it is best to avoid long wires as may they form accidental antennas. I had a run in with this one when I quickly wanted to check a toggling signal on an Intel Edison. I connected it as below:

 

The waveform I expected:

correct

But what I got:

incorrect

I then pulled out my hackrf and checked the frequencies and found emissions every 20MHz @20, 40, 60… MHz as below:

screenshot-from-2017-01-30-22-05-17

At 60MHz

screenshot-from-2017-01-30-22-12-32

At 80MHz

screenshot-from-2017-01-30-22-13-27

At 120 MHz and a bit at 100MHz though not as much.

screenshot-from-2017-01-30-22-18-02

It then became very noticeable in the 400MHz range and greatest at 440MHz.

When I removed the offending wire, the RF noise stopped as below:

screenshot-from-2017-01-30-22-31-56

whatsapp-image-2017-01-30-at-22-51-28

And a nice clean signal emerged

correct

The offending wire’s length was 33.5cm, I then used an amateur vertical antenna calculator tool to calculate the length for the emission frequency of 440MHz and check if it would match and for sure closely did correspond at 32.4cm.

screenshot-from-2017-01-30-23-41-41