Show Posts
Pages: 1 ... 7 8 [9] 10
121  Using Arduino / Project Guidance / Re: Maximum frequency generated by Arduino uno on: October 24, 2012, 05:27:41 pm
Does anyone have idea of the maximum frequency that can be generated by Arduino uno?

Maximum frequency of what? Sound? Clock speed? If clock speed, then it's 16MHz
122  Using Arduino / Project Guidance / Re: Conductivity measurement tool from an Arduino Uno! on: October 24, 2012, 04:38:01 pm
What are you trying to measure?  Do you have an idea of what kind of "numbers" you expect?

Sorry man, I accidentally pressed the "Publish" button while editing. You should re-read it to get what i'm trying to say  smiley
123  Using Arduino / Project Guidance / Conductivity measurement tool from an Arduino Uno! on: October 24, 2012, 03:51:53 pm
Hey Arduino forum,

Recently I've been thinking on what kind of project should I build next with having a few parts.

I've decided to make a conductivity measurement tool out of an Arduino Uno!! smiley-surprise Exiting, isn't it !?  smiley-roll

Well... It was in the beginning. But then It's boring when you just see some numbers ranging from 0 to 1023 coming out from the serial monitor that are read from an analogRead function.

I used some water and then tried adding salt to it, in order to test my tool. I place two wires into the water. (One's connected to GND and the other is connected to 5V through a pull-up of 10K and to another wire going to A1) And It works! Its even capable of reading the conductivity of my body by placing one end of wire in one hand and the other wire in the other hand.

The thing I really want to achieve is convert those numbers into some widely used conductivity measurement. I don't know from were to start though.

Here's my simple code:

NOTE: I use the map function so that it reads 0 when there's no electricity, and 1023 when it's at its max. If I don't use it then It would read 0 when the two wires touch each other.

Code:

int sensor = 14; // sensor pin
int comp;

void setup()
{
  Serial.begin(9600); // Serial for Debuging
}

void loop() {
   comp = analogRead(sensor);  
   comp = map(comp, 0, 1023, 1023, 0);
   Serial.print("Reading =");
   Serial.println(comp);
   delay(500);
}

Thanks!!
124  Using Arduino / Motors, Mechanics, and Power / Re: Controlling two 3V motors without a motor shield. on: October 11, 2012, 10:39:20 am

There are many ways to control a motor without having to buy a shield. Have a read of this:-
http://www.thebox.myzen.co.uk/Workshop/Motors_1.html
and the other motors pages on my site.

Oh, Wow! Thank You very much! That was just what I needed!
125  Using Arduino / Motors, Mechanics, and Power / Re: Controlling two 3V motors without a motor shield. on: October 11, 2012, 08:11:44 am
Ultimately, you need an h-bridge driver of some sort to control the motors fully (to be able to vary their speed with PWM, and change their directions). There is no way around this. But there are cheaper ways than an Arduino motor shield.

Hmm, I see. So the only option is a H-Brigde if not a Arduino Motor Shield. But would the Arduino have enough power to control just one 3V motor?
126  Using Arduino / Motors, Mechanics, and Power / Controlling two 3V motors without a motor shield. on: October 10, 2012, 04:51:35 pm
Hi Guys,

I wanted to get some suggestions from all of you people for my first robot project. After searching the Intenet for two weeks, I found this cheap Robot wheeled kit for just 10 bucks. It has two 3V DC motors.
http://www.hobbyking.com/hobbyking/store/__26248__Simple_Expandable_Robot_Chassis_KIT_.html

I have an Arduino Uno, And I want to build a robot with that kit.However, I don't feel like spending another 10 bucks for just an Arduino Motor Shield so I want to make my motor power supplies out of a voltage regulator, which i'll get from RadioShack.
http://www.radioshack.com/product/index.jsp?productId=2062599

Later on I'll probably buy a Ping! Sensor for 30$ but for now i'll try to do some experimenting with 2 photon resistors that came with my MAKE: Getting Started with Arduino Kit. And if I'll want, i'll invest then a Motor Shield

But i'm worrying that the Regulator voltage is to hight for such small motors. How can I apply the ohms Law and find the needed resistance since i'm really bad at this? I just don't get one thing: Does Voltage decrease proportionally to the Amperage when you add a resistor? Or just the voltage decreases?

Thank You Guys,
Sincerely Michael.
127  Using Arduino / Programming Questions / Re: Integers use much less space then Floats?! on: October 08, 2012, 01:52:06 pm
But analogRead will only ever return a two byte result.

Oh... Thats true. My bad
128  Using Arduino / Programming Questions / Re: Integers use much less space then Floats?! on: October 08, 2012, 01:50:51 pm

The processor has no floating point hardware, so fp operations have to be emulated in software.
This takes up program memory.
A float is four bytes, an int is two on the Arduino.
Variables reside in RAM, not program memory.

Thanks, but how does it only resides in RAM if 600bytes of program memory are being used up?
129  Using Arduino / Programming Questions / Re: Integers use much less space then Floats?! on: October 08, 2012, 01:46:28 pm
Why would you do that? The analogRead() function returns an int. Storing the two byte int in a 4 byte float wastes space and adds no value.

True, But i just did it as to show an example. Maybe i'll use a light sensor or other hardware later on requiring longs.
130  Using Arduino / Programming Questions / Integers use much less space then Floats?! on: October 08, 2012, 01:32:20 pm
Hi Guys!

Recently i've been doing a project using my Arduino Uno R3, which is very simple. It is basically just a photoresistor that is used as a motion detector and a 8-ohm speaker from Radioshack. I want to make a burglar alarm that turns on when it spots significant changes in light.  smiley-cool

So my code is very short, just above 30 lines of code. You don't really have to study it. But maybe by looking at it would help you answer my question.
Code:
int sensor = 14; // sensor pin
int sound = 9;   // speaker pin

void setup()
{
  Serial.begin(9600); // Serial for Debuging
}

void loop()
{
  Serial.println(analogRead(sensor)); // Print out to Serial
  int comp = (analogRead(sensor));    // Comp integer which is used later on in the "for" statement to find by how much the light intensity has chaged.
  Serial.print("Sensor Read = ");     // Debug it
  Serial.println(comp);
 
  for (int i=0; i<50; i++) {          // Comparing 50 times
    int eye = (analogRead(sensor));
    int dif = comp - eye;             // if is diffirence between the comp light light measure and the current measure
     
    if (dif < -10 || dif > 10) {   // If there is an aceptable diffirence in this case 10 then do a sound
       tone(sound, 6000);
       delay(3000);
       noTone(sound);
       break;
       Serial.println("------------------------------------");
       Serial.print("Diffirence = ");
       Serial.println(dif);
       Serial.println("------------------------------------");
     }
     delay(100);                      // do this comparing 10 times per second
  }
}

But here is a Mystery (or a fact?)  smiley-roll-sweat When I change the
Code:
int eye = (analogRead(sensor));
int dif = comp - eye;           

To

Code:
float eye = (analogRead(sensor));
int dif = comp - eye;             

The Sketch size increase from 4,502 bytes to 5,178 bytes, that somewhere 600 bytes. Half a Kilobyte!!  smiley-eek

Now i know that longs range from something like -2,123,424,234, to 2,123,453,345 but why do they use so much space?
Would've the programmers from the 60's killed their self if they found out that just one number took the whole computer disk space at that time?!  smiley-eek  smiley-surprise
131  Using Arduino / LEDs and Multiplexing / Charlieplexing + Arduino Uno's 20 pins = Powering 380 LEDS ? on: September 14, 2012, 08:34:46 am
Hi Arduino Forum, Hi guys!  smiley-confuse

 Recently I've been looking on Internet for some ideas to start with my project. I wanted to make a LED cube in the beginning but then "Charlieplexing" got my attention. I'm not sure if this technique exactly is used in making LED cubes (or is it?) but "Charlie" made me want to make a controllable LED screen with few Arduino pins. I'm Using an Arduino Uno R3. I have a breadboard but I understand that its awkward to make something big with it. But thats not the question.

The Question is if it's possible to drive 380 LEDs with just 20 pins (14 DigitalPins + 6 AnalogPins) on and Arduino Uno without having any power problems (I mean to much current consumption or whatever). If yes then what are the options? How to maximize the power? I mean of course it would have enough power to light on LED at a once, but how about 100 at once? 200? 300? And 380? Doesn't it need additional power supply?

The formula of the maximum amount  LEDs usable per pin is: x2 x
Where x is the amount of pins and the result of how many pins it's possible to hook up.
Plug in 20 and thats it! The Answer is 380 LED's! Cool! Now Is the Arduino thought enough?

OK, if thats possible then how to make 380 LEDs organized? I mean a circuit board is an essential, right? No breadboard is good enough for fitting 380 LED's. But would it be possible to order such a dense circuit board?

http://en.wikipedia.org/wiki/Charlieplexing- More Info
http://www.instructables.com/id/Creating-a-charlieplexed-LED-grid-to-run-on-ATTiny/ - Instructable
132  Using Arduino / Microcontrollers / Re: Communication with an ATtiny and Arduino. For saving Pins. on: September 12, 2012, 09:01:35 pm
Wow guys! Thank you so much. I really appreciate it!

But you don't need MISO because you are only talking one way.

oh.. that right! Thanks! smiley-surprise

But I have some more questions guys... smiley-roll-blue

It only have 5 pins which means you could only have 3 LEDs if you used 2 pins for communication.

It's alright.. I just want to understand how this "business" works. I will get a Attiny with more pins if needed. smiley-wink Thanks anyway!  smiley-wink

however this requires either a High voltage programmer or a bootloader (The latter of which takes up 576bytes of flash).

How exactly to load it?  smiley-money


WOW! LOVE YOUR LINKS, THANKS!  smiley-grin smiley-grin
really helpful.

mixania, just use a shift register and save yourself a lot of pain smiley

Hmmm.. What about it? How it works?  smiley-twist

add 8 16bit I2C GPIO expanders, and use charlieplexing
there you go, direct control for 16256 LEDs, using only two pins of your Arduino

enough for a 25 x 25 x 25 LED cube  

Wow! Man thats crazy! maybee some day..  smiley-yell smiley-money  smiley-cool  smiley-eek
133  Using Arduino / Motors, Mechanics, and Power / Re: Sensor shield v4.0 can be used for every project? on: September 12, 2012, 08:50:12 pm
Alright, I see. Thanks anyway!
134  Using Arduino / Motors, Mechanics, and Power / Sensor shield v4.0 can be used for every project? on: September 10, 2012, 01:40:39 pm
Hey guys, I wanted to ask if the sensor shield v4.0 can be used for controlling servo's, DC motors, sensors and other things that could be implemented to build a robot.

And how it exactly works? It covers the whole Arduino body, and how exactly does it increases the current? Is it possible to control servo's and motors with just the Arduino? If not the why? Whats the maximum current an Arduino can handle? How about the Shield?
135  Using Arduino / Microcontrollers / Re: Communication with an Attiny and Arduino. For saving Pins. on: September 09, 2012, 07:20:19 pm
WOW! Thank you bro! Really thank you so much, I really appreciate it! smiley-sweat

Umm... but one thing. wher's the USI on the ATTINY? is it two wires? where to I connect it to on the Arduino?
Pages: 1 ... 7 8 [9] 10