Update:
My ADC feature request on Espressif’s BBS has had 118 views. Unfortunately no word from the developers. This might mean I have to add an ADC chip to the design.
The problem:
I’ve been thinking about the level shifter and why it was causing my software to crash. 10M Ohm and 10pF capacitance are very small loads. The software crashing just because a scope probe is connecting is very bad.(stating the obvious)
The hypothesis:
Bidirectional level shifters are typically designed to react quickly to transitions and drive very weakly in the steady state. With the target pins unconnected the shifter is steady state and the scope probe might be enough to cause a problem.
The Experiment:
Putting a 1M pullup resistor on each target pin should stabilize the pins and stop the scope probe from loading the circuit sufficiently to cause problems. If I can hook up the scope probe and the processor runs as well as without the probe and resistor, this would support my hypothesis.
The result:
I soldered a SMT 1206 resistor to each target IO connection and a buss wire to Vt on top of them. Not very pretty, but it is enough for testing. I connected the scope probe to the same line as last week.
And the code runs as well as before ever connecting up the scope probe. The level shifter is putting the data from the SPI at 20Mb/s with clean waveforms.
Conclusion:
This gives me a little more confidence to move forward with the design. I am still contemplating changing the design to connect to a Raspberry PI Zero as the main controller. I think the analysis deserves a post of it’s own.
The side project:
I am working on the compass toy as well. I have changed my mind several times concerning which processor I am going to use. At this point I am thinking the PIC microprocessor is the best choice for price and performance. Unfortunately the PIC processor is harder to set up in the Arduino IDE. If I go with the PIC processor, I will have to do a lot more work to make it accessible to beginners.
Time to weigh in:
Should I stick with the ESP8266? Should I move to the Raspberry PI? Is WiFi an important feature?