Show Posts
Pages: 1 ... 63 64 [65] 66 67
961  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Running Arduino on a battery. on: July 04, 2009, 07:30:35 pm
Quote
Floating inputs drain power like PacMan eats dots.  Unused pins need to be configured as INPUTS with a PULLUP or PULLDOWN resistor or they need to be configured as OUTPUTS set LOW.  If you do nothing, it's very likely the pins will float.

I didn't know that!
962  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: A2d inputs over serial to pc on: June 26, 2009, 07:11:18 pm
google "arduino oscilliscope" for an example of an app that sends 10 bit data to a pc application(written in Processing)..

What are you catching it with on the PC?
963  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Easy question for you veterans on: June 15, 2009, 07:48:44 pm
I'm not sure this is really needed but maybe you could use a baseline voltage divider to set aref.  Run a 1M resistor from the car's "12V" to aref and a 470K from there to ground.  If you use the same two values for the other voltage dividers that would give you 100% of the range.

I have used 1M/470K voltage dividers to pick up signals from the tach and neutral sensor signals on a motorcycle.  These are both off/on sorts of things so I haven't needed to worry about the intermediate voltages.

By the way, does a car have a regulated 12V buss somewhere or does every circuit have to do its own regulation?
964  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Multiple LEDs on with Charlieplexing on: June 19, 2009, 04:11:33 pm
you might want to check out the code and circuits used here http://www.instructables.com/id/Arduino-Charliplexed-Heart-just-in-time-for-Valen/
965  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Multiple LEDs on with Charlieplexing on: June 17, 2009, 08:19:39 pm
What about splitting up the leds into multiple groups with each group having its own set of pins?  2 pins for 3 leds and you'd never have more than 3 on a set list.  Software would be complicated I guess.
966  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Arduino Accelerometer Help on: June 18, 2009, 07:22:15 pm
start by just tracking the z axis.  If you point z up you'll see the reading for +1G - probably around 390.  If you turn it over so Z is down you'll see the reading for -1G, probably around 250.

while you've got Z straight up or down the other two axes will read neutral values - probably around 320 or so.

If you jerk the accellerometer up (while Z is up) the reading will increase, down it will decrease.  

I assume you're spitting out the values over serial.  If you wanted to get a visual reaction you could use the z value to drive a blink loop delay - z up would give you slower blinks than z down.

The other two axes work the same way, of course, but maybe you'll catch on quickest if you just get one working.

My first accelerometer sketch would just report "Hey, I'm upside down" or "whew - I'm right side up".  I'm pretty easily amused of course.  I don't see that one around but maybe the code below will help a bit as a starting point.

Code:
/*
* Accelerometer input
* Takes the input from a lilypad accelerometer on analog pins 0=x, 1=y, 2=z
* converts the values to orientations (+/-90 degrees)
* and sends the orientations to the serial port
*/
int xpin = 0; // select the input pin for the sensor
int xval = 0; // variable to store the value coming from the x axis
int ypin = 1; // select the input pin for the sensor
int yval = 0; // variable to store the value coming from the x axis
int zpin = 2; // select the input pin for the sensor
int zval = 0; // variable to store the value coming from the x axis
int zdir=90;  //initial z orientation is "up"
int up=390; int down=250; int mid=(up+down)/2;
void setup() {
Serial.begin(9600);
}
void loop() {
xval = analogRead(xpin); // read the value from the x axis, 0-1023
yval = analogRead(ypin); // read the value from the y axis, 0-1023
zval = analogRead(zpin); // read the value from the z axis, 0-1023
displayvalues();
delay(100); // rest a little...

}

void displayvalues(){
int zorientation; int yorientation; int xorientation;
//Serial.print("x="); Serial.print(xval);
//Serial.print(" y="); Serial.print(yval);
//Serial.print(" z="); Serial.print(zval);
xorientation=orientation(xval)/10*10;
yorientation=orientation(yval)/10*10;
zorientation=orientation(zval)/10*10;
Serial.print("x="); Serial.print(xorientation);
Serial.print(" y="); Serial.print(yorientation);
Serial.print(" z="); Serial.print(zorientation);

Serial.println("");
}

int orientation(int accelreading) { //changes the reading of an accelerometer input into a degree orientation
                                    //with 90 being straight up, -90 being straight down
int use;                            //the capped reading that i will use here
if (accelreading>up){use=up;} else if (accelreading<down){use=down;} else {use=accelreading;}
return((use-(up+down)/2)*180/(up-down));
}
967  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Powering Arduino in Car instaation on: March 23, 2009, 07:49:25 pm
I assume a motorcycle environment would also be noisy and spiky.  I pretty much only have the arduino (probably an RBBB) and a few leds - what would I need to protect it?
968  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Suggestions for 1 Digit LCD display? on: March 02, 2009, 07:35:32 pm
thanks for the suggestions and info.  I'm poking xors at the salvaged lcds and i've ordered a nokia 3310 display along with a 5V character display from seed as well.
969  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Suggestions for 1 Digit LCD display? on: February 28, 2009, 04:42:05 pm
thank you, good to know.  I'd still rather get something with connectors etc.
970  Forum 2005-2010 (read only) / Frequently-Asked Questions / Suggestions for 1 Digit LCD display? on: February 28, 2009, 12:32:47 pm
Hi, I'm working on a project to display what gear a bike is in.  I have it working fine with an LED but I'd like to use an LCD for greater outdoor readability. I really just need a single, decent size, digit and the simpler the interface the better.  It will have to end up in a waterproof case with an RBBB or similar.

I see the Nokia 3310 from sparkfun, they also have a couple of new, cheap cellphone displays but i'm not sure of whether there's logic with them.  They have a new Nokia color LCD but again I'm not clear on the controller.

I am working with sensors from bicycle computers which have LCDs with a 19 conductor ribbon cable but my understanding is that the raw LCD requires fancy AC to drive it and it's probably beyond me.

Any suggestions?
http://www.sparkfun.com/commerce/product_info.php?products_id=8629
http://www.sparkfun.com/commerce/product_info.php?products_id=569
971  Forum 2005-2010 (read only) / Frequently-Asked Questions / Pin behaviour through reset & bootloader on: May 28, 2008, 10:31:25 am
I've been trying to use my arduino to program an external eeprom(28C64) setting the address & data lines on arduino pins then toggling another pin to drive the eeprom's /WE or /OE.

My problem is that the output pins seem to get driven during the bootload and reset processes.  I expected them to stay 3-state until I did something with them.  Mostly I don't care but the eeprom's write enable is another matter.

to be specific, the last thing i tried was pin 10 (staying away from pins 0-1 & 13),  I see it go to 0v on my multimeter during both the "upload to I/O Board" process and during a reset (either the serial monitor or the button on the arduino).  I believe it's a real 0V rather than NC because I've tried a pullup resistor.  I've included a bit of code below.  
The only references to pin 10 are "  digitalWrite(notwritepin,HIGH); pinMode(notwritepin, OUTPUT);".  I've tried the pinmode before the digitalwrite of course.  this was just my latest act of desperation.


Any suggestions?

Code:
..........
int notwritepin=10; //pin used to drive -OE
int notreadpin=11; // used to toggle the -MRD line
...............
void setup() {
  ...........
  digitalWrite(notwritepin,HIGH); pinMode(notwritepin, OUTPUT);
  digitalWrite(notreadpin,HIGH); pinMode(notreadpin, OUTPUT);  
  .............
}


byte readone(byte addr){
  ...............
  writebits(addrlen,addrpins,addrbits);
  digitalWrite(notreadpin,LOW);  //set the output enable line
  readbits(datapins,databits);
  digitalWrite(notreadpin,HIGH);  //reset the output enable line
...............
}



972  Forum 2005-2010 (read only) / Bar Sport / Re: Where to buy part in Toronto on: January 20, 2010, 09:31:11 pm

I went into Creatron on College near Spadina on Saturday.  It's a real candy store for arduino-holics.

Lots of bare AVR and support chips, kits and assembled arduinos.  They're a canadian distributor for arduino and Sparkfun.  

The owner is a fellow named lawrence - very approachable and ready to help people find what they need.  It's for sure on my list when I visit Toronto.  

http://www.creatroninc.com/
973  Forum 2005-2010 (read only) / Bar Sport / Re: RPM/rev counter on: May 26, 2010, 07:58:44 pm
a bunch of people have done things like that.  If you search for 'motorcycle' in the box above you'll fing some samples.  

does your bike have a tach. hookup point?
974  Forum 2005-2010 (read only) / Bar Sport / Re: Joke of the day on: May 18, 2010, 07:06:14 pm
Quote
Guy: Doc, I think I'm a moth!
Doc: You don't need a doctor. You should see a psychiatrist.
Guy: Yea, I know. But I noticed your light was on.
LOL

This guy goes to the doctor and he's got food all over his face, down his shirt, in his ears etc.  The doctor looks at him and says - you're not eating properly.
975  Forum 2005-2010 (read only) / Bar Sport / Exploding capacitor video on: November 05, 2009, 06:41:48 pm


This short video shows the results of two electrolytics and a tantalum capacitor with reversed polarity and modest voltage overage.  The 10 uf tantalum cap not only explodes but burns very nicely afterward.  One of the electrolytics manages a really ferocious bang but, to be fair, it's 470uf.

He's running 15V reversed into 10v caps but I bet that's not the important factor.

http://www.eevblog.com/2009/11/04/eevblog-42-exploding-capacitors-in-high-speed/
Pages: 1 ... 63 64 [65] 66 67