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 Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • 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
element14's The Ben Heck Show
  • Challenges & Projects
  • element14 presents
  • element14's The Ben Heck Show
  • More
  • Cancel
element14's The Ben Heck Show
Forum Electronics Question (arduino)
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join element14's The Ben Heck Show to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 19 replies
  • Subscribers 30 subscribers
  • Views 918 views
  • Users 0 members are here
  • help
  • electronics
  • arduino
Related

Electronics Question (arduino)

ballyrick
ballyrick over 11 years ago

Hey guys.

 

I am making a toy car with speed control, automatic door, steering and lights.

All of these (3 switches & 2 potentiometer) will be controlled by a remote connected via cable. I would like to use either a USB or RJ11 (4-core telephone) cable.

My question is can I combine all the signal cables to reduce the number of wires going from remote to Arduino.

I thought of i2c but not sure if it will work or how to implement it.

 

Thanks.

 

 

FunctionInputOutput
steering:PotentiometerServo
Automatic doorButtonservo
lightsButtonLED's
Speed controlPotentiometerMotor
Motor DirectionSwitchMotor
  • Sign in to reply
  • Cancel

Top Replies

  • timryder
    timryder over 11 years ago +1
    You could always put a small micro controller on the remote control (like an AT-Tiny) and gather the necessary data from each input device and then send down via RS232 (Serial 3 wires) a series of data…
  • ballyrick
    ballyrick over 11 years ago in reply to timryder +1
    Hi Tim. Just a quick question for you, what model At Tiny would you recommend? And what programmer or can i program it via the arduino uno. I have also attached a picture of the circuitry so far. Than…
  • timryder
    timryder over 11 years ago in reply to ballyrick +1
    First, the ATTINY85 is a nice unit with a fair amount of memory and capabilities. Ben uses them a lot in his designs. There are a number of ways to program it but for your project probably using the Uno…
  • timryder
    timryder over 11 years ago

    You could always put a small micro controller on the remote control (like an AT-Tiny) and gather the necessary data from each input device and then send down via RS232 (Serial 3 wires) a series of data packets whose values can be interpreted by the master Arduino (Uno i'm guessing) and sets those values to the servo's motors' and LED's?  That means you're going to have to power your remote control with a 9v and a switching regulator and then have at least a 3 wire cable going to the arduino.  You might as well use RS232 over USB since the master USB port on the Arduino will function as a functional RS232 port for data acquisition.

     

    Heck go a step further maybe part 2 of your project once you have it working, get yourself an Xbee and go truly wireless.  Once you've built the RS232 communications protocol for the data its just a matter of changing the media by which the data is transfered.  Wired to wireless.

    http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/zigbee-mesh-module/xbee-zb-module

     

    Good Luck!

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • ballyrick
    ballyrick over 11 years ago in reply to timryder

    Hi Tim.

     

    Thanks very much for your help.

    That seems like a much better way then taking 7 wires to the arduino uno.

    The Xbee would be a great idea however my budget wouldn't be able to stretch to it.

     

    I'll let you know how i get on when finished.

    Ricky

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • timryder
    timryder over 11 years ago in reply to ballyrick

    Sure,


    Feel free to ask more questions during the development.

    Should be a fun little project image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • ballyrick
    ballyrick over 11 years ago in reply to timryder

    Hi Tim.

    Just a quick question for you, what model At Tiny would you recommend? And what programmer or can i program it via the arduino uno.

    I have also attached a picture of the circuitry so far.

     

    Thanks

    image

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • timryder
    timryder over 11 years ago in reply to ballyrick

    First, the ATTINY85  is a nice unit with a fair amount of memory and capabilities. Ben uses them a lot in his designs. There are a number of ways to program it but for your project probably using the Uno would work.

     

    Here is a nice Instructable how to do exactly that.

    http://m.instructables.com/id/How-to-program-attiny-using-arduino-uno/

     

    Check that out and give it a try. Gonna need a few parts which are all listed in there.

     

    Tim

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • ballyrick
    ballyrick over 11 years ago in reply to timryder

    Hi Tim.

     

    That Instructable looks fairly good and i have most of the parts already so i'll go with that.

    Could you give me an idea what type of outputs i will be sending from the attiny to the arduino.

     

    Thanks

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • dougw
    dougw over 11 years ago

    Hi,

    If you only have 4 wires and one is a ground, leaving 3 signal wires - you would need one for each pot - leaving 1 for the three switches.

    This could be done using 3 different voltage levels or a 3 bit voltage level scheme on the last wire, or 3 different modulation frequencies.

    Doug

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • timryder
    timryder over 11 years ago

    Did you buy the ATTINY yet?

    Hopefully not, if you did no biggy you're only out a couple of bucks and you'll use it someday.

     

    However if you look on eBay for "Arduino Mini" there's a small micro controller Arduino with much more I/O and is available for about 5-8 bucks U.S. it would be easier to integrate and has all the I/O you'd need in your controller without having to do some high level programming.

     

    It's a cheap Chinese knockoff but it's fully compatable.

     

    Then the basic idea is to program the mini in the loop to monitor the current values of each input and create either a String or if you're comfortable with it a Byte array where you would add each value from each input. Separate the string values with like a carriage return char so you can parse them later easier. Then after you've built the string send it down to the other Arduino in the car serially and parse through the string applying each value to their respective outputs. 

     

    I'd put a delay of 5-10 ms after that before looping again to ensure the Uno is finished before the buffer is hit again with another packet.

     

    Congrats you've just design and hopefully programmed a protocol.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • gadget.iom
    gadget.iom over 11 years ago in reply to timryder

    Totally agree with the Arduino Mini, Good shout. image

    You can also use the Arduino Nano, with a built-in USB interface.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • ballyrick
    ballyrick over 11 years ago in reply to timryder

    Thanks Paul, Tim and Douglas.

     

    That sounds like a good idea. I haven't bought the AtTiny yet but i might still get them as they are very useful.

    I'll give a shot at programming the protocol and see how it turns out.

    Also do you think i should use a Arduino Nano in the remote and in the car to reduce space.

     

    All your help is very much appreciated,

    Just another quick question any idea if the 2 servos and motor will work together if all running at same time, as the way i have it now only one servo works at a time and the motor loses considerable speed when a servo is active.

    This might just be a programming error which i will check when i start programming the new program but i would like to get your opinion also.

     

    Kind Regards

    Ricky

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • 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