You are here

Cypress Maker Lab - Barc gets a nose | Cypress Semiconductor

Cypress Maker Lab - Barc gets a nose

If you read my last post about Barc you will know that I was feeling pretty confident prior to the Embedded World show. All I needed to do was add some CapSense proximity loops (a.k.a. wires) to the robot, tune the CapSense sensors, and add a simple firmware state machine to move the robot based on which sensor notices a nearby hand. Simple!

And, for the most part it was. I fashioned a head for the dog from ABS plastic and taped in three loops of wire facing (pun intended) the front, left and right. I connected the wires to PSoC pins via the breadboard and got ready to finish the PSoC Creator project. Here are some pictures.

 Cypress Maker Lab - Barc robot dog Cypress Maker Lab - Barc robot dog

More alert readers will notice that the color of the PSoC kit has changed. More on that in a moment. Some will also see that programming the kit now requires me to feed the USB cable through the dog's mouth. Oops. That is pretty silly and, now I have done it about 600 times, I strongly advocate turning the kit around by 180 degrees. Unfortunately that would require me to rip off the breadboard and battery pack, which would make a nasty mess of the robot. I really do not want to do that… so I decided to live with it. And anyone who has tried measuring or tuning a sensitive electrical circuit like a proximity sensor will see that it is going to be tricky to get right with a big shielded cable running straight through the middle of the loop! I am, officially, a twit.

Then things got worse. My boss called. He never does that. So I knew it was likely bad news on the eve of Embedded World.

Boss: So, how is the robot car coming along?


Just fine Boss.
Boss: Will it be ready for the show? We need you talking in our theater three times day.


No problem. I am just tuning the CapSense so that the dog will chase me around the floor.
Boss: Good. I saw the last blog and it looks like you are using the PSoC 5LP kit.


Yyyyeeeessssss. And?
Boss: Well we brought out the PSoC 4 kits and they have the next generation CapSense IP.


I am building a robot dog. No-one will notice.
Boss: Well we brought out the PSoC 4 kits and they have the next generation CapSense IP.


I am building a robot dog. It has wire loops taped inside its skull. No-one will notice.
Boss: Well we brought out the PSoC 4 kits and they have the next generation CapSense IP.
Me: OK.
Boss: Good talk!


It was very reminiscent of the famous Office Space movie and the end result was weekend work for me. The good news is that I already had a handy PSoC 4 M-series prototyping kit - a pretty red one at that - and that changing the design in PSoC Creator took less time than it took to go another round with the soldering iron. In the time-honored tradition I swapped the kits and had the design working again in about an hour, then I told the boss I worked all weekend. It's a rule…

So, for the tuning, I added a CapSense component and an EZI2C to the project. The I2C is used as a bridge between the tuning software and the target. It can update the CapSense parameters live, which really helps you iterate to a solution. In the CapSense component I set up three proximity sensors, named FRONT, LEFT sand RIGHT, and selected manual tuning.


Cypress Maker Lab - Barc robot dog


I also turned on filtering (in the Advanced tab) to remove as much noise as possible. This turned out to be really important at the show because the noise - probably from the very static-y carpet - was way higher than on my hardwood floors at home. I shall put the full list of CapSense edits in the project file, which I will post in a blog once I finish the whole project.

Here is the C code I wrote to run the tuner. In the I2C code I just tell it about a buffer (CapSense_dsRam) in the CapSense code and the tuner program uses this to communicate with the device. To avoid a lot of silliness - chasing a robot dog around the room - I did not start the PWM while I was tuning!


    /* Start EZI2C component and prepare it for tuning */



        sizeof( CapSense_dsRam ),

        sizeof( CapSense_dsRam ),

        (uint8 *) &CapSense_dsRam );   

    CapSense_Start();               // Turn on CapSense   



        /* Start a scan and wait for it to complete */


        while( CapSense_IsBusy() )


            /* Busy loop */


        CapSense_ProcessAllWidgets();   // Read all sensors and determine widget status

        CapSense_RunTuner();            // Send data to tuner (I2C)



After building and programming I right-clicked the CapSense component and selected "Run Tuner". The tuner starts up and looks like this.

Cypress Maker Lab - Barc robot dog


​I start tuning in the graph view. CapSense uses a "raw count" value from its sensors and it is best to set the baseline value to 80% of maximum so there is room for the counts to go up (when a hand is close) and noise is minimized. You adjust the resolution and Modulation IDAC values to make that happen. Increasing the resolution  improves the range of the sensor but also increases scan time (I do not care much in this application). Increasing the IDAC pulls the raw count value down to that 80% point.


Cypress Maker Lab - Barc robot dog


Once I have that working I use the SNR Measurement tab. You just select the sensor and Acquire Noise. Then you put your hand by the sensor and Acquire Signal. It tells you the noise level and the SNR, which should be above 5.


Cypress Maker Lab - Barc robot dog


I'm in good shape now. I set the Noise and negative Noise Thresholds to 5, which leaves a little wiggle room versus the measured value of 3. The Proximity threshold is 10, which is much closer to the noise than I would like, BUT I want maximum sensitivity and, if I do get some false readings it gives my dog a will of his own! I set the Touch Threshold to 100 which means that the sensor can register both proximity and, if I get really close, a touch. I might use that in the final project to change Barc's behavior in firmware.


Cypress Maker Lab - Barc robot dog


As a sanity check I look at the Status graph, which shows the off / proximity / touch readings as I move my hand around the robot.


Cypress Maker Lab - Barc robot dog


Once I have the settings I like I can send them To Project and quit the tuner. Back in PSoC Creator I open the parameter editor for CapSense and it lets me accept the edits from the tuner. Now, when I rebuild the program I have the tuned IDAC and threshold values for the left sensor.


Cypress Maker Lab - Barc robot dog


I added a little code to the program, turned the PWM back on, and checked that my doggy reacts to my hand.


        if( CapSense_IsWidgetActive( CapSense_RIGHT_WDGT_ID ) )


            PWM_Speed_WriteCompare2( 40 );




            PWM_Speed_WriteCompare2( 0 );


Here is a video of Barc sensing a hand near his face - did you notice that I actually video'd the left sensor instead of the right?


When I get back from vacation I will post my final Barc blog. I will complete the tuning of the other sensors and add a simple state machine to drive the motors and make him follow my hand. I will also include a bill of materials so you can re-create your own robot, with PSoC, for about $50.


kristincarrier13_2469701's picture

 I am against of any robot, even small ones. In future we will only harm ourselves with them. Unmanned vehicles of any kind will be the targets of vandalism, hacking, and other mischief. What does a robot car do if a crowd of people just walks into the road and surrounds it? This will give rise to all sorts of tactics for self-defense, monitoring, police notification. And that is only half of what can happen if we do not come to senses. Sorry, but it is my opinion, and I have right to typemyessay here I hope you will not delete opinion that criticize. 

valmirmehmet_2513531's picture

I definitely agree with Kristian here, robots are making our life easier but in someways are making us inactive and feeling like doing nothing. There was a topic that has been published on supremedissertations where talked about this thread in details, once I find it out I would really share it. 

jordanss123 jordanss123's picture

assignment代写 hat is actually an awesome thought. I was searching for an extraordinary pizza cottage school transport figure 8 races benefit,


jordanss123 jordanss123's picture

fake yeezy boost 350 I thought it was going to be some boring old post


meganmartin704_2568366's picture

I am doing Post-Graduation in Robots Technology from the University of Bradford. When I face any issue in academic projects so I prefer to get help from Cypress Maker Lab and UK Assignment Help companies. I really found this Barc technology outstanding along with new ideas.

sharlynwilliam001_2580452's picture

Data about red nose pitbulls!? It would be ideal if you 

I simply got a pit as a pet. Also, get assignment help online it has a mean looking face. However, I truly don't have the foggiest idea about these pooches foundation. All the data you can give me is awesome! :)

itsalinaolive_2580437's picture

I emphatically advocate turning the pack around by 180 degrees. Shockingly that would oblige me to rip off the breadboard and battery pack, Do My Homework. which would make a terrible chaos of the robot.

Christopher Hardy's picture

What did you say does a robot automobile do if a crowd of people simply walks into the street and surrounds it. Writing is not an easy task. it should have skill and should how to portrait it. Essay Writing Service will be the best companion for the students in doing their academic writing task.

jordanlamm_2595026's picture

Well, they might end up to powerfull and do the even as robot take over component. Or, the much more likely to show up, they might make human beings even extra lazy and do an excessive amount of for us. Assignment Writing Service UK also connect with UK students of Computer science to help out for complete assignment before given deadline.

atkinsonsirena_2600576's picture

Well, news and information is definitely something you should follow-especially by the cypress. Being someone who works at Real Assignment Help, I need to follow the news and stuff in order to keep myself updated. It also increases my vocab which can be really helpful to make my assignments look good. 

kingstongermann_2621686's picture

Thanks a lot for sharing it, that’s truly has added a lot to our knowledge about this topic. Have a more successful day. Get Online Assignment Assistance from Experts


kingstongermann_2621686's picture

Thanks a lot for sharing it, that’s truly has added a lot to our knowledge about this topic. Have a more successful day. Get Online Assignment Assistance from Experts


jordanss123 jordanss123's picture

fake Yeezy boost 350 black pirate real vs fake buy 80% Off


khasbolatova.1994_2645301's picture

I'm not really into programming and circuits but you've explained it in much more simple way than i thought! Good homework assignment help online job tho. As for robots in general, i'm fully against it. Well, i mean it's a coll stuff but we have to find "balance" in robotic technologies. I don't want to see terminator irl in near future tbh xD

paulw9850_2728816's picture

The point of this examination was to expand consciousness of the diverse introductions Write my Assignments of head and neck tuberculosis (TB) and to talk about its demonstrative troubles.

axaberry85_2764276's picture

I simply couldn't leave your website before suggesting that I actually loved the usual info that you supply to us. I’m gonna be back continuously to check up your new posts. Keep Doing like this. Good luck!!!

mba assignment help

weate1953_2792306's picture
qwestride_2812901's picture

This cypress looks perfect now and I think I should plan to see it with my dissertation writing services team this weekend.

jordanss123 jordanss123's picture Cheap Yeezys 350 V2, Buy Cheapest Yeezy 350 Boost 2017, Cheap Yeezys 350 V2 for Sale 2017, we offer Cheapest Adidas Yeezys 350 V2 Boost Outlet ... Yeezy Boost 350 Price,Adidas Yeezy Boost 350 'Turtle Dove' Sale ... Camo T-Shirt: $210 SFT Sweat Pant: $500 Yeezy 950 Vest 1, Security, when's the last time ... Fake Yeezys for MP Male - The archival Haven style has been updated for todays' kids. Made from a durable ripstop upper with overlays of premium. Adidas Shoes, Clothing, Aftershave, Shower Gel & Toiletries – B&M Top Seller Men adidas Originals Samoa Vintage Trainers In Beige ... superstars adidas damen weiß - Tierarztpraxis Schloemer Online Einkaufen Socken Sportsocke Solid Crew von adidas für ... Rabatt Adidas Damen Ultraboost Laufschuhe schwarz BA8842 US ...

stickwargames_2936571's picture

Sharing such kind of article are really useful for people especially students to know about the latest technologies. It is good to know about the aquaponics monitoring and control system. It could be useful if you share more details regarding this. read paradise kissmanga chapters for free

Ivan Hamlin's picture

Great info this design method can also be easily long-drawn-out to comprise timers, various distances and patterns of dissertation help order, and plans other than LEDs that are obligatory to be motorized up or down in a specific manner. Extra topographies were additional to the design for protest purposes.

Adam Woakes 1's picture

Thanks for writing such a quality write-up! I hope other people get much help from this writing piece as well. Students struggling to write their assignments can opt for our online assignment help and get their coursework written by qualified assignment experts.

Christinajohn248_3068016's picture

Barc works entirely well now yet he has a tendency to be somewhat edgy Do My Assignment for Me he is very loyal more often than not and dependably takes after my hand despite the fact that I am not holding any treats whatsoever. In any case, I built a smidgen of "identity" into him by breaking every one of the principles of good Cap Sense sensor outline.

r143011_2835121's picture

This is a great place to get all the latest updates and information related to PSOC system and the BARC technologies. I have got a lot of details required for my project works from your posts. Do share more of these screenshots for getting a better idea on them. original orkopina

Andrew Herbert's picture

I reinforced the package about 180 degrees. I feel sad that it forces me to separate the mallet and the battery, Essay Writing Help UK it will make the ugly home of the robot become horrible.  

Cathy anna's picture

It was really glad to know about this Embedded World Show that you have described here. Great to know that you have feeling confident on that. Thank you for sharing the screen shots and pictures over here. Keep up the good work.catalina island


Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.