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#029 – Bluetooth Home Automation System
  • 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 19 replies
  • Subscribers 17 subscribers
  • Views 773 views
  • Users 0 members are here
  • 100projects
Related

PSoC 4 Pioneer Kit Community Project#029 – Bluetooth Home Automation System

cy.wbz
cy.wbz over 9 years ago

Hello!

 

We are continuing with our wireless subseries with the 100 projects in 100 days. Last week we showcased a number of examples using the XBee wireless modules. Yesterday we gave you an example on how to connect your Pioneer kit to a WiFi network. Today we will showcase how to interface with your Pioneer kit using Bluetooth.

 

Today’s project is designed to control the On/Off status of an appliance using Bluetooth. The user is required to have an Android Phone with Bluetooth capabilities through which one can send commands using the Bluetooth SPP Application. This App sends the command to the Bluetooth Shield on PSoC4 which then controls the relays on the Relay Shield. The appliance then turns on or off according to the relay position.

 

  • CY8CKit-042
  • Relay Shield
  • BlueTooth Shield

 

 

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:

  • UART
  • CyClock
  • Interrupt
  • Logic Low ‘0’
  • CyPin

 

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.

 

If you need any additional information on the shields that we are using today please take a moment to review the following web pages:

  • Relay Shield
  • BlueTooth Shield

 

This example also uses the Bluetooth SPP app for Android phones. This app is available for Android phones only, and can be found at the following link:

  • Bluetooth SPP

 

Once the user has configured the Bluetooth connection they will be able to use the Bluetooth SSP application to control the Pioneer kit. In the header section of the main.c file you see the defined commands that can be sent to the Pioneer kit. These are the values that the user can enter into the SPP application to either turn on or off the appliance (Light). This example supports up to four applications being controlled from a cell phone.

 

Hardware Connections:

 

For this example you will need to have both the Relay and Bluetooth Shields. We will first insert the Bluetooth Shield into the Pioneer kit. On the top of the Bluetooth Shield are headers that will allow us to then insert the Relay Shield. Here we’ve ‘stacked’ the Arduino shields allowing us to use both the Bluetooth and Relay capabilities.

 

Now that the shield boards are connected to the Pioneer kit we then need to connect the Relay shield to the power supply and then to our light bulb setup. 

 

 

Test Your Project:

 

Program the Pioneer kit, start the SPP application and then begin to send command controls to the Pioneer kit using the pre-defined values.

 

I hope this example can help you in your design.

 

Best,

Matt

Attachments:
2235.Project Images.zip
Home_Automation_Bluetooth_Relay_Shield.zip
  • Reply
  • Cancel
  • Cancel

Top Replies

  • cy.wbz
    cy.wbz over 8 years ago in reply to uplatise +1

    Uros,

     

    I believe robotshop has some Euro locations and they provide Bluetooth shields. They are not the same as seeedstudio, but that might be a start to avoid customs.

     

    http://www.robotshop.com/eu/contact…

  • gihu
    gihu over 8 years ago +1

    Hi all, 

     

    Very nice project.

     

    @Uros, a nice BT shield from Microchip is RN 42, I used in a project where I built an app for my cell phone to read an 8 analog input Bluetooth module.

    @Matthew, not much complicated…

Parents
  • Former Member
    Former Member over 8 years ago

    Will you sell me your system and Android Source code?

    I am in a bit of a hurry,

     

    I simply want to turn on a relay using an Android smartphone.

     

    I have an android app, so I would integrate your code into mine.

     

    Let me know.

    This could be your 101 project in 100 days ;-)

     

    We are building a speed limit aware cruise control for a charity.

     

     

    Jim

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

    Hi James,

     

    Nice to hear about your cruise control project for charity.

     

    The system (hardware + firmware) source has already been posted above. Its all contained in the PSoC Creator project "Home_Automation_Bluetooth_Relay_Shield.zip (2.5 MB)"


    You will need the $25 PSoC 4 Pioneer Kit, the bluetooth and relay sheilds posted above, and a free download of PSoC Creator to get started.

     

    We didn't write an android app for it, instead used the free Bluetooth SPP app, that allows you to send serial commands from your android phone to the bluetooth shield.

    If you can add a layer of serial communication to your existing android app, you should be able to communicate with the PSoC very easily (using UART)!

     

    We'd love to feature your finished project here when its done!

     

    regards,

    -Gagan

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

    Unfortunately, I don't have the time to do all that.

     

    Is there anyone on this forum that could assist?

     

    We can publish it all here if you want. I just have to deliver.

     

    Let me know.

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

    Unfortunately, I don't have the time to do all that.

     

    Is there anyone on this forum that could assist?

     

    We can publish it all here if you want. I just have to deliver.

     

    Let me know.

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

    Jim,

     

    Do you need an example project and the hardware?

     

    Also is the Bluetooth SPP app sufficient?

     

    -MattB

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

    Hi,

     

    Is this bluetooth shield available in EU to avoid customs?

     

    It would be nice to merge this project with the project #40 Pioneer PnP Sensors, since Android app is going to get the Bluetooth support.

     

    Uros.

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

    Uros,

     

    I believe robotshop has some Euro locations and they provide Bluetooth shields. They are not the same as seeedstudio, but that might be a start to avoid customs.

     

    http://www.robotshop.com/eu/contact-us.html

     

    http://www.robotshop.com/search/search.aspx?locale=en_eu&keywords=bluetooth

     

    Also in example #30 we use a different bluetooth shield than in this example. We link that module in the project. It's on Amazon. I don't know if Amazon has a Euro locations for shipping to avoid issues with customs.

     

    http://www.element14.com/community/message/79651

     

    Thanks,

    Matt Buza

    • Cancel
    • Up +1 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