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 IoT Connected MSP430 Car
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: RParkerE
  • Date Created: 16 May 2018 5:01 AM Date Created
  • Views 984 views
  • Likes 6 likes
  • Comments 1 comment
  • ti msp430
  • education
  • iot on wheels
  • school
  • iot design
  • iot
  • msp430
Related
Recommended

IoT Connected MSP430 Car

RParkerE
RParkerE
16 May 2018

THE PROJECT

The plan for this project was to build a car which could be navigated via a WiFi connection and follow a black line. This blog post will go over the final product. We will be looking at both the hardware and software which was used in this project.

 

BILL OF MATERIALS

  • MSP430FR5994
  • RF TXRX MODULE WIFI CHIP ANT
  • CUSTOM CONTROL BOARD
  • 120:1 MINI PLASTIC GEARMOTOR OFFSET 2mm SPLINE OUTPUT (2)
  • LCD MODULE 4X10 WH BKGRND RFLT 2.6mm

 

THE CODE

FIND THE ENTIRE CODE HERE

 

INIT_ADC

This is the code that initializes the MSP430's ADC.

LCD.r43

This is a precompiled binary given to us.

blackline

This code is very basic. It uses the IR emitter and detectors to see where the car is on the blackline. If only the right one is on, it is veering too far left and needs to turn right. Similarly, if only the left is on it is veering too far right and needs to turn left. Otherwise (being on black or white) it will go straight. I had used PWMs for the motions, but as the batteries got low, these no longer worked, so I just used turning on and off the motors to move.

button_change

This code simply uses debouncing in order to detect a button push. It also sets the backlight of the LCD to be off, but I have it off by default, so in reality lines 45 and 60 do not do anything.

clocks

This code initializes the MSP430's clocks so that we can set up timers later.

convert

This code takes in and converts the input of the MSP430's ADC values so that they are useable (IR Left and Right Detector, Thumbwheel, etc.). This also contains a function that converts the hex value in memory (used when sending commands over WiFi) into BCD and then to ASCII.

functions

Header file containing all function names.

init

Contains the initial conditions that are used by all other files.

interrupts_timers

This code contains the interrupts for the timers that we set up, as well as the ADC interrupt.

led

This code turns on the two LEDs on the MSP430.

macros

Header file that contains all of the macros used and their corresponding values.

main

This code is where all other functions are called, and contains the while loop which process incoming commands, displays command info on the LED display, and calls the required process based on the incoming command.

motors

As mentioned earlier, this was originally done with PWMs, however, when the battery voltage was too low, this no longer worked. This code now contains the turning on and off the motors directly (both in the forward and reverse directions).

ports

This code contains the initialization of all the port pins.

serial

This code handled the serial data. It handled both USB and WiFi TX and RX buffers, which were used to decipher the commands being sent, as well as debugging.

switch

This code initialized Button 1 and Button 2 on the MSP430 as switches.

system

This code contains the system configurations.

timers

This code initialized the timers to the desired frequency using the MSP430's clocks.

 

 

Currently, I do not have the car to take videos of, but these will be added to this post in a few weeks when I have access to the vehicle again (enjoy the few I do have though!)

                                   imageimageimage

 

 

APPENDIX

Attached are the related material and BOM for this project.

Attachments:
imagePCB_SP2018.pdf
imageBOM_Control_Module_Spring2018.pdf
image
  • Sign in to reply

Top Comments

  • genebren
    genebren over 7 years ago +1
    Interesting robotics project. Thanks for sharing. Gene
  • genebren
    genebren over 7 years ago

    Interesting robotics project.  Thanks for sharing.

    Gene

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