Page 4 of 4 FirstFirst 1234
Results 31 to 36 of 36

Thread: Using the Serializer with Xbee WiFi

  1. #31
    Join Date
    Dec 2008
    Location
    Washington
    Posts
    312
    Images
    35
    Rep Power
    39

    Question Re: Using the Serializer with Xbee WiFi

    I'm thinking that you may just not know the right questions to ask. What are you trying to accomplish, specifically?
    My goal is to have a microcontroler that can control 12 servos, read 12 analog sensors, communicate with one i2c device, read 20 digital sensors, and relay all that information back to the PC. I might word this next part wrong so don't go to hard on me; I want it to be able to do all of this at the same time as in not have to unplug a servo to attach my 12th analog sensor.

    My concerns are that I wont be able to control all these in a timely order. Mostly I'm concerned that managing my speed and measuring the encoders will take up so much time my servos will be jumpy and my analog sensors will rarely get read "The motors I'm using have 850 counts per revolution!". In order to map properly I would need to total the counts for each motor witch would mean counting each individual tick! I have never really tested the speed of my arduino's processor but I doubt it can count the 1700 ticks per revolution that both my encoder will create and still have time to smoothly pan a servo. What happens if two encoders tick at the same time? Will I only be able to count one? I have been working with interrupts and it seems like they work better when very little is going on in the other part of the program.
    Dalton Caughell

  2. #32
    Join Date
    Apr 2008
    Location
    Sacramento, CA, USA Area
    Posts
    5,341
    Rep Power
    174

    Re: Using the Serializer with Xbee WiFi

    Define "same time" and define "revolution.

    16 Million Cycles, nearly 16 Million Instructions per second. If you're only doing 1RPS, well, that kinda puts that 1700 ticks into perspective. You've got almost 16 million instructions, whatcha gonna do with the other 15,996,600* ?

    Of course, if your wheels are rotating at 16 million RPS, well, then no, it's not.

    Like anything else on any processor: Bad architecture begets bad performance.

    But no, you're not going to get 12 analog sensors and 12 servos on an Arduino. Depending upon how we define "at the same time" - are we talking milliseconds or microseconds or femtoseconds, the Axon may work out well.
    *Note: Assuming true RISC, 1 cycle per instruction is not guaranteed. But for illustration purposes...
    I Void Warranties´┐Ż

  3. #33
    Join Date
    Dec 2008
    Location
    Washington
    Posts
    312
    Images
    35
    Rep Power
    39

    Re: Using the Serializer with Xbee WiFi

    Actually I meant being able to attach all those devices at once I just forgot how to say it. I want my robot to look like everything is happening at once with the interrupt code being run 1700 times a second it seems like things would slow down. At least form the tests I have done so far "My servo noticeably pauses every time the code gets interrupted". From looking at my tests it appears that I might miss ticks while the interrupt code is running and my servos might jerk around.
    Dalton Caughell

  4. #34
    Join Date
    May 2008
    Posts
    2,228
    Images
    155
    Rep Power
    125

    Re: Using the Serializer with Xbee WiFi

    Whoa.. 12 servos, 12 analog sensors, 20 digital sensors. That's a lot going on. Before even further evaluating what a particular controller can/cannot do, you might want to ask yourself, do you really need that many sensors? Often times, less actually is more (active sensors like IR/sonar can actually hurt each other).

    For instance, my early fire bots used an average of 6 IR sensors + sonar + tons of fire detection gear. Guess what, latest bots use a single IR and single sonar on a panning head. No need for lots of sensors, intelligent code makes up for it, and actually can make it better.

    -Fergs

  5. #35
    Join Date
    Apr 2008
    Location
    Sacramento, CA, USA Area
    Posts
    5,341
    Rep Power
    174

    Re: Using the Serializer with Xbee WiFi

    Generally digital pins aren't really tied to a bunch of sensors anyway. Digital I/O is good for devices that need a lot of parallel bits. LCDs, cameras, flash, eeproms, ram, ...
    I Void Warranties´┐Ż

  6. #36
    Join Date
    Dec 2008
    Location
    Washington
    Posts
    312
    Images
    35
    Rep Power
    39

    Re: Using the Serializer with Xbee WiFi

    You are right about not needing that many digital sensors. I will need three ultrasonic sensors for my panning servo. I plan on having 4 fixed digital IR sensors in case my panning servo misses something. Also random sensors like downward facing IR to not fall down stairs and force sensors in the gripper maybe a motion sensor too. Then I plan to run the rest of the things off an i2c bus. For sure I will need the capability to use the 12 servos because at some point I may want to pan other sensors and I will have a six servo arm maybe even two six servo arms. Another concern I have is not being able to pan all my servos so they appear to be working at the same time.
    Dalton Caughell

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. For Sale: Wifi Video Encoder + High Res Camera
    By DresnerRobotics in forum Garage Sale
    Replies: 10
    Last Post: 02-17-2010, 05:38 PM
  2. How to build a wifi robot
    By andrewarcher in forum Robotics General Discussion
    Replies: 3
    Last Post: 04-01-2009, 03:33 PM
  3. Project Jim and the Serializer - Part 1
    By JimH in forum Arbotix, Microcontrollers, Arduino
    Replies: 8
    Last Post: 10-12-2008, 01:30 PM
  4. Project Jim and the Serializer - Part 2
    By JimH in forum Arbotix, Microcontrollers, Arduino
    Replies: 5
    Last Post: 02-26-2008, 03:08 PM
  5. XBee Question
    By JimH in forum Robotics General Discussion
    Replies: 11
    Last Post: 02-11-2008, 08:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •