Designing Cypress Capsense CY8C20110 Breakout Board - Sanity Check?

Discussion in 'Embedded Systems and Microcontrollers' started by voidptr, Dec 20, 2012.

  1. voidptr

    Thread Starter New Member

    Dec 2, 2012
    I'm working on an interactive art piece and want to integrate capacitive sensors to various parts of the sculpture that are up to two meters away from the main control board (a chipKit Max32). The easiest way to do that seems to be using a bunch of (~100) Cypress Capsense ICs on an I2C bus using twisted pair cat5 cable.

    So far so good. Now the hard bit: Because I am space constrained (no more than .5" in one dimension), there aren't any existing capacitive sensor breakout boards on the market that will work for my needs. Further, since I'm going to need so many, buying them off SparkFun at $9.99 a pop would be cost-prohibitive. So, in order to use the ICs, I've settled on printing a bunch of breakout boards myself with the appropriate circuits on them to talk on the I2C and control up to ten capacitive sensors each.

    I've got a design (attached below, ExpressPCB format), and would like a sanity check. I've never designed a circuit board before, and am a relative novice to digital (or any!) circuits, though I've been futzing with various Arduinos for a few years now.

    I followed the example schematic on the CY8C20110 datasheet (also attached, fig 4, page 6), including the labeling of the capacitors and resistors, etc., except for having all sensors instead of a mix of LEDs and sensors.

    Please, tell me what I did wrong, what is bad practice, any feedback really.

  2. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    Wow, very good first post. You've clearly defined your goal, stated your issue, and supplied links to the device. I like it.

    Ummm, mind if I change your direction just a bit? Even at $10 a switch Sparkfun may well be cheaper then ExpressPCB for the boards. We'll get there later.

    First off, I2C needs a different address for every device (slave) on the I2C bus. Searching the CY8 device for several minutes (a brief glance) I could not find how they change the address... it may be possible to have some 100 discrete addresses for 100 cap sense buttons but I believe you may be over the limit: I2C in basic mode is limited to some 127 address.

    You can do several I2C buses... each driving some max amount of units. Any pair of pins on a micro can be used to run an I2C bus, so don't toss the idea yet.

    As far as your PCB goes... you can't put a hole in the edge like you have, it gets kicked out (I don't think you can even get the order to place). All features must be a certain distance inside the edge. The SMD resistors on the back side (green lands) have their silk screen on the front side... just something the free editor does.

    The good news is overall it's a workable board. You may want to move the thru hole vias off the pads some... that's tight but should be doable, but with the pads inside the leads what's gonna happen is when you solder these the solder will tend to disappear down the via hole and away from the lead. Putting the pad to the outside of the lead lets you see it sucking down.

    (Just take your email off it before you post it again <grin> ).

    While I really appreciate ExpressPCB and have used them many times I have lately discovered the wonders of inexpensive Chinese PCB production. I just got 10 boards about 2x2" with solder mask and silk screen for about $25. They took a month from order to package, 3 weeks was ship time as I went with the cheapest. I did get them much sooner from another place, some 60 (smaller) boards for 60 bucks in 2 weeks. To use these places you need gerber files, meaning you need another layout program. I use Kicad (free) for that.

    Have you checked your sensor pads yet? That part is weird, I did some cap buttons and sensors once, and found all the nice app note pictures of "how stuff works" must all be copied from each other as they are consistent from manufacturer to manufacturer and false to fact from what my measurements showed. A basic button is easy, I was looking to sense water up to half an inch from my metal (and yes it can be done).

    Your homework is to check how many I2C addresses your sensor IC can handle, and then to actually build and test the cap button before you spend lots of money on PCBs.

    Good luck with your project and welcome to the forums.
  3. voidptr

    Thread Starter New Member

    Dec 2, 2012
    Thanks! :D

    I was planning on squishing them 12 to a board via ExpressPCB. At ~$75 for 3 identical barebones boards, I could get the entire run for probably $200. But, after having posted this message, I discovered AdaFruit's PCB costing page, which indicates much more affordable options. In any case, I am very reluctant to pursue the full run without having a prototype board to test, so I may go the SparkFun BatchPCB route for the first couple. :/
    In fact, the boards DO support changeable 7-bit addresses. It took a while for me to find it too, but the idea is that you hook up each IC to a programming harness and write the setup information to NV memory, along with whatever other configuration information. I am continually amazed by how much information is available in these datasheets.

    I will probably still do a series of separate I2C buses, though, just for sanity's sake.
    I was planning to cut them apart myself. The hole is to provide a waist to be able to ziptie the boards to my finished piece. This may or may not be a dumb idea. :)
    Great advice! This is exactly what I was looking for.
    It's the throwaway project email. If it gets too spammy, I'll just kill the address. :)
    A link to your manufacturer would be delightful! I downloaded Eagle Free and it was a bit horrifying. I'll check out Kicad.
    I've been making capacitive sensors for other projects using the Arduino CapSense library, that uses two digital pins and a high-value resistor. It's amazing what you can do with just copper tape.

    For this project, the sensors will be wide copper rings hidden inside plexiglass tubes with 1/8th inch wall thickness. Per the datasheet, the cover over the sensor can be up to 5mm when using a capacitor connected to the CSint pin, so this *should* be ok. I've already sourced a set of samples of this IC and plan to breadboard and test out my sensors pretty soon.
    Thank you very very much for your reply! Chock full of excellent advice! :D
  4. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    Kicad will probably be just as horrifying. These are good design tools but have steep learning curves as they have their pattern to follow: you do a schematic, define the component footprints, link them in a "netlist," then lay out the board. The good news is now the layout program knows what goes where so it tells you about mistakes, but that's when you work with it like it want you to work with it. ExpressPCB's program allows you to go right to the board which for something simple may be all you want to do.

    It's encouraging you're already experimented with cap buttons, they work well when you have the basic pattern down. Seems you're on the right track there. I would worry you'll spend $200 on a set of green coasters that don't work in your project.

    My two cheapie Chinese PCB guys are or and Both have those EBay sites (that's how I found them) but you can go direct to them, and they accept Paypal so you need not worry they run off with your bank account.