element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • 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
  • Settings
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Legacy Personal Blogs TI SimpleLink Wi-Fi CC3200 LaunchPad: MQtt Motor Control
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: martinvalencia
  • Date Created: 29 Aug 2015 1:22 AM Date Created
  • Views 1926 views
  • Likes 4 likes
  • Comments 8 comments
  • mqtt
  • triac
  • eclipse_paho
  • cc3200_launchpad
  • motor_control
  • paho
  • iot
  • sp:texas_instruments
Related
Recommended

TI SimpleLink Wi-Fi CC3200 LaunchPad: MQtt Motor Control

martinvalencia
martinvalencia
29 Aug 2015

MQTT (Wikipedia):

 

MQTT (formerly MQ Telemetry Transport) is a publish-subscribe based "light weight" messaging protocol for use on top of the TCP/IP protocol. It is designed for connections with remote locations where a "small code footprint" is required or the network bandwidth is limited. The publish-subscribe messaging pattern requires a message broker. Thebroker is responsible for distributing messages to interested clients based on the topic of a message. Andy Stanford-Clark and Arlen Nipper of Cirrus Link Solutions authored the first version of the protocol in 1999.

 

Introduction:

 

My goal with this app is to implement a control for low power motor (40Watt) to travez of a microcontroller CC3200 SimpleLink of the family Texas Instruments.

Simply send commands like "motor_on" to start the engine and "motor_off" to turn it off, making it as simple as possible for anyone familiar with the electronics.

 

CC3200 MQtt Control Motor

image

 

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

Description (Texas Instruments):

The SimpleLinkTm Wi-FiRegistered CC3200 LaunchPad (with QFN-packaged device) is an evaluation development platform for the CC3200 wireless microcontroller (MCU), the industry’s first single-chip programmable MCU with built-in Wi-Fi connectivity.  The board features on-board emulation using FTDI and includes sensors for a full out-of-the-box experience. This board can be directly connected to a PC for use with development tools such as CCS and IAR.

This LaunchPad has driver support and a software development kit (SDK) with 40+ applications for Wi-Fi protocols, internet applications, and MCU peripheral examples.

image

Features:
      • CC3200 Wi-Fi wireless microcontroller (MCU) in QFN package
      • Industry’s first devices to be Wi-Fi CERTIFIEDTm at the chip level by the Wi-Fi AllianceTm
      • USB interface to PC for CCS/IAR using FTDI USB drivers
      • Flash update over the USB using SimpleLink Programmer
      • 2 20-pin connectors enables compatibility with BoosterPacks with added functions (BoosterPack headers)
      • Standalone development platform featuring sensors, LEDs and push-buttons
      • Power from USB for the LaunchPad as well as external BoosterPack
      • Operates from 2 AA alkaline batteries
      • On-board antenna and U.FL connector selectable using a capacitor re-work
      • Supports 4 wire JTAG and 2 Wire SWD
      • GNU Debugger (GDB) support over Open On chip debugger (OpenOCD)

 

Application:


In this application, a graphical LCD screen is used, in which data such as name Network to the CC3200 Simple Link will connect, in my case is "casa1" is displayed once the platform has an answer modem that receives an address IP that is displayed on the LCD.

cc3200lppinmap.jpg

imageimage

 

 

Power Circuit

 

-The power circuit as the name implies working on power, holding large current.

-An observation of this circuit is that energy is neither created nor destroyed so the question is not where the energy goes into the load, once made the cut.

-The answer is simple there is an element within this network that absorbs all that energy is not delivered and 2.2K resistor R4; This excess current is consumed.

-So this overheats, the application circuit resistances are 1 / 2w, but to see this little detail by a resistance R4 1W replaced.

 

To load control AC, I'm using a MOC3021, which allows me to control the flow of current to the motor, turning on a pin for programming the internal Led MOC is active and leaves circular AC on the other side, allowing the engine it lights; in the same way to switch off the control pin current is limited and the engine stops.




 

Schematic circuit solid state relay
image

 

Power elements

image

- General description

 

Triac on a plastic envelope, intended for use in applications requiring high capacity and bidirectional transient voltage blocking performance and high thermal cycling. Typical applications include motor control voltages domestic and industrial lighting, heating and static switching.

 

SymbolParametersMAXUNIT
VDRMState repetitive peak voltages500V
IT(RMS)RMS current on the state4A
ITSMNon-repetitive peak current on the status25A

imageimage

 

 

 

The secret of programming:

 

Quite simply, the CC3200 to receive messages from this server PAHO internally generates an interrupt in the program, leendo the data buffer and storing it in a string.

The string is compared to the "strcmp" command, which already pre configured strings to be compared as "motor_on" and "motor_off" these handed me a value that then by a set of conditional "if", it switches to a the task to be performed.

image

Related Links

 

Texas Instruments CC3200 Simplelink Wi-Fi Launchpad

@Jan Cumps Works:

[Christmas Wreath of Things] Internet of Holiday Lights: part 10 - Secret IoT Team Up

Paho - Open Source messaging for M2M

Energia.nu  to CC3200  Simplelink

 

Source Code Program (Energia.nu)

 

http://www.mediafire.com/download/9588i5gs8x3sd13/HelloWiFiMqtt.rar

 

  • Sign in to reply

Top Comments

  • DAB
    DAB over 10 years ago +1
    Great idea. I need to find some time to try this method out. It could be useful. DAB
  • clem57
    clem57 over 9 years ago +1
    Would this be like a launchpad (Msp432) with a cc3100 booster pack? Clem
  • clem57
    clem57 over 9 years ago in reply to martinvalencia +1
    That is great, since I received the combination from a class on AT&T M2X and FLOW which left me nonplussed. Clem
  • clem57
    clem57 over 9 years ago in reply to clem57

    Maybe a bluetooth USB on the TI board can communicate to the TI sensor board. Just came to me.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • clem57
    clem57 over 9 years ago in reply to martinvalencia

    Following what you have above, I would need a LCD. Or could that be dropped? Also I see:

    To load control AC, I'm using a MOC3021, which allows me to control the flow of current to the motor, turning on a pin for programming the internal Led MOC is active and leaves circular AC on the other side, allowing the engine it lights; in the same way to switch off the control pin current is limited and the engine stops.

     

    Could I use something else since I do not have this motor? I do have a bluetooth sensor from TI, but I am not sure if the WiFi can handle.

    Thanks,

    Clem

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • martinvalencia
    martinvalencia over 9 years ago in reply to clem57

    I think the method you chose is more complex and safety,  since I do not have much knowledge in the area of IoT, choose this metod because found it easy to apply!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • clem57
    clem57 over 9 years ago in reply to martinvalencia

    That is great, since I received the combination from a class on AT&T  M2X and FLOW which left me nonplussed.

    Clem

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • martinvalencia
    martinvalencia over 9 years ago in reply to clem57

    in terms of this application if it is possible to use a MSP432 and CC3100, for the same!

    Regards

    Martin V.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

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 © 2025 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

  • X
  • Facebook
  • linkedin
  • YouTube