Show Posts
Pages: [1]
1  Using Arduino / Project Guidance / Re: a robot that follows me on: September 13, 2012, 11:01:01 am
I am building a robot with the same goals - follow a person around.

Independently of this thread or any of the links in it, I decided to use 2 ultrasonic mics on the robot and an ultrasonic driver worn by the person - great minds think alike!  The mics will be mounted on a rotating head to allow the robot to re-acquire the signal even if the robot is not facing in the right direction.

For obstacle avoidance I am using 3 ultrasonic sensor arrays (left, forward, right). 

Currently I have an obstacle avoidance sketch that has no following capability to prove out talking with the obstacle sensors and controlling the drive motors.  I need to build a mic amplifying circuit and work out the math to determine the beacon direction based on the mic inputs.
2  Using Arduino / Motors, Mechanics, and Power / Re: Servo & Ultrasonic sensor on: September 13, 2012, 10:45:58 am
Your problem is most likely related to how you are talking to the ulstrasonic sensor.  Look at the NewPing thread in the sensor subforum, I would suggest using that library to talk to the sensor.
3  Using Arduino / Audio / Re: Pre-amp circuit for high frequency mic on: September 13, 2012, 07:28:43 am
Brandon,

I'm using an ultrasonic mic/driver pair as a homing system for a small robot.  Selecting a frequency well out of the audible range was done on purpose.

tmd, I wasn't aware of that, thank you.
4  Using Arduino / Motors, Mechanics, and Power / Re: Stepper vs Servo on: September 12, 2012, 11:45:12 am
For general stepper vs servo questions I would humbly suggest googling, there are plenty of explanations out there.

Very quick summary:
Stepper motors are used for things that need to rotate continuously with starts and stops.  They have very precise position control.  However the control system is "open loop control" (google) so if the motor skips steps you lose all positional accuracy.  They require a dedicated stepper motor driver (the Pololu A4988 is a popular choice).  A stepper motor typically has 4 wires, to drive it you need to generate a train of pulses.  The stepper motor driver takes care of this for you.

Servos (the hobby type) are a very small motor with built-in gear reduction and built-in closed loop position feedback.  Closed loop position feedback means they will return to their set position if they are "pushed" out of position.  They are also much simpler to drive from an Arduino - you just need 5V, GND, and a signal pin.  The built-in Servo.h library makes it even easier from a software perspective.  Servos are typically not able to rotate continuously (there are some types that can) - they have a set range (90 to 180 degrees) over which they can rotate back and forth.

Quote
For making POV(persistence of vision) what kind of motor I need to use and what should be the minimum RPM of the motor is needed?

I assume you mean that you will have a head that spins in circles.  Your rpm is going to depend on your intended refresh rate.  If your refresh rate is high you could do 1 of 2 things: use a stepper motor with a gearbox to increase the output speed, or use a conventional DC motor and control the rpm carefully.  It might be cheaper to use a DC motor with a rotary encoder to read the actual refresh rate, as opposed to finding a stepper motor and a gearbox with the right ratio.  Most stepper gearboxes I see are gear down boxes and you would need a gear *up* box.
5  Using Arduino / Audio / Re: Pre-amp circuit for high frequency mic on: September 12, 2012, 07:29:14 am
Fantastic advice, thanks!

I ran across this page last night, which seems to be what you're talking about with a common rail design: http://freecircuitdiagram.com/2008/09/02/battery-powered-electret-microphone-pre-amplifier/

My local radioshack had most of the parts except for the right op-amp.  I got some more info on the LMV721 this morning so I'll swing by this afternoon and see if they have anything that would work.  I did see an LM386 audio op-amp, but that's a more complex beast by the look of things, and is geared more for driving speakers instead of amplifying mic signals.
6  Using Arduino / Motors, Mechanics, and Power / Re: Use of Arduino Motor Shield R3 without stacking on Arduino on: September 11, 2012, 06:53:00 pm
Lubby, thanks for the help.  I got it working tonight with just pulling over the 5V line and GND from the power pins, in addition to the pwm and direction pins (brake pins disabled).  In order to work it needs the 5V and GND from the Arduino in addition to an external supply for the motors.
7  Using Arduino / Audio / Re: Pre-amp circuit for high frequency mic on: September 11, 2012, 02:46:47 pm
I would start with 100x amplification as a guess.  If I remember enough from my college lab classes I can use a variable pot for one of the resistors to adjust the gain.

Could you explain what you mean by a bipolar supply?  I would want to run the circuit off the 5V or 3.3V line directly from the Arduino board to keep things simple.
8  Using Arduino / Audio / Pre-amp circuit for high frequency mic on: September 11, 2012, 01:41:48 pm
I have a microphone that is externally similar to the Electret type mics, but is designed to pick up the frequency of 38 kHz +/- 1 kHz.  Link is http://www.mouser.com/ProductDetail/Kobitone/255-328SR16M-ROX/?qs=%2fha2pyFaduhjPDaN57Th6BWwB9YLUCmPAhi50ajSVD5S3CG7NdhYmA%3d%3d.

Obviously I need to build a pre-amp circuit for this mic.  However I'm not an electrical guy, so I do not know how to determine what the values of the resistors and capacitors in the circuit should be in order to amplify the frequency range I care about.

Can anyone point me towards a general pre-amp design site that could provide some guidance on resistor and cap selection, and what the circuit should look like?
9  Using Arduino / Sensors / Re: NewPing Library: HC-SR04, SRF05, SRF06, DYP-ME007, Parallax PING))) - v1.5 on: September 11, 2012, 12:42:09 pm
I agree that the official motor driver is not the most ideal for my application.  I already have one on-hand though, so I have an incentive to try to get it to work before buying additional components.  The motors I'm using are low-current low voltage motors that come with the Tamiya double gearbox so the current limit should not be an issue.

I like the look of the pololu driver you linked, I will keep it in mind if the shield does not work out.

Thanks again for your help.
10  Using Arduino / Sensors / Re: Trouble with HC-SR04 on: September 11, 2012, 09:59:03 am
Quote
I can hear it clicking but I'm  beginning to think it may be defective. Any Ideas?

Mine click, and they work fine.  I don't think clicking is a good sign of a defective unit.

Quote
NewPing sonar[SONAR_NUM] = {     // Sensor object array.
  NewPing(5, 3, MAX_DISTANCE), // Each sensor's trigger pin, echo pin, and max distance to ping.
 
};

You don't need to set up an array with only one sensor, that may be causing some issues.

I would recommend copying the simplest example in the NewPing files and using that to verify that you can read from the sensor.  Then start to add complexity such as making the sketch time-driven.
11  Using Arduino / Motors, Mechanics, and Power / Use of Arduino Motor Shield R3 without stacking on Arduino on: September 11, 2012, 08:30:14 am
Due to some pin conflicts I need to alter the pins that the "official" motor shield from Arduino uses.  It seems that the simplest way to do this would be to un-stack the shield from the Arduino and wire the pins header-to-header.

However when I did this I found the shield to be non-functional.  (When stacked on the Arduino it was able to run the motors fine using a test sketch.)  Besides the direction, brake, pwm, etc pins, are there other pins I need to connect from the Arduino to the shield (maybe a vref or vcc or ground?) in order to get it to work?
12  Using Arduino / Sensors / Re: NewPing Library: HC-SR04, SRF05, SRF06, DYP-ME007, Parallax PING))) - v1.5 on: September 11, 2012, 08:03:40 am
The ATmega328 has limited timers (3, but Timer0 is used for millis and delay so you really only have 2 available).  When doing a project where motors and servos are involved, you're really cutting it close when using an ATmega328.  You can still do it, using a serial motor controller or I2C motor controller (which are cheap, small, use fewer pins and allow for control of many motors using multiple controllers).  Or, you can use a Teensy/Leonardo (ATmega32u4) or ATmega2560 based microcontroller systems that have additional timers/PWM pins.

I looked into the motor controllers you linked, and frankly serial communication is something I'd rather avoid if possible on this project. I'm trying to keep the scope somewhat limited so I actually have a chance of getting the whole thing to work.

I've looked at my pinout list and I show 2 pins (5 and 6) will still have PWM available even if I use both the Servo and NewPing libraries.  I will also have enough pins free to drive a conventional motor shield.  So this is the route I would prefer to go.  However, I haven't found much in the way of discussion about using the "official" motor shield un-stacked from the Arduino.
13  Using Arduino / Sensors / Re: NewPing Library: HC-SR04, SRF05, SRF06, DYP-ME007, Parallax PING))) - v1.5 on: September 10, 2012, 07:38:09 am
Tim,

Thanks for your very thorough response.  The sketch I'm developing does use the interrupt_ping_timer() method, since the sketch needs to "multitask".  It sounds like changing the timer that NewPing uses is a non-starter, since I will also need to drive a servo (in addition to 2 motors).

It sounds like the best option for me is to unstack the shield and change which pins are used for PWM.

14  Using Arduino / Sensors / Re: NewPing Library: HC-SR04, SRF05, SRF06, DYP-ME007, Parallax PING))) - v1.5 on: September 09, 2012, 02:35:05 pm
This may have been answered before in the thread, but I didn't see it on a quick read-through.

I'm using the NewPing library (which is awesome) and the Arduino Motor Shield.  Unfortunately the shield uses pins 3 and 11 to do the motor PWM, which conflicts with Timer2 used in NewPing.

Is there a way to change what timer NewPing uses?  Or, is it just simpler to un-stack the shield and the Arduino and manually wire the PWM into different pins?
15  Using Arduino / Motors, Mechanics, and Power / Sensing Battery Voltage and auto-shutdown? on: September 08, 2012, 09:10:40 am
I'm using a Lithium Polymer battery from an RC aircraft to power my Arduino project.  This is a "dumb" battery - it has no internal protection circuit.  To avoid over-drawing and damaging the battery, I need a way to shut down the Arduino when the voltage drops below a certain threshold.

Reading the battery voltage can be done on one of the analog input pins, with a resistor to drop the 11.1 volts down below the max 5V input (calibration will be needed to correlate sensed voltage in with actual voltage).

My biggest question is, can the Arduino power itself off in software, or will I need to rig up a relay that mechanically disconnects the battery?
Pages: [1]