(Now a bi-weekly program)
July 23, 2013
Join the "CWTD Yahoo Group" for email discussion in between our bi-weekly sessions.
Exploring the PSoC
Programmable System on a Chip ... an interesting and capable
"mixed signal" component for the experimenter's workbench~ Page Contents ~
| PSoC Controller | First Program | PSoC SDR Project | Arduino Clock Update | Review: Hollow State Design |
Overview
If you were following along in our recent CWTD episode, we introduced the CWTD PSoC Project ... a small, inexpensive "PSoC" controller that will interface to the popular Softrock Ensemble RX-II, or to the Softrock Lite-II for use as a standalone receiver. The PSoC chip is able to do the clock control, demodulation and I/O device control to let you use the Softrocks as a low-cost, standalone receiver.
This is the technical idea: We're going to couple a PSoC controller chip with the popular Softrock RF front end boards to create a standalone SDR receiver ... without relying on a PC for the SDR processing! The CWTD PSOC Project is a low cost, Programmable System On a Chip controller that has internal digital, analog and DSP blocks that may be configured to perform a wide range of functions for the designer.
Additionally, we'll be giving an update on the Arduino Clock Project, and reviewing the new book out now from Electric Radio, called "Hollow State Design" ... which is an amazing resource for builders and experimenters of vintage tube design projects.
73, George N2APB & Joe N2CX
Podcast ... Right-click to download & listen!
Text Chat window from during the show ...
<20:02:16> "Rick K3IND": www.element14.com/community/thread/2376 has 100 projects for PsoC
<20:02:31> "Joe N2CX": Thanks Rick!
<20:06:25> "Laz K2LAZ": George, thanks for the NUE-PSK modem upgrade; it must be a labor of love for you.
<20:06:54> "Laz K2LAZ": The somewhat significant project of the month.
<20:09:51> "George - N2APB": Glad you got the modem back Laz. Enjoy!
<20:33:04> "Frank N3PUU": I'm here but no mic
<20:33:15> "Frank N3PUU": virtualbox!
<20:33:21> "Frank N3PUU": that likely runs on mac
<20:33:30> "Laz K2LAZ": Great software from oracle
<20:33:58> "Frank N3PUU": and yes I just checked, it does run on OSX
<20:34:22> "Ray K2ULR": OK Frank.... Thanks!
<20:34:34> "Frank N3PUU": Here's a link Ray: https://www.virtualbox.org/wiki/Downloads
<20:34:36> "Laz K2LAZ": https://www.virtualbox.org/
<20:34:56> "Laz K2LAZ": I use it on Windows to run Linux
<20:35:24> "Laz K2LAZ": The web page mentions that Macs as host
<20:35:25> "Al - N8WQ": http://www.cypress.com/?rID=56745
<20:35:38> "Al - N8WQ": at the bottom of page shows what OS's are supported
<20:36:47> "Tom AK2B": http://youtu.be/yemOgok8Elo in this video the designer is using a Mac. Don't know if it is an emulator though.
<20:42:00> "Laz K2LAZ": Imitation is the sincerest form of flattery, but theft is a sin.
<20:42:51> "Joe N2CX": Yes Al The IDE page using a MAC with a VM running Windoze software
<20:47:19> "George - N2APB": Video describing the first demo project you should do (LED Brightness Control ... http://freesoc.net/2012/12/12/psoc-creator-overview/
<21:16:28> "Joe N2CX": Radiotran Designer's Handbook is a very good reference for tube design.
<21:16:55> "Joe N2CX": Make that Radiotron
<21:17:37> "Al - N8WQ": get some juice George
<21:18:17> "Laz K2LAZ": Hats off to Einstein for describing the photoelectric effect.
<21:24:36> "Eamon - VE2EGN/AB1NK": Are you guys aware of the Simple SDR receiver (Using PSOC3)?
<21:24:38> "Eamon - VE2EGN/AB1NK": http://www.simplecircuits.com/SimpleSDR.html
<21:25:09> "Rick K3IND": I'm looking at one right now...
<21:25:09> "Eamon - VE2EGN/AB1NK": sorry... took a while to figure out how to join teamspeak...
<21:25:22> "Al - N8WQ": excellent presentation Joe and George
<21:25:32> "Frank N3PUU": thanks guys, great program tonight!
<21:25:35> "Laz K2LAZ": great presentation
<21:28:37> "Eamon - VE2EGN/AB1NK": They're dedicated FIR filter resources... not in CPU, right?
<21:36:11> "Eamon - VE2EGN/AB1NK": Does PSOC5 go any faster? I wonder if the PSOC3 limitation is a limit in the PsoC Designer, to enforce a max limit that could likely be overclocked on the chip...
<21:36:27> "Eamon - VE2EGN/AB1NK": (in terms of the max frequency)
<21:45:31> "Carl w2ptz": Another great evening. Thanks to all.
<21:47:34> "Ray K2ULR": 73
<21:48:27> "Rick K3IND": 73 all!
<21:49:21> "Ray K2ULR": Alexandersen alternator
The PSoC Controller
While we had first intended to use the Cypress PSoC 3 device, it turns out that a better and more powerful PSoC chip is available: the PSoC 5. And most importantly, we can rely on a convenient and not-too-costly plug-in module containing the PSoC-5. You can read about the "freeSoC" and "freeSoC Mini" boards at ... http://www.kickstarter.com/projects/18182218/freesoc-and-freesoc-mini. The "freeSoC Mini" is what we're thinking of using as the little platform for our CWTD PSoC Project. This is for sale at http://moeller.io/ ...
freeSOC Mini
http://moeller.io/products/freesoc-mini-development-kitTo quote the developer of the freeSOC Mini ... Imagine having the power of an FPGA, the flexibility of a microcontroller, and a handful of precision analog components all integrated into a single development kit. With freeSoC, one chip does it all. Harnessing the power of the powerful PSoC 5 microcontroller, freeSoC is the platform for the maker generation.
PSoC Creator, the free IDE for freeSoC enables you to build your hardware functionality graphically, without grabbing any hookup wire. Need a 16 channel multiplexer? Just drag and drop. Need a couple op-amps to buffer that high-impedance signal? Drag and drop. Want to put USB in your design? Drag and drop.
The freeSoC Mini:
CPU
32-bit Arm Cortex M3
The Cortex M3 MCU in freeSoC offers DC to 67MHz Operation, 256KB Flash Memory, and 64KB SRAM, more than enough for your most complex projects. Hardware multiply and divide operations ensure you'll never be limited by your microcontroller's capabilities.
A graphically configurable external memory interface allows you to expand the storage of your device with up to 1GB of external memory, directly mapped in the 4GB address space of the Cortex M3.
Analog
Dual SAR ADCs
Dual 12-bit, 700ksps SAR ADCs offer unparalleled speed in conversion, even for the most demanding applications
Delta Sigma ADC
The onboard Delta Sigma ADC can be used at any resolution from 20 bits to 8 bits. At 20 bits of resolution, it offers 180 sps, useful for thermocouples or strain gauges. At 16 bits, it will convert at 48000 sps, perfect for audio applications. At 8 bits, it will convert at 384ksps, almost equaling the SAR ADC in conversion speed.
Quad 8-bit DACs
Quad 5.5Msps IDACs allow for extremely fast, extremely precise digital to analog conversion. IDACs can be configured as current sources or current sinks. Alternatively, you can configure them as voltage DACs, for a speed of 1Msps on each DAC.
Quad Comparators
Four built in comparators can be routed to any analog component.
Quad Rail-to-Rail OpAmps
Four OpAmps, spec'd at 3MHz GBW and 10mA drive, can be used to buffer any incoming analog signal, or you can directly connect them to external components in your design. OpAmp outputs can be used through dedicated pins for full current capability, or routed to any internal signal or external pin on the freeSoC.
CapSense
Capacitive Sensing on all GPIO, Sliders, Buttons, and more. Cypress in a leader in capacitive sensing technology, and provides a built in auto-configuration utility, so you can easily implement your capacitive sensing design without the headache of manually configuring the sensitivity.
Quad Multifunction Analog Blocks
These multifunction analog blocks can be configured as programmable gain amplifier, transimpedance amplifier, or for sample and hold. Need a precision current measurement from your photodiode? Just plug it straight into freeSoC, run it through a transimpedance amplifier, pump up the gain with a PGA, and use your delta-sigma ADC for a 20-bit conversion.
Advanced I/O Routing Network
Route any analog peripheral to any GPIO pin on freeSoC. Use your freeSoC as a 32 channel analog multiplexer. Or a 16-channel differential mux. Inputs and outputs both can be routed to any GPIO on the PSoC.
All GPIO can be configured as high-impedance analog, high-impedance digital, open drain (both source and sink configurations), resistive pull up, resistive pull down, or strong drive.
Digital
24 PLD based Universal Digital Blocks (UDBs)
These are the heart of freeSoC's digital flexibility. Can be configured graphically with built in components like PWM, SPI, I2C, LIN, CAN, SPDIF, I2S, Quadrature Decoders, Counters, CRC, and standard digital logic gates.
OR, roll your own components with verilog, tie them into your block diagram like any other component, and get hardware-accelerated speed for your custom digital application. It's like having a built-in FPGA without all the hassle of having an FPGA.
Built-in Timer, PWM, and Counter Components
In addition to the flexible UDBs, freeSoC has four dedicated 16-bit counter/timer blocks, and four dedicated 16-bit PWM blocks. These can be used without using any of the UDB blocks, and can also be routed to any pin on the freeSoC.
Real-time Clock
The freeSoC includes a real-time clock crystal running at 32.768kHz. Use this with the built-in RTC component in PSoC Creator to instantly create a digital clock, with built-in methods for generating year/month/day/hour/minute/second data.
DMA
PSoC Creator lets you configure DMA channels graphically. You can use any digital signal as a trigger for a DMA request, and totally bypass the CPU bottleneck for ultra-high bandwidth applications.
Special I/O
Each board has 8 special I/O pins that can be used for high-current drive applications.
The Full Component Selection Palette, as shown in PSoC Creator
![]()
![]()
Analog Components Digital Components "Other" Components
Designing a PSoC project is like building with LegoTM building blocks!
Step 1) This is the "Design Desktop" ... just drop the desired component onto the desktop!
Step 2) Then Double click each component to open its Configuration window, in which you specify everything needed to make the component do what you want it to!
Step 3) Then click the Main.c tab to view the "software glue" that pulls everything together. Note that this is straightforward C programming, very similar to the way the Arduino is programmed, with an "initialization" area and the "application code" area. The APIs (software functions) available to the designer for use in programming the behavior of the project are all contained as links in the component datasheet, as obtained by clicking the "Datasheet" buttons above in each module's Configure window. Everything the designer needs is contained right there in the PSoC Creator development environment!
Step 4) And lastly, here is the PSoC component itself, annotated with the pinout selections you have made for interface to external components (like the LED and potentiometer) ... After assigning those pin numbers, just click the "Make" button and PSoC Creator will compile everything into a file that gets downloaded to your freeSoC Mini that is connected to the USB port. At that point the project starts running, as you'll see in the YouTube window shown in the next section!
First I downloaded and installed the PSoC Creator "integrated development environment" ... Click on first link in table at bottom of this page ... http://www.cypress.com/?rID=56745
And then I successfully went through the very first tutorial for programming my freeSOC Mini board to produce an LED brightness control via a potentiometer. There is a good video describing the steps for this at ... http://freesoc.net/2012/12/12/psoc-creator-overview/
See the results below! ... How simple can this get?!
So just think, even in this simplest example of creating an LED Brightness Control by dragging symbols to the screen for an ADC, PWM generator and a clock, adding some canned "glue software", compiling the package and downloading it to the reprogrammable PSoC chip ... what a powerful homebrewing and experimenting capability for mixed-signal logic (analog, digital, etc.)
This is really quite a nifty and powerful device and we should be able to find many uses of it for our projects around the shack. As well as, of course, to control the Softrock Lite II receiver card that we started describing during the CWTD show.
"The PSoC Project" ... Using the PSoC 5 as a controller for a low-end ham receiver
Ours is a simplistic design that is guaranteed not to blow the socks off other SDR radios. But it will demonstrate for us experimenters the wealth of programmable circuit functionality that is available in the Cypress PSoC family of controllers. You can see a block diagram below.
We're leading up to actually having the skills and techniques required to do this project ... We should be able to show some progress here in the next episode!
Block Diagram
The RF Front End
And if you don't already have a working, undedicated Softrock to use as an RF front end with this project, you could consider the Five Dash (http://fivedash.com/) "Softrock Rx Ensemble II Receiver Kit" or the "Softrock Lite-II kit" ...
Softrock Lite-II
http://fivedash.com/So, if you wanted to get a head start on things, these are the two components that Joe and I (and a few others) we'll be playing around with as we develop this CWTD PSoC Project. No guarantees or promises yet, but things look promising and we'll keep everyone posted on how we progress. (We already have PSoC-3 boards to experiment with while our "freeSoC Mini" boards are on order!)
RESOURCES
1) freeSoC and freeSoc Mini capabilities overview page ... http://www.kickstarter.com/projects/18182218/freesoc-and-freesoc-mini
2) Buy the freeSoC Mini board ($40) at ... http://moeller.io/products/freesoc-mini-development-kit
3) Download and install the PSoC Creator "integrated development environment". Click on first link in table at bottom of this page ... http://www.cypress.com/?rID=56745
4) Video describing the first demo project you should do (LED Brightness Control ... http://freesoc.net/2012/12/12/psoc-creator-overview/
Project Update: Remote Arduino Clock Display
Here's a quick update on how we're coming along with the plans for the Arduino Clock Project. Recall that we had so far developed:
1) The Base Station Arduino Controller ... the Arduino + RTC + WWV Sync + XBee II wireless transmitter node.
2) The Remote Arduino Display ... the Arduino RBBB + XBee II wireless receiver node + small multiplexed 4-digit 7-seg LED array
The next major step was to get a larger 7-seg LED array in place for easier remote viewing ... and we have the components collected now for that, including a nice 0.8" jumbo-sized LED (from All Electronics, I think), and the MAX7219 serial-interfaced (i2c) LED display driver.
See what's next in store:
![]()
The final (big) step ... Interface 60 individual LEDs around the perimeter of the Remote Display, and have the Arduino RBBB software light the LEDs in sync with the accurate time coming wirelessly from the Base unit ... Coming soon!
(Are you following along with this project on your bench? :-)
Book Review ... "Hollow State Design"
This book is THE best collection of directly-usable information for hams like us interested in designing with, homebrewing with, and analyzing vintage designs. Believe me, you would not regret getting this book ... N2APB
To quote from the ER website ... http://www.ermag.com/index.cfm?v_link=product_detail&v_key=632