You are here

Using a host computer to control robotics | Cypress Semiconductor

Using a host computer to control robotics

Summary: 7 Replies, Latest post by Eilrem.CML on 04 Apr 2012 02:48 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
RealChemist's picture
9 posts

Hey all,

I posted a previous topic about using sonar for a robotics project (which was resolved quickly on this forum).  The next step in the project is to be able to use a Pandaboard to send commands to the PSoC.  The PSoC was chosen to control the robotic subsystems because of its ease of development and the Pandaboard is used as the human interface because it can run a full operating system.

My group needs to be able to get sonar readings taken from the PSoC and it also needs to be able to send commands telling the PSoC to generate PWM signals that go to our H-Bridge/Motor.  Talking to some of our professors, the suggestion was made to use serial over I2C.  What are your thoughts on the best way to implement this?

dasg's picture
Cypress Employee
730 posts

Hi RealChemist,


You can use I2C to communicate between PSoC and Pandaboard. you must configure one of them as Master and the other one as Slave. Since in I2C it is the Master which initiates the communication and generates the clock, the device which has to send commands to the other should be made as a Master. 

Alternately, you may also consider UART for communication. In this protocol, there is no Master - Slave relation. If used in Full-Duplex mode, any device can send to / receive from other device. Pandaboard has DB-9 connector for RS232.

user_1377889's picture
9241 posts

The principle of I2C is plain and easy to understand: The slave obeys master (Gollum principle )

This means: The master writes into the slave(s) and read from the slave(s). Note the plural, I2C is made to control several slaves. So no method exists for a slave to talk to the master (asking for support, waking-up master etc) initiated by the slave.

On the other hand UART was made originally for communication between man and machine (woman as well) and both may initiate an 1 to 1 conversation. Additions have been made (and implemented in PSoC of course) to talk to several devices on a bus-like structure. The advantage (in my opinion) is, that the "slave" may initiate a conversation (asking for recharge of battery).


I would select UART.



uday's picture
Cypress Employee
569 posts

Please also be aware of the limitations on the dat throughput that you might need between PSoC and Pandaboard.

user_66945721's picture
256 posts

I2C is easy enough to implement on the PSoC.Surprisingly easy,if I might say so.

I have interfaced an I2C EEPROM,and you can check out my blog post on the same.

As far as control of motors is concerned,you could hook up a regular L298D(depending on your motors' current requirement) and control it easily with the PSoC.

Hope this helps :-)

user_1377889's picture
9241 posts

Since you have to establish a communication - path you will have to define something like a "protocol" that defines who and when may talk to which. It would not be unwise to have a brief look at the OSI-modell to see how this fits in your situation/project. Look here . The requirements  for the protocol will make it easier for you to decide which interface (or interfacES!) will be the right choice.



Eilrem.CML's picture
Cypress Employee
14 posts

I prefer I2C over UART since you can connect multiple slaves to 1 master. It's true that slaves can't initiate connection to the master but you can just make the master poll each slave one at a time.

user_62908756's picture
10 posts

I prefer use UART and if you need communicate more boards, use RS485 (not problem with noise environment, no problem with distances, etc,etc). One point to keep in mind it's very easy depurate if no trasnmission exist 

 I've done a 1/2 CNC with PSoC1 (I'm finishing now with PSoC3), 3 boards (1 a axis), everything with RS485.

Besides I've developed a 32 servo controller (with PSoC3) and communication with RS232. (you can see "el bicho" in youtube Look for hexapod PSoC3. I know the quality is very poor. Sorry )

Log in to post new comments.