Page 1 of 6 12345 ... LastLast
Results 1 to 10 of 58

Thread: Diecimila Qs

  1. #1
    Join Date
    Apr 2008
    Location
    Sunnyvale, CA
    Posts
    378
    Images
    34
    Rep Power
    53

    Diecimila Qs

    I got an Arduino Diecimila a week ago from Trossen, and finally (after fighting off demands from work and then family) got a chance to play with it. I love it! It's my new best friend. Couple of comments/questions:

    1) All the connectors are female. How cool is that? It can attach right to a breadboard.

    2) When I connect a test servo to a PWM signal (I use Futaba S3003 for prototyping) it buzzes and humms like crazy. I don't get that from RC receivers. What's the reason? Would I have better luck with digital servos?

    3) How do I see serial output? I tried the various samples that output serial strings, but I never see it in the IDE. Is there somewhere else to look?

    4) I love the image of Italy on the back!

    5) How do you pronounce "Diecimila"? I've been saying it like I was talking about a Dual-Screen Nintendo handheld hardened for use in Iraq -- the "dee ess mil" -- but I have always struggled with Italian.

    Thanks.

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

    Re: Diecimila Qs

    2. You are delaying at least 20ms between each PWM pulse, right? If not, I hope you have a LOT of S3003's laying around. Seriously, though, 20-25ms is a good pause.

    5. "dee-eh'che'-ME-lah" means "ten thousand" in Italian.

    3. Get back to you on that one in a moment. I've only sent serial data out the TTL (2/3) before - I think it should echo to the console, but I haven't looked. Oh - wait, yes I have. My capacitance sensor does. Let me go look at what I figured out. . .
    I Void Warranties�

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

    Re: Diecimila Qs

    This is what I'm using for TTL. Not sure if it works with the USB - my laptop with the software on it went south. I'll have a new machine together tomorrow:

    Code:
    #include <SoftwareSerial.h>
    #define  txPin 3  //TTL Serial
    #define  rxPin 2  
     
    //Someone set us up the port! [Serial TTL]
     
    SoftwareSerial SerialOne = SoftwareSerial(rxPin, txPin);
    byte pinState = 0;
     
    [ripped out some code here]
     
    void setupSerial()
    {
    pinMode(txPin, OUTPUT);  //Set the tx pin to output mode
    pinMode(rxPin, INPUT);  //Set the tx pin to input mode
     
    SerialOne.begin(38400);  //Set the baud rate to 38.4Kbps
    }
     
    Then I have in my loop:
     
    void doit()
    {
     
    char inbuf = SerialOne.read();  // drop the incoming character from the serial port into a char buffer
    SerialOne.print(inbuf); //echo the character I received
     
    }
    more junk removed
    Obviously that's not going to do compile and be happy, but it gives you an idea.

    For more serious talking to the computer, I'm using "processing" language instead of "wiring". Check it out - you'll like it.

    Pretty much everything that's just basic communication I've been doing in assembler, though... Processing is cool since it has graphic generation ability. "Wiring" is based on "Processing"... http://processing.org/

    And if you haven't checked out "fritzing" - you need to have a peek at it too! http://www.fritzing.org/
    I Void Warranties�

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

    Re: Diecimila Qs

    If you are using the HARDWARE serial port on the arduino, then the output should be going back up your USB cable. Did you click on the serial monitor button (last graphic button in the line)? Clicking on the button to open the serial monitor will have the serial data shown in the black box at the bottom of the screen (the same one that compile errors normally come out of...)

    -Fergs

  5. #5
    Join Date
    Apr 2008
    Location
    Sunnyvale, CA
    Posts
    378
    Images
    34
    Rep Power
    53

    Re: Diecimila Qs

    Thanks for the quick reply.

    Fergs: Serial monitor! Duh.

    Adren: I'm not generating the pulses directly, but rather with the analogWrite() command. The servo goes to the correct position, but even with a 50&#37; duty cycle I get buzzing. To tell you any more about the shape of the signal I'd need a scope. Just thought someone here might know off the top of their head.

  6. #6
    Join Date
    May 2008
    Location
    TN
    Posts
    853
    Images
    99
    Rep Power
    71

    Re: Diecimila Qs

    Out of curiosity why are you not using the Servo library?

    The buzzing probably comes from your pulses varying a bit and the servo is trying to catch up. Give the hardware servo library a try.

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

    Re: Diecimila Qs

    I'm gonna second Jes's suggestion: use one of the libraries. There are two, the hardware library (does 2 servos if I remember correctly), or the software library (can do several more, but requires that you call a function every so often - like Adr said.)

    HW library: http://www.arduino.cc/playground/Com...ib/Servotimer1
    SW library: http://www.arduino.cc/playground/ComponentLib/Servo

    It's likely that starting and stopping the pwm (using analogWrite) is messing up the waveform - and causing the servos to squeal.

    -Fergs
    Last edited by lnxfergy; 09-08-2008 at 12:58 PM. Reason: added links...

  8. #8
    Join Date
    Apr 2008
    Location
    Sunnyvale, CA
    Posts
    378
    Images
    34
    Rep Power
    53

    Re: Diecimila Qs

    I'll try the servo library; thanks!

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

    Re: Diecimila Qs

    I'll admit - I've reinvented the wheel, splitting-up the pwm and twiddling my own servos. I don't believe I didn't take the easy way out and use the already existing libraries... [bonks self]
    I Void Warranties�

  10. #10
    Join Date
    May 2008
    Location
    TN
    Posts
    853
    Images
    99
    Rep Power
    71

    Re: Diecimila Qs

    That is one of the beauties of that board. The prewritten libraries and documentation make it really easy to blow out a project quickly.

    I haven't tried the hardware library library but the software library works reasonably well but it does allow the occasional servo twitch. I have been using the library to move a sonar sensor for a scanning motion and it works great.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Project My Arduino Diecimila Rover by librab103
    By Adrenalynn in forum Rovers
    Replies: 17
    Last Post: 08-14-2008, 04:35 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
  •