Week 6: Electronics Design

This week's assignment was to "redraw the echo hello-world board, add (at least) a button and LED (with current-limiting resistor), check the design rules, and make it".

As stated in my Week 3 page, I started using Cypress Programmable System on Chip (PSoC) controllers for this class and for my research projects. At the beginning of this month I designed and fabricated my first PSoC 4 development board. In the last 10 days I spent a lot of time designing a PSoC 5 based brushless DC (BLDC) motor controller and a second version of my PSoC 4 development board.

The next sections will talk about the PSoC chips, my custom dev boards and my BLDC driver.

Cypress Programmable System on Chip (PSoC)

"PSoC is the world's only programmable embedded system-on-chip integrating high-performance analog, PLD-based programmable logic, memory and a microcontroller on a single chip." (Source: http://www.cypress.com/psoc/)

This is not a pure microcontroller. This is not a CPLD or a FPGA. This is not a field-programmable array (FPAA). This is a mix of all these different systems in a single chip.



The PSoC 4 family is built around an ARM Cortex-M0 CPU. The chip I'm using for the dev boards, the CY8C4245AXI-483, costs 2$ (1k) and has:

The PSoC 5LP (CY8C5868AXI-LP035) I chose for my BLDC driver is a monster… while it’s more expansive (11.88$ @ 1k) than the PSoC 4, it packs a lot more:

Listing all the features would require me to copy the entire datasheet in this page. This is not the goal. So, in terms of system integration, what can you gain from using a PSoC?

On the software side, everything can be done through the free PSoC Creator 3.0 IDE. It’s also possible to use 3rd party ARM tool suites (like Keil or IAR). It’s possible to program the chip with a graphical user interface: you drag modules and you link them together with virtual wires. At Build time, those modules are converted in hardware connections and C code. Here’s a screen shot of the Pioneer 4 LED blinker demo project (with the PWM configuration GUI open):



It’s important to note that you can do everything in pure C if you want. So far, using a mix of blocks + C has allowed me to prototype systems in a few minutes. Much faster than having to go deep in the datasheet when all I want is to quickly test a sensor!

After 10 years of using almost exclusively Microchip MCU (PIC18, PIC24, dsPIC30F, dsPIC33F, dsPIC33E and PIC32) for projects and work, I must say that the PSoC are quite refreshing. Yes, many MCUs are more powerful than PICs, but more computing horsepower is not always what you need to design a better system. Having reconfigurable hardware is extremely useful, especially when it’s that cheap and easy to use.

PSoC 4 Development board

Software(s): Altium Designer 13 (ECAD), Solidworks (MCAD, for the component libs), PSoC Creator 3.0

The first version was minimalist:





Yet, it allowed me to test the PSoC 4. I modified some of the Pioneer 4 example code and ran them on my board. I quickly realized that my design was not robust enough for the low-quality FR1 PCBs: the expansion pads are extremely easy to rip off. This is why on the picture you can see white tape holding all the wires and the board on my desk. Willing to test more peripherals and code on these awesome chips, I designed a second version of the development board. This one has more features:

On the following picture you can see the actual state of the PCB. Note that some components are missing, as I’m waiting for my Digikey order. I assembled the core components with the leftovers from v0.1. The board is currently programmed as a binary counter. When you tap your finger on the capacitive sensor, the count increases.





PSoC 5 BDLC Test Board

Software(s): Altium Designer 13 (ECAD), Solidworks (MCAD, for the component libs), PSoC Creator 3.0

I've developed multiple BLDC drive over the last 5 years. They all had one point in common: they were based on a Microchip dsPIC. These MCU are extremely common in motor control application (and many other fields). They are handy chip with good capabilities. However, for this new design I opted for a PSoC 5LP. Doing so is a good way to avoid IP problems: I have no other choice but to start from scratch. It's also a good occasion to try these chips. On that design I'll use a lot of the available peripherals. If things go as planned, I'll be able to have a working design much faster than with a "conventional" MCU approach. This board also has the potential to be smaller and more integrated for less or equal money.

v0.1 is far from being complete. On purpose I kept the system as simple as possible. The goal here is to do BLDC commutation with the PSoC, and to test some of the peripherals. There is enough hardware on this board to make a sensored BLDC motor spin.





I'll receive the PCBs at the end of the week. More details to come.

Week 1 Week 2 Week 3 Week 4 Week 5 Week 6 Week 7 Week 8 Week 9 Week 10 Week 11 Week 12 Week 13 Week 14 Week 15

Jean-Francois (Jeff) Duval - jfduval(@)media(.)mit(.)edu - 2013
Top | MIT Media Lab | How To Make (almost) Anything 2013 | Index
"Hidden" keywords: Jean-François Duval, JFDuval, Jeff Duval, PCB, Dishpenser, MIT Media Lab, Biomechatronics, Electronics, Robotics, DIY, Hack, Hacker