Update 7-1-23: I have revised this board a few times--making further small improvements....notes about the revisions as well as how to calibrate the board can be found in the PCBWAY project page here.
Hello again!
Back to posts about embedded C and digital.
From previous posts: I've been working with Raspberry Pi's RP2040 MCU's and the Pico dev boards; unlike Raspberry Pi SBCs, the RP2040 is not backordered everywhere.
I set up a RP2040 development and debug platform for C using an Ubuntu VM; posts about this start here, then ported an AD9833 library I wrote for AVR MCUs to RP2040 (here).
I wanted to embrace a smaller RP2040 Development board for upcoming projects--the Pico dev board is relatively big; I found something small from SEEED--the XIAO RP2040:
As big as a toenail?
Let's motorize this pursuit!
I needed some buffered and clamped ADC inputs--almost all my MCU projects use these. Using the seeed XAIO RP2040 dev board as the parent, I drew up a carrier board in Eagle with buffers and an addition ADC:
I sent this off to this blog's faithful and surprisingly low key sponsors, PCBWAY (get-yer-gerbers here)--whammy bammy, thank you cslammy; boards are back:
|
As always, a shameless plug for my sponsors: please help out this geeky blog and check PCBWAY's site next time you have DIY and maker needs. |
What's Added
....a SPI ADC because I read (here and elsewhere) the built in 12 bit ADCs for the RP2040 are noisy. I plan to experiment with V/octave with this dev board; V/O is sensitive to noise. I also thought it'd be useful to have a 5th ADC available for upcoming SEEED 2040 based projects.
For the ADC IC I used an MCP3201 SPI 12 bit chip; the inverting buffers were inspired by ideas visible from Mutable Instrument's open source designs.
Next step: build it and see if it works:
|
To make the daughter development board plug into breadboards I brought all pins out to an 100mil edge connector....
|
|
ready to test! |
SACRIFICIAL OP AMPS
Once stuffed and powered up, my new dev board worked--for about a minute--then it shorted out.
Nice!
I dug in and found a design stupid mistake:
My design provided the MCP6004 op amp with ground to Vss and +12V to Vdd but the IC's maximum rating is 7V (helps to read the data sheet right? I didn't!).
After a few minutes of operating outside its maximum limit the op amp blew up and shorted between its Vdd and Vss pins, which halted everything else on the board, including the SEEED mini-dev board.
I destroyed two MCP6004's getting to the bottom of this issue. Fortunately the MCU was spared.
|
Trace fix.... |
This issue was pretty easily fixed by cutting the Vdd trace and soldering a wire between the output of the 7805 regulator and Vdd. I will need to get the board fabricated again, however.
I will post a (hopefully) fixed and improved version soon.
UPDATE: Another mistake is that the 78L05 can't source enough current for the RP2040--it sources 100mA but the MCU alone needs more like 130mA. I am replacing it with an L4931 in newer designs, we will see if that helps....
UPDATE!! revised buffer board is back and works...fixes the two issues above and other problems, see the post here. I am not why the board above was drawing so much current--probably a solder blob or some other snafu due to the trace cut--the rev2 board does not have this issue..
With the voltage rail issues sorted, a blink sketch now works...indefinitely.
Does the world need more blink code? probably not. You can get the simple C blink code for the SEEED XAIO 2040 at github, here.
Next up, I want to see if the board will work with the RP2040 ADC, SPI, UART and AD9833 libraries I wrote. I think they will--why wouldn't they; but in my world things almost never work the first time. update--10-5-22 works! RP2040 + AD9833 volt-octave VCO to 7-8 octaves with pretty good accuracy is working on my bench. uses many of these libraries....post is here; embedded C code is here.
I will post again when I make progress or lack thereof. Until then, enjoy spreading your SEEED.