Show Posts
Pages: [1] 2 3
1  Using Arduino / Project Guidance / Re: Pressure Sensitive Resistors on: December 28, 2011, 09:29:06 pm
Okay i switched the wiring around like Grumpy mike said to and it is working but the analog read is starting with 1023 and then goes down with pressure applied...  How do i get it to start around 0 and then go up when pressure is applied...????
2  Using Arduino / Programming Questions / Re: Run two commands at the same time. on: December 28, 2011, 09:23:35 pm
I know its has been a while but I have had some free time to try to work on writing my code using millis() but i need some help..  I followed the tutorial on the link but a few things were fuzzy to me...  I get the main jist of the millis() function and principals behind it but just can't figure out exactly how to write the code... 

Below is the code i have so far...  What I think is wrong and dont understand is the timerLight=msec+5000; part and then the second if statement... 

I think i am really close to getting this but would love some tips...

const int fanPin = 13;     
const int threshold = 900;
unsigned long timerLight=0;

void setup() {
  pinMode(fanPin, OUTPUT);
  Serial.begin(9600);
}
void loop() {
 
   int analogValue = analogRead(0);
   unsigned long msec=millis();
   
   if (analogValue > threshold)
   {
      digitalWrite(fanPin, HIGH);
      Serial.println(analogRead(0));
      Serial.println("HIGH"); 
     timerLight=msec+5000;
   }   

if ( timerLight && timerLight<msec )   
  {     
    digitalWrite(fanPin, LOW);
    Serial.println(analogRead(0));
    Serial.println("LOW");
    timerLight=0;
  }

}
3  Using Arduino / Project Guidance / Re: Pressure Sensitive Resistors on: December 24, 2011, 09:01:57 pm
Okay  so I'm a little confused...

The only way i can get it to work is when I connected one side on the FSR to analog in on the arduino and to ground via a 10K resistor and the other side of the FSR to +5... ???  I have changed the value of the resistor and it produces different readings, but it si all over the place so I wanted to ask if it is set up right...???  From what you said it sounds like I have it wrong...   
4  Using Arduino / Project Guidance / Re: Pressure Sensitive Resistors on: December 24, 2011, 12:39:47 pm
Sorry it took me a while to have time to mess with my FSR but I am working on it today and have a question...  IF i want to simply hook it up to my arduino to see what reading it will output how can i do this...??? 

It has two pins so does one go to analog input and the other to ground...???  Do i need any caps or resistors or anything...???
5  Using Arduino / General Electronics / Breadboards, componenets, and hot glue??? on: December 15, 2011, 02:56:24 pm
Hello all,

have a breadboard for a small circuit and it has all the regular componenets such as transistors, resistors, diodes, realys, microchips, etc.  I will have the breadboard mounted in a plastic project case and it will be mounted vertically...  I need a way to secure the componens in the breadboard better so i waas wondering if i can use hot glue...???  I know some components such as the microchip is heat sensitive when solidering but i didn't know if hot glue is to hot or if there would be other effects to the circuit in some way...???

I do not have a soldering iron and don't know how to use one so I planned on making the protoboard breadboard hold the permanent project. It really doesn't matter if it is no longer usable since it will be permanently mounted in the box... I really just want to put a few small dabs of hot glue around the components to help make sure they don't fall out over time...  Superglue may be another option but it gets crusty over time and i though hot glue woudl work better...  I am open to any other suggestions also....

Thanks for the help..!!!
6  Using Arduino / General Electronics / Arduino and Relays on: October 17, 2011, 07:30:00 pm
I have a project where I have made an arduino on a breadboad and i am using it to control a motion sensor and some small 12V lights.  I use a wall wart that outputs 12VDC 1500mA.  On the breadboard i use a LM7812 to regulate 12V to one rail on the breadboard and then I use a LM7805 to regulate 5V to the breadboard's other rail.  I need 5V for the motion sensor and 12V for the lights that i switch on with a micro SPDT 12V relay.  I have attached a pic of the breadboard to help me ask my questions.  I have it all working but there are some things I am thinking i want to do to save space so I need some advise.  

Also, regarding the relay...  I have been told that to use a relay with the arduino i need to follow this schematic...  I am not really that good at reading schematics so I have some questions about this schematic as well...
http://arduino.cc/playground/uploads/Main/relays.pdf

Here are my specific questions...

1. From what i know i have to hook up the ATmega's pin 8 and 22 to ground.  I also have to hook up pins 9 and 10 to ground through a 22pf capacitor and pin 21 to ground through a 0.1uf capacitor.  As you can see on the pic i currently wire the 8, 9, and 10 pins through the 5V rail's ground and this requires me to run wiring around the ATmega.  Is it possible for me to hook pin 8, 9, and 10, to the ground of the 12V rail...?   This would make this part much easier if so, but i'm not sure if i can mix the ground of two different Voltages and if it would harm the ATmega...???

2 Regarding the schematic…  In the schematic where it says “Relay power V+” and “Relay Power Ground”  is it talking about connecting it to the V+ of the 12V rail and to ground of the 12V rail…???

3. On the schematic where it has “Arduino Ground”, “Emitter” and “Relay Power Ground” all connecting into “Ground”.  Can this be either the 12V rail’s ground or the 5V rail’s ground?  

4.  On the schematic it says use a TIP102 transistor for larger relays. Does this mean with any relay over 5V?  I have a TIP 120 transistor would this work…?

5. Do I just need to make sure all grounds are connected even when there are different Voltages?

Thanks for any help…
7  Using Arduino / Motors, Mechanics, and Power / Re: Regulated or Unregulated 12V DC on: October 12, 2011, 09:45:16 am
One more quick question regarding power... 

Does anyone know where I can get an AC/DC regulated 9V 2Amp wall wart...  I'm in the USA and ideally it would have a tip that is 5.5mm O.D.; 2.5mm I.D.; and female....

Thanks again...
8  Using Arduino / Motors, Mechanics, and Power / Re: Regulated or Unregulated 12V DC on: October 12, 2011, 09:36:14 am
Will do... thanx...

-H-
9  Using Arduino / Motors, Mechanics, and Power / Re: Regulated or Unregulated 12V DC on: October 12, 2011, 09:13:45 am
SWEEEEETTTT..!!!!  I fell pretty confident regarding how to figure my power needs and a much better understanding of how things work in general...!!!  This is great...!!!

Okay now i have a couple questions regarding the design of teh circuit and how some of the componets are connected; specifically the relays.  Should i start a new thread or ask the questions in this one...???
10  Using Arduino / Motors, Mechanics, and Power / Re: Regulated or Unregulated 12V DC on: October 12, 2011, 07:45:27 am
FANTASTIC...  That makes total sense and it is too cool...  I would've searched the web forever trying to figure it out...  Thank you for the very clear example...  So now I can confidently figure out what my power needs are for my project at 9V and here is my math...  

1. Lights – 12V 65mA
     a. 12V/65mA = 0.1846 Ohms
     b. 9V/.1846 = 48.75
     c. So at 9V each light will draw 48.75mA
     d. This is 0.44 Watts…???

2. Heater – 12V 800mA
     a. 12V/800mA = .015 Ohms
     b. 9V / .015 = 600
     c. So at 9V the heater will draw 600mA
     d. This is 5.4 Watts…???

3. Fans – 12v 250mA
     a. 12V/250mA = .048 Ohms
     b. 9V / .048 = 187.5
     c. So at 9V each fan will draw 187.5mA
     d. This is 1.6875 Watts…?

I am still fuzzy on the AC/DC converters and how to figure what my heat dissipation will be at various voltages/currents so I have a couple of questions about voltage drops, heat sinks, etc...

So lets say I have an AC/DC converter that outputs a regulated 9V DC 2A.  On my circuit I use two voltages; 9V and 5V.  The 9V power rail will need up to 1500mA.  The 5V power rail will need up to 500mA.

My questions :

1. When the power adapter says the output is regulated does it mean that it is going to output a steady 9V no matter if my load is 500mA or the full 2Amps or will there always be a voltage drop...???

2. When I regulate 9V down to 5V with a LM7805 will it always supply a consistent 5V no matter if the current drawn is 100mA or 500mA?

3. To calculate my voltage drop in a circuit I first take the difference of the input voltage and the regulated voltage- 9V – 5V = 4V.  Then I figure the product of my current draw 2 Amps and this voltage; 4V * 2 Amps = 8 Watts.  So my heat to dissipate will be 8 Watts…???

4. When determining my watts of waste/heat to dissipate will the 9V and the 5V rail be determined together or separately…???  When I think about it rationally I think it will be determined separately but I’m not sure.  For instance…

a. If I have the consistent regulated 9V input and then I regulate 5V with a LM7805 and my 5V rail uses up to 500mA @ 5V then I will have a voltage drop of 4V and 2 Watts of heat to dissipate if the current drawn on the 5V rail is 500mA…???  

b. Then for my 9V rail I will have up to 1500mA @ 9V needed so with a consistent regulated input of 9V there will be no voltage drop and therefore no heat to dissipate…???  

c. Am I thinking about this all wrong or does this look right…???

5. At what wattage of heat to dissipate do I need to use a heat sink…???  How can I determine the size that the heat sink needs to be…???

6. Where do the heat sinks go...???  I think for the 5V rail it should be on the LM7805 but what about for the 9V rail?

This is all such a huge help adn i feel like i owe something back...!!!  Is there anything i can do to show my appreciation...???
  
11  Using Arduino / Motors, Mechanics, and Power / Re: Regulated or Unregulated 12V DC on: October 11, 2011, 06:50:55 pm
So with Ohms law and one of the fans at 12V I take 12V x .25 Amps = 3 Watts...?

Then how do i figure what current it will draw at 9V...???  Do i take the 9V x .25 Amps = 2.25 Watts...???  Is that right??? Isn't it telling me that it will still draw .25A at 9V...???  I guess what i don't understand is how to figure what my devices will draw when ran at a different voltage then what it is meant to be ran at.

I think it is all starting to very slowly sink in and thanks for everyone's patience while i try to make sense of all this.  Can someone please tell me if this thinking is right...??? So my circuit will need two voltages from one power source.  I plan to use a 9VDC 2A power adapter that outputs a regulated 9V.  I will have to regulate some power down to 5V for some of the devices (motion detector, pressor sensor, Arduino, etc.) and use the 9V to power the lights, fans and heating pad which are all hooked up to the 9V rail through their own relays (so 3 relays total; one for lights, one for fans, one for heating pad).  So my top current draw on the 5V rail may be up to say 500mA and my top current draw on the 9V could be up to 1500 mA...   If I need to regulate 5V from 9V then I will have a voltage drop of 4 Volts.  If my entire circuit (5V rail and 9V rail) is drawing 2 Amps of current will I have 8 Watts of heat to dissipate...??? Is that right or is it only figured for each rail...???   So if it is for each rail the 5V rail will have 4V x .5 Amps = 2 Watts and the 9V rail will have none...???

Do you think it would be better to get a regulated wall wart or to get an unregulated one?  IF i use an unregulated one like i hooked up today adn it outputs 14V with no load won't i have a lot more heat to deal with?  If i'm thinking about this right i think it would make it easier to get a regulated one...

Thanks for any help you can provide....
12  Using Arduino / Motors, Mechanics, and Power / Re: Regulated or Unregulated 12V DC on: October 11, 2011, 11:15:05 am
I got a 9V 800 mA wall wart and tested it when there was no load on it and it said it was putting out 14V...  Does this sound right...???

Then i added a 12V light (65mA) and 2 - 12V fans (250mA + 480mA) that together equaled 795 mA and then tested the voltage and it was still around 10 - 10.25... 

If I run a 12V componet on a 9V supply will it draw less current or the same current at the lower voltage...?

If a product says it will draw 250mA will it always draw that much...???


13  Using Arduino / Motors, Mechanics, and Power / Re: Regulated or Unregulated 12V DC on: October 10, 2011, 09:13:58 pm
Okay cool and once again you cleared that up...  thank you...   And that also answers another question i had about fan speed control too i think...  I read quite a few posts on here regarding fan speed control and PWM and I'm starting to think that controlling the fan speed via PWM is not recommended. So, could I slow the fans by supplying a constant lower voltage to the fans...???  If so is there a recommended method or voltage...?  I have read that they will need more than 5V to work reliably but i'm not sure how to go about getting them at a good level.  I'm mostly concerned with the noise...
14  Using Arduino / Motors, Mechanics, and Power / Re: Regulated or Unregulated 12V DC on: October 10, 2011, 03:40:29 pm
Ahhh okay I think i get it...  So when i tested it there was nothing drawing current so it was over 12V and when i have something connected to it that draws current the voltage drops... I never thought about that so muchas gracias for clearing it up...!!!

WHen u say to use 10V do you mean a 12V wall wart or a 12V regulator...???  What will happen to the devices (Fans, lights, heating pad) if everything combined draws the full current and it drops the voltage to 10V.  All the above mentioned devices are 12V...???
15  Using Arduino / Motors, Mechanics, and Power / Re: Regulated or Unregulated 12V DC on: October 10, 2011, 07:39:20 am
The wall wart is coming in at around 14.34V DC...  So I guess that means I need to regulate it and that the LM7812 will work because there is +2.34 volts over the 12V...???

BTW - Mike do you ever sleep...???  U are always such a great help and it is noticed and greatly appreciated.... 
Pages: [1] 2 3