Show Posts
Pages: 1 ... 411 412 [413] 414 415 ... 590
6181  Using Arduino / Programming Questions / Re: robot steering on: February 16, 2012, 04:56:36 pm
so should i use the same time of millis technique i used on steering

Yes.  Absolutely.
6182  Using Arduino / Microcontrollers / Re: Fuse Q. Which Crystal option? on: February 16, 2012, 04:55:50 pm
Sorry, yes, It will be a 8Mhz crystal. I don't believe I saw a low-power option in the fuse calculator I was using... Will selection the "wrong" option, low-power vs full-swing cause bad things to happen?

The "Low Power" setting saves power.  It is more prone to electrical interference but every Arduino uses that setting so I would recommend it.
6183  Using Arduino / Project Guidance / Re: attiny45/85 frequentie on: February 16, 2012, 04:51:51 pm
A continuously variable clock from 0 Hz to 20 MHz is outside the capability of a microprocessor.  I suspect an oscillator made with some CMOS inverters, a capacitor and a ten-turn variable resistor would give you better control over such a wide range.  Read about such things here: http://www.fairchildsemi.com/an/AN/AN-118.pdf
6184  Using Arduino / Motors, Mechanics, and Power / Re: Please suggest a motor for precise step control on: February 16, 2012, 04:44:10 pm
If a stepper motor's step is accurate, would it be enough to simply keep count of the steps in software?
Yes, if the motor has sufficient torque for the job that will work fine.  However some external force may cause the stepper to loose one or more steps.  Since the stepper has no feedback there is no way to immediately correct the error.

A compromise position is to provide some kind of "home" index that will allow the software to re-synchronize the position if it detects an error. 
6185  Using Arduino / Programming Questions / Re: robot steering on: February 16, 2012, 01:30:49 pm
Your loop() function does 200 seconds of forward and reverse before looking at any steering commands.  To get the Arduino to share the time you can't use ANY delay() calls.
6186  Using Arduino / Networking, Protocols, and Devices / Re: Problem in CODE for WiShield v1.0 on: February 16, 2012, 01:25:21 pm
For some reason your compile is finding WiServer.h but not the library containing WiServer.cpp.

It's not clear if the library should be named WiShield or WiServer.  If the only include file is called WiServer it may be necessary to name the library WiServer.  Perhaps WiShield.h should be included before WiServer.h?  Very confusing.
6187  Using Arduino / Motors, Mechanics, and Power / Re: Arduino Motor Shield can't fit on Arduino? on: February 16, 2012, 12:57:45 pm
Long pins: perhaps to clear the large Ethernet connector on the Arduino Ethernet.

Pins don't match:  The latest designs have added a couple of pins near the Aref pin.  They just duplicate the I2C pins (A4 and A5) so they are not used by the motor controller.
6188  Using Arduino / Project Guidance / Re: attiny45/85 frequentie on: February 16, 2012, 11:44:36 am
The maximum clock rate on the ATtiny is 20 MHz.  If you run it at 20 MHz you can have one of the Timer/Counter sections produce  a 10 MHz square wave on an output pin.  To get PWM you'd have to go slower.  For example to get 16 levels of PWM you'd have to  bring the frequency down to 1.25 MHz (20/16).
6189  Using Arduino / Motors, Mechanics, and Power / Re: PWM frequency problem on: February 16, 2012, 11:27:51 am
Why do you feel you need to change the PWM frequency?

You can power the Arduino from the same 12v source as your motors.  Connect +12v to the Vin pin or to the DC power jack.
6190  Using Arduino / Project Guidance / Re: Microcontroller and cpu frequencies on: February 16, 2012, 11:22:30 am
In Arduino the clock signal comes from a 16MHz crystal oscilator. If I program the device
with arduino language using it's functions like "delay()" or "tone()", if I put the microcontroller
to operate using the internal RC 8 MHz oscilator as clock source will those functions work
correctly?
The Arduino core libraries (delay(), millis(), tone()) work properly at 16 MHz and 8 MHz.  You have to use the correct Tools->Boards and re-compile the sketch to have it work properly if you are switching the clock frequency.

From AVR clock controll unit comes several clock signals. Which frequency does Clk/cpu has?
Which frequency comes to clk/adc? This is not clear to me in datasheet.
If you look at figure 8-1 (page 26) you see that the clk(ADC) comes out of the AVR Clock Control Unit.  This is fed from the System Clock Prescaler so the ADC pre-scaler starts with the system clock frequency.  To get the 16 MHz system clock down below the 200 kHz upper limit for full-scale ADC conversions the ADC pre-scaler is set to /128 so: 125 kHz.  For an 8 MHz clock you could /64 to also get 125 kHz ADC clock.  You can use a smaller ADC pre-scale to get a faster ADC clock but you won't get 10-bit precision.

For signal processing at audio frequencies you might want to use an external SPI ADC.
6191  Using Arduino / Motors, Mechanics, and Power / Re: Please suggest a motor for precise step control on: February 16, 2012, 11:04:39 am
A stepper motor is step-able, continuous rotation, and can turn continuously (at low speed) but has no position feedback.  If you need to know exactly what the position is at all times you probably want a DC servomotor with a absolute shaft encoder for feedback.

How fast do you need it to rotate?
6192  Using Arduino / Microcontrollers / Re: Fuse Q. Which Crystal option? on: February 16, 2012, 10:50:45 am
What frequency crystal are you planning to use? 

If 32.768 kHz, use "Low Frequency" crystal oscillator. 

If 8 MHz or 16 MHz (Arduino compatible) you can use either "Low Power" or "Full Swing".   The Arduino uses "Low Power".
6193  Using Arduino / Project Guidance / Re: project CIRC-03 spin motor spin on: February 16, 2012, 10:32:57 am
The transistor might be:
    1) Fried
    2) The wrong type (PNP instead of NPN)
    3) Wired incorrectly (not all are arranged Collector-Base-Emitter viewed from the flat side)

The breadboard could have a bad connection.

If you connect the resistor from Base to +5 instead of Base to Pin 9 the motor should run continuously.  You can then wiggle wire and components to see if anything is loose.
6194  Using Arduino / Project Guidance / Re: Can't figure out how to upload my compiled HEX file manually using AVRdude on: February 16, 2012, 10:18:41 am
Are they both COM13?  In my experience each Arduino UNO (or similar) gets assigned a different COM port.
6195  Using Arduino / Installation & Troubleshooting / Re: Arduino Bootloader on a 328 w/Mega2560 on: February 15, 2012, 10:23:01 pm
Mega +5 -> Uno +5
Mega +5 -> 100nF cap -> Mega Reset
Mega Gnd -> Uno Gnd
Mega 10 -> Uno Reset
Mega 52 -> Uno 13
Mega 50 -> Uno 12
Mega 51 -> Uno 11

Is that 100nF capacitor supposed to disable the auto-reset on the Mega?  If so that should be a 1 to 10 uF (not nF) capacitor with the + side to Mega Reset and the - side to Mega Ground.  Alternatively, people have use a 100 to 120 ohm resistor from Mega Reset to Mega +5.

The other connections look good.
Pages: 1 ... 411 412 [413] 414 415 ... 590