element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • More
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • More
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • More
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • More
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
Cypress Kits
  • Products
  • Dev Tools
  • Cypress Kits
  • More
  • Cancel
Cypress Kits
Forum PSoC 4 Pioneer Kit Community Project#049 – Android Device Controlled Robot
  • Blog
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Cypress Kits requires membership for participation - click to join
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 6 replies
  • Subscribers 13 subscribers
  • Views 401 views
  • Users 0 members are here
  • 100projects
Related

PSoC 4 Pioneer Kit Community Project#049 – Android Device Controlled Robot

cy.wbz
cy.wbz over 8 years ago

Hello!

 

Today’s example is continuing to build on our previous robot examples but this time integrating Bluetooth and an Android device. The Bluetooth is similar to our earlier Bluetooth-Android example. In this example we are using a free android app, a Bluetooth module, and the Pioneer kit to control a robot’s movement:

  • PSoC 4 Pioneer Kit
  • Seeedstudio Motor Shield
  • Arduino Bluetooth Module
  • Two motors and Robot Chassis
  • 9V battery Pack

 

 

 

Forum Post Attachments:

 

At the bottom of this post we are including the following items:

  • Example Project Zip File
  • Zip File of Images
    • Project Schematic
    • Component Configurations

 

Components Used:

 

The user can download the example project at the bottom of this post. The project uses the following list of Creator Components:

  • PWM
  • Control Register
  • CyClock
  • CyPins

 

The components are configured by right clicking on the component in your Top Design schematic view and selecting Configure. Please enable the following selections in the Configuration windows for the listed components above.

 

Firmware Description:

 

The main.c firmware is included in the example project. Please review the commented sections for more details.

 

This project contains a UART module to receive the commands from the Bluetooth module. Each command packet consists of 7 bytes. The structure is described in our Struct “BT_CMD_S”. Since we will be binding to the Android device and using the 4Joy app, we will support the following commands:

  • Turn Left
  • Turn Right
  • Forward
  • Reverse
  • Brake
  • Increase Speed
  • Decrease Speed

 

For turning left or right Motor-B is used. For moving forward or reverse Motor-A is used. A control register is used to control the direction of the motor and a PWM signal is used to control the speed.

The user will need to download the 4Joy app (linked above). Once the app is downloaded you will be able to pare to the Bluetooth device. You will need to have the Pioneer board programmed and powered prior to paring to the Bluetooth device. First make sure that Bluetooth is enabled on your device. The open the App and click the ‘Connect’ button. You will be able to scan the available Bluetooth devices for paring. Select the ‘Linvor’ option from the menu. When the device is connected you will be able to begin to control your robot using the Android device. Use the buttons on the app screen to see the robot respond to your commands.

 

 

 

 

Hardware Connections:

 

Connect your Seeedstudio motor shield to the Pioneer kit. Insert the Bluetooth module into the header on the Seeedstudio kit. Please see the image below for the setup.

 

You will then need to wire up the robot motors to the Seeedstudio motor shield and connect the power to the kit.

 


 

Test Your Project:

 

Program your Pioneer board and then connect the power. Then bind your Android device to the Bluetooth module. Then use the 4Joy Remote Controller app to drive your robot around. We will be putting together a video of this robot and will post it in the comments below.

 

I hope this example can help you in your design.

 

Best,

Matt

Attachments:
bl_car.cyprj.Archive01.zip
0383.Project Images.zip
  • Reply
  • Cancel
  • Cancel
  • jesusantoniocar
    jesusantoniocar over 8 years ago

    Hello Matt.

    Thanks for this project.

    All these projects in robotics are incalculabe value for people who are learning psoc 4.

     

    Thanks again to Cypress Semiconductor and all your engineers.

     

    regards,

     

    Jesus Antonio.

    • Cancel
    • Up 0 Down
    • Reply
    • Cancel
  • greatunclebulgaria
    greatunclebulgaria over 8 years ago

    Matt,

     

    I think the link for the Arduino Bluetooth Module is wrong. It seems to have an extra reference to element14.com in it. If this is manually deleted, ( ie goto http://dx.com/p/jy-mcu-arduino-bluetooth-wireless-serial-port-module-104299) all is well.

     

    OR

     

    This may be a problem at my end???

     

    Incidentely I can't paste into this reply, is that normal or have I got some settings wrong somewhere??

     

    Thanks for the great series

     

    David

    • Cancel
    • Up 0 Down
    • Reply
    • Cancel
  • cy.wbz
    cy.wbz over 8 years ago

    Hello!

     

    I've attached a couple of great videos of the robot in action!

     

    You don't have permission to edit metadata of this video.
    Edit media
    x
    Upload Preview

     

    You don't have permission to edit metadata of this video.
    Edit media
    x
    Upload Preview

     

    Thanks,

    Matt

    • Cancel
    • Up 0 Down
    • Reply
    • Cancel
  • cy.wbz
    cy.wbz over 8 years ago in reply to greatunclebulgaria

    David,

     

    Thanks for the heads up. I've fixed the link the post.

     

    It should be working now.

     

    Thanks,

    Matthew Buza

    • Cancel
    • Up 0 Down
    • Reply
    • Cancel
  • Former Member
    Former Member over 8 years ago

    What Robot base did you use it looks like it is stearable I can only find 2 or 4 motor drives bases.

    • Cancel
    • Up 0 Down
    • Reply
    • Cancel
  • Former Member
    Former Member over 8 years ago in reply to Former Member

    Robert,

     

    I used the base of a toy car. One motor is used to drive it forward or backward and the second motor is used for steering Left or Right. Let me know if you need more info. Keep us posted on how it goes with your project.

     

    Regards,

    Shashikant

    • Cancel
    • Up 0 Down
    • Reply
    • Cancel
Element14

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2022 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube