Show Posts
Pages: 1 ... 17 18 [19] 20 21 ... 34
271  Using Arduino / Project Guidance / Re: Thermoelectric Cooler with Arduino? on: April 22, 2013, 06:16:22 pm
Quote
Max Operating Temp: 180℃
Min Operating Temp: -50℃
Learn about TECs (Tom's Wiki)
Learn about thermoelectric effect (Wikipedia)
Example Arduino code to control a MOSFET for power
Code:
/*
 SparkFun Electronics 2010
 Nathan Seidle
 
 This code is public domain.
 
 Peltier ran at 3.6A @ 11.0V = 39.6W!
 
 The thermo-electric cooler (or Peltier) works well well with a computer power supply for power, a computer
 CPU heat sink for cooling and a N-Channel MOSFET to control the power. The Peltier is going to use a ton
 of juice. In this case, I  measured 3.6 amps at 11 volts! I had to attach the hot side of the Peltier
 to a large computer CPU heat sink but it worked so well that the cold side was so cold I could not keep
 my finger on the device.
 
 Because I was so scared of pumping 40 watts into a device, I used this program to slowly ramp
 up the power flowing through the MOSFET. Press 'a' to increase power, 'z' to step down.
 
 */

int peltier = 11; //The N-Channel MOSFET is on digital pin 11
int power = 0; //Power level fro 0 to 99%
int peltier_level = map(power, 0, 99, 0, 255); //This is a value from 0 to 255 that actually controls the MOSFET

void setup(){
  Serial.begin(9600);

  //pinMode(peltier, OUTPUT);
}

void loop(){
  char option;

  if(Serial.available() > 0)
  {
    option = Serial.read();
    if(option == 'a')
      power += 5;
    else if(option == 'z')
      power -= 5;

    if(power > 99) power = 99;
    if(power < 0) power = 0;

    peltier_level = map(power, 0, 99, 0, 255);
  }

  Serial.print("Power=");
  Serial.print(power);
  Serial.print(" PLevel=");
  Serial.println(peltier_level);

  analogWrite(peltier, peltier_level); //Write this new value out to the port

}


272  Using Arduino / Project Guidance / Re: Measure the length of a network cable on: April 22, 2013, 05:49:53 am
Quote
"...Electricity travels through a wire at approximately two-thirds the speed of light (200000 km/s - 0.2 m/nanoseconds), which means that it travels at approximately two-thirds a foot per nanosecond... "
273  Using Arduino / Programming Questions / Re: reading and writing pins on: April 20, 2013, 11:47:04 pm
Quote
The Jaguar pad is basically four sets of buttons. Three of those sets have five buttons, and the fourth has six. Each set has one pin that is pulled low to read the buttons within that set on five (or six) other pins. It is useful to think of the Jagpad as a matrix of twenty-one buttons.


Each of the four column pins is pulled low one at a time, and any buttons in that column that are pressed will cause a low signal to appear on its corresponding row pin.

Pinout

High-density 15-pin male D-sub connector on the controller.


1.  /Column 1 address (option, 3, 6, 9, #)
2.  /Column 2 address (C, 2, 5, 8, 0)
3.  /Column 3 address (B, 1, 4, 7, *)
4.  /Column 4 address (Pause, A, N, S, E, W)
5.  -
6.  Row 1 data (pause)
7.  +5VDC Source
8.  -
9.  GND
10.Row 2 data (A, B, C, Option)
11.Row 3 data (E, 1, 2, 3)
12.Row 4 data (W, 4, 5, 6)
13.Row 5 data (S, 7, 8, 9)
14.Row 6 data (N, *, 0, #)
15.-
http://emu-docs.org/Jaguar/Controllers/jagcont.html
So you need 10 pins, 4 output and 6 input to read the key pad matrix.

Code:
#include <Keypad.h>

/*
Pause
A B C Option
East 1 2 3
West 4 5 6
South 7 8 9
North * 0 #
*/

const byte ROWS = 6; //four rows
const byte COLS = 4; //three columns
char keys[ROWS][COLS] = {
  {'P','P','P','P'},
  {'A','B','C','O'},
  {'E','1','2','3'},
  {'W','4','5','6'},
  {'S','7','8','9'},
  {'N','*','0','#'}
};
byte rowPins[ROWS] = {7, 6, 5, 4, 3, 2}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {11, 10, 9, 8}; //connect to the column pinouts of the keypad

Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );

void setup(){
  Serial.begin(9600);
}

void loop(){
  char key = keypad.getKey();

  if (key != NO_KEY){
    Serial.println(key);
  }
}

274  Using Arduino / General Electronics / Re: Multiple pull-down resistors integrated into a header pin? on: April 17, 2013, 08:48:16 am

Resistor Networks & Arrays 10pins 10Kohms Bussed
http://www.mouser.com/ds/2/54/4600M-53173.pdf
275  Using Arduino / General Electronics / Re: DC DC step down converter for smart battery charger on: April 17, 2013, 08:18:28 am
Seems like I've found a schematic of the CV/CC version?

Attached is a conceptual (untested) schematic
276  Using Arduino / Project Guidance / Re: Wifi shield as server without router, webserver, internet? on: April 16, 2013, 10:59:36 am
Yes, you can, use static IP on both wifi shield and your ipad.
277  Using Arduino / Project Guidance / Re: 18v15 Pololu Motor Controller - Need Help With Coding PWM on: April 16, 2013, 09:55:20 am
Quote
connecting Pin 11 on Arduino with PWM pin on Pololu. I have connected 'DIR' pin to pin 3 on Arduino.
That is correct connection

Quote
On the other end of the Motor controller,I have connected a 9V battery into the inputs of the Pololu and a VEX motor into the Pololu 'OutA' and 'OutB'
Are you said those 9V transistor square battery? it may not have current for your motor.

VEX motor? two wire or three wire?
278  Using Arduino / Project Guidance / Re: 3 light resisors to max on: April 15, 2013, 06:55:26 am
Read this
http://playground.arduino.cc/Interfacing/MaxMSP
http://liamtmlacey.blogspot.sg/2011/03/arduino-to-maxmsp-via-osc-guide-and.html
279  Using Arduino / Project Guidance / Re: 18v15 Pololu Motor Controller - Need Help With Coding PWM on: April 15, 2013, 06:39:37 am
Try this code (not tested)
Code:
/*
 * Pololu High-Power Motor Driver 18v15 test program
 
 Note: The pot is not directly controlling the motor,
 but the Arduino is getting the value of the pot and
 using PWM to control the motor speed based off of that value.
 
 */

int pot = 0; // analog A0
int Dir = 3; // Direction input
int motorPin = 11;  // Pulse width modulation input           

void setup()                    // run once, when the sketch starts
{
  Serial.begin(9600);           // set up Serial library at 9600 bps
  pinMode(pot, INPUT);
  pinMode(Dir, OUTPUT);
  pinMode(motorPin, OUTPUT);
}

int getPot() {
  int v;
  v = analogRead(pot);
  v = map(v, 0, 1023, 0, 255);
  return v;
}

int motorFoward() {
  analogWrite(motorPin, getPot());
  delay(1000);
  digitalWrite(motorPin, LOW);
  delay(1000);
  digitalWrite(Dir, HIGH);
  Serial.println(getPot());
  delay(1000);
}

int motorBackward() {
  analogWrite(motorPin, getPot());
  delay(1000);
  digitalWrite(motorPin, LOW);
  delay(1000);
  digitalWrite(Dir, LOW);
  Serial.println(getPot());
  delay(1000);
}

void loop()                     // run over and over again
{
  motorFoward();
  motorBackward();
}
280  Using Arduino / Project Guidance / Re: How to Shrink My Project on: April 12, 2013, 06:47:25 pm
Make a stripboard Arduino clone, AKA the veroduino
http://nathan.chantrell.net/20110819/build-your-own-arduino-for-under-10/
281  Using Arduino / Project Guidance / Re: Connecting batteries for longer work time ? on: April 07, 2013, 04:57:18 am
Most of 9V Battery have Capacity about 400 to 550 mAh, if you can last for 4 day, that about 100mAh pre day.
So for a month you will need 3100 mAh battery or 3.1Ah battery. If weight is not your consideration, you can use SLA battery,
but if you need to have light weight then select LiPoly battery.
but for 3.1Ah of LiPoly battery still about 0.5 Kg of weight.
282  Using Arduino / Project Guidance / Re: Help please with Tone4 tutorial on: April 06, 2013, 11:17:14 pm
Look at this post, using mosfet
http://arduino.cc/forum/index.php/topic,157647.msg1181162.html#msg1181162

http://arduino.cc/forum/index.php?action=dlattach;topic=157647.0;attach=39938
283  Using Arduino / Project Guidance / Re: Analog Refence on: April 06, 2013, 11:03:17 pm
Question is: If i do set AREF to 2.56V, can I do like this without damage the arduino?
No you can't, there will damage the arduino cause the input can not more then -0.5V

The circuit shown had shift the mid point of the AC voltage above ground level.
284  Using Arduino / General Electronics / Re: Getting 5V D/C from single live wire A/C light switch on: April 06, 2013, 03:08:23 pm
For a future project I've been considering using the below USB wall chargers (5v, 1A). Not sure about the size of the components inside the enclosure.

http://www.ebay.com/itm/Mini-USB-AC-Wall-Charger-Power-Adapter-For-Iphone-4-4S-3GS-3-Ipod-4th-5th-Gen-/400385181295?pt=LH_DefaultDomain_2&var=&hash=item5d38d1066f

Stay away from super-cheap AC adapters built by mystery manufacturers. Spend the extra few dollars to get a brand-name AC adapter. It will be safer, produce less interference.
http://www.righto.com/2012/03/inside-cheap-phone-charger-and-why-you.html
285  Topics / Home Automation and Networked Objects / Re: Cheap bluetooth remote controllers on: April 06, 2013, 01:00:03 am
The USB/Bluetooth dongle need driver from the PC to work, so it can't connect to relay directly.
You can use this JY-MCU HC-06 Bluetooth Wireless Serial Port Module with Attiny MCU to control a relay for less then $20
Pages: 1 ... 17 18 [19] 20 21 ... 34