Show Posts
Pages: [1] 2
1  Using Arduino / Sensors / Re: Automotive Sensors on: January 15, 2012, 08:15:08 pm
So basically my temperature range on gauge is normally 50-130c, in the case of digital I can probably start from 0c(or maybe less!) for a change, for the purpose of this design I need to work out roughly the resistance of 65c and work out what combined resistance would make approx 2.5v output to the arduino input? lets pretend my temp sensor on the engine has a 65c resistance of about 2k ohms, at 20c its 5k ohms and at 0c it has about 10k resistance (or something along these lines) what relation does R2/R3 have to this resistance?


Generally temp sensors go the other way around - and they aren't linear - as an example GM temp sensors (which are very common on all sorts of vehicles) have the following rough R vs Temp
Deg CResistance
-1825k
-713.5k
47.5k
213.5k
401.7k
70480
100190

The way I generally go about sizing R2 is to look at the highest value I want to read - lets say its -20 deg which will be about 28k or so. I'll use a pull up of 1/10th that or less; the value of 2.2k in the figure is what I generally use for a GM temp sensor. Rin should generally be at least 5 times that or say 10k minimum, but I tend to use the value for which I want it to start being reasonably accurate lets say 20 deg and multiply by 10 so that gets me around 33k. Then I look at the impedance requirements of the following stage - in this case the ADC and look at what is recommended in terms of supply impedance. If the output of my circuit isn't good enough to drive the ADC I would buffer the output with an opamp setup as a voltage follower (positive amp with gain of 1). If you are using a GM sensor you can probably get away with using the above circuit with the values mentioned directly. My advice would be to either find datasheets for the sensors you want to measure or to take some careful measurements while the sensors are on the vehicle to determine their range.
2  Using Arduino / Sensors / Re: Automotive Sensors on: January 15, 2012, 08:17:11 am
Generally sensor inputs such as manifold air temp, coolant temp, oil pressure etc have inputs that look like the following image



The choice of R2, but especially Rin is determined by the sensors range of resistance, linearity, and the following stage which will measure the voltage.   
3  Using Arduino / Sensors / Re: Digital Car Boost Gauge project on: January 13, 2012, 02:23:26 am
Depending on how you would like to do this (tube to gauge like a normal boost gauge or tube to a sensor under bonnet with wiring back to gauge) there are a couple of options.

I laid out a circular pcb at one point with 7seg displays in the middle and leds around the outside so it would have a programmable "redline" so to speak. My design was aimed at the gauge being used in a string and a button being pressed on an individual gauge to allow you to change its readout - so I didn't have any sensors onboard any gauge - that was all at the main controller. I also had two different sizes (my project was to build a whole dash worth of gauges along with indicator lights, warning lights, odo, trip etc.

4 bar map sensor with baro corrections if you want to have the tube run to the gauge
http://www.diyautotune.com/catalog/mapdaddy-bar-map-sensor-with-barometric-correction-p-117.html

The same place has external 3 bar map sensors for about the same money.
4  Forum 2005-2010 (read only) / Syntax & Programs / Re: 4x4x4 Cube? - Is it possible? on: August 04, 2008, 12:10:52 pm
4x4x4 = 64 LED's

The MAX7219 can control 64 leds with one chip and only uses 3 pins on the arduino. More info is available in the playground on how to use it and either the matrix or ledcontrol libraries. I've been using these and the ledcontrol library in particular does everything I want.
5  Forum 2005-2010 (read only) / Interfacing / Re: analog out 0-10V With Arduino for lighting con on: July 26, 2008, 12:01:08 am
Quote
Hi,  
I'm going to try both schematics that Delta uploaded, they are very clear! Thanks!
I can't find the LT1466 (single supply rail to rail op-amp) where I live (Brussels).
There are tones of references for single supply rail to rail op-amps on the net; I'm a little bit lost.
At the shop I use to go, they have the TL081 and LM741, but I don't know if they are rail to rail (I don't see any info about it in the datasheet).
Could anyone tell me other “typical” single supply rail to rail op-amps to replace the LT1466 in this schematics?
For the transistor's schematic I was going to use a tip 120, is it ok?

Sorry for my ignorance.
Felix

Ignorance is fine, not everyone is good with electronics. You really should use a single supply style op-amp but rail to rail is not necessary if you increase the V1 voltage to say 12V. You could use an LM124 (or LM324 they tend to be more common) which is single supply but only goes to about 1.5V of supply so at 12V it should be capable of 10.5V max. I don't know what type of lighting controller your using, or what it will do if you exceed 10V, so be careful.

A TIP120 should be ok, also note that the transistor circuit will work in the reverse manner to expected. IE the op amp circuit will output high voltages for high duty cycle, but the transistor one will output low values for high duty cycle.  
6  Forum 2005-2010 (read only) / Interfacing / Re: analog out 0-10V With Arduino for lighting con on: July 21, 2008, 11:31:46 am
Quote
A simpler way to do it would be to take the output through a simple common emitter transistor stage with the collector load of the transistor connected to +10V. Then smooth that with an R & C or two. In that way you are already dealing with a 10V signal to start with and there is no need for a precise gain on the amplifier.

In which case this will get you in the ball park

7  Forum 2005-2010 (read only) / Interfacing / Re: analog out 0-10V With Arduino for lighting con on: July 21, 2008, 04:43:27 am
This should get you in the ball park.



V1 is supply for the OP-AMP. V2 is the PWM output from the Arduino. The OP-AMP must be a single supply rail to rail type.
8  Forum 2005-2010 (read only) / Interfacing / Re: 8x8 rgb led matrix + 4bit pwm, irq code speed on: July 06, 2008, 01:00:34 pm
Quote
btw, my current oscilloscope sucks bigtime. anybody tried one of these yet http://www.rigolna.com/products_ds1000.aspx ?

We were just given a demo of these units at the uni I work for. So far we are very happy with their capabilities, the only thing that irks us a little on the lower models is you can't change the centre frequency of the FFT, so if you zoom, its not necessarily where you want to zoom to.
9  Forum 2005-2010 (read only) / Interfacing / Re: I2C EEPROM dump? on: August 10, 2008, 08:35:56 pm
Quote
I must still be doing something wrong... when I run the code that agib listed above, I get this:

0x00-0x00:     0x00     0x00     0x00     0x00     0x00     0x00     0x00     0x00    
0x00-0x08:     0x08     0x00     0x00     0x00     0x00     0x00     0x00     0x00    
0x00-0x10:     0x10     0x00     0x00     0x00     0x00     0x00     0x00     0x00    
0x00-0x18:     0x18     0x00     0x00     0x00     0x00     0x00     0x00     0x00    
0x00-0x20:     0x20     0x00     0x00     0x00     0x00     0x00     0x00     0x00

and so on, down to 0x08-0xF8. I get the same results with two different chips, which is why I think something isn't right. One of them is a brand new engineering sample, delivered from Taiwan earlier this week. The other was removed from a device (motorcycle dash) that was produced in 2003.

I'm using a Sparkfun Wee, attached to an FTID TTL-232R cable. I've got pins A0, A1, A2, and Vss on the EEPROM wired to GND on the Wee, Vcc wired to 3.3V, WP jumpered over to Vcc (which should enable WP), SCL to pin 5, and SDA to pin 4.

Just to clarify....do you have it connecte to pin 4 & 5 digital or analog - I2C bus is pins 4 & 5 of the Analog inputs. I've seen quite a few people get this mixed up.
10  Forum 2005-2010 (read only) / Interfacing / Re: I2C EEPROM dump? on: August 08, 2008, 12:22:11 am
I tested this only a week ago, not only does it work, but even with WP enabled you can send write commands to the chip....just nothing gets written.
11  Forum 2005-2010 (read only) / Interfacing / Re: I2C EEPROM not working on: August 12, 2008, 09:32:25 pm
As posted very recently - are you using pins 4&5 of the digital or analog - I2C is on pins 4 & 5 of the analog inputs - This seems to trip up a lot of people.
12  Forum 2005-2010 (read only) / Interfacing / Re: LCD3Wire and two displays. on: August 08, 2008, 01:42:28 am
no worrries, glad to help
13  Forum 2005-2010 (read only) / Interfacing / Re: LCD3Wire and two displays. on: August 08, 2008, 12:35:28 am
In the .cpp file is this - the variables are external to the class - so they are global and instantiating a new instance of the class will overwrite them.

Code:
// --------- settings -------------------------------------

//Data, Clock and Strobe pins are set using the constructor
int dat_pin;
int str_pin;
int clk_pin;

//number of lines of the LCD, set using the constructor
int lcd_lines;


Try removing these 4 external declarations.


And putting them inside the class definition in the .h file. Delete the .o file and recompile the library. Hopefully that will get it to work for you. the class definition should look something like this

Code:
class LCD3Wire {
public:
  LCD3Wire(int lcd_lines, int dat_pin, int str_pin, int clk_pin);
  void commandWrite(int value);
  void init();
  void print(int value);
  void printIn(char value[]);
  //non-core---------------
  void clear();
  void cursorTo(int line_num, int x);
  void leftScroll(int chars, int delay_time);
  //end of non-core--------

private:
  void _pushByte(int value, bool command);
  void _pushNibble(int nibble, bool command);
  void _pushOut(int value);
  int dat_pin;
  int str_pin;
  int clk_pin;
  int lcd_lines;
};
14  Forum 2005-2010 (read only) / Interfacing / Re: Matrix lib/MAX7219 wrong ouput? on: July 21, 2008, 04:48:00 am
Thank you Thank you Thank you smiley

the LedControl Library does exactly what I need, and has everything around the way I would expect.
15  Forum 2005-2010 (read only) / Interfacing / Re: Matrix lib/MAX7219 wrong ouput? on: July 18, 2008, 01:49:33 am
Thanks I'll give the other library a go. I'll report back sometime this weekend smiley
Pages: [1] 2