Show Posts
Pages: [1] 2
1  Using Arduino / Project Guidance / Re: ADC Readings change? on: August 01, 2011, 01:33:06 pm
THe Arduino is powered from the +12V in the car, and it fluctuates from 12.2V to 14.4V.

When measuring with the fluke, I measure at the same points as the arduino.
2  Using Arduino / Project Guidance / ADC Readings change? on: August 01, 2011, 01:14:15 pm
I have an Arduino Duemillanove that I use for a data logger in my car. The arduino is powered by the +12v form the car. It is running perfect, but there is one thing that annoys me big time. The readings from the ADC changes - depending on the load on the +12v in the car.

I have a reference voltage that I measure, it is 1.16V. When the engine is on and nothing uses any power in the car, I get a perfect reading of 1.16V. But if I turn on the defroster, wipers, seat haters etc. then the voltage drops to 1.02V - according to the arduino. I have tried to measure the reference voltage with a Fluke, and it stays perfect stable.

So why does the arduino think it is dropping?

I take 25 readings, and return the average. The code is straightforward, just 25 samples divided by 25.
3  Topics / Science and Measurement / Re: PWM - generate a 60-2 signal. on: May 10, 2011, 04:28:01 am
Ahh yes it is very simple - once you see the light smiley

I decided nto to use interrupts as this is the only thing the Arduino has to do.

So I used this:

Code:
if (c > 60){
    digitalWrite(TDC, LOW);
    if ( c >= 62)
      c = 0;
  }
  else   
    digitalWrite(TDC, HIGH);


  delayMicroseconds(rpm_const/2);
  digitalWrite(TDC, LOW);
  delayMicroseconds(rpm_const/2);

rpm_const will determine the frequency. This gives me a good 60-2 signal that I can use
4  Topics / Science and Measurement / PWM - generate a 60-2 signal. on: May 09, 2011, 03:13:05 pm
I need to simulate a crank position sensor from an automotive system. It utilizes a "60-2" toothet wheel.
Generating a PWm signal with varying frequenzy is not hard at all, but I cannot quite see how to stop generating the signal for two periods. smiley-sad

The signal looks something like this:

http://www.ital-performance.pl/temp/vems/trigger_falling.jpg

Can anybody help point me in the right direction?
5  International / Scandinavia / Hvor får I lavet print? on: March 21, 2011, 03:38:57 pm
Jeg har brug for at fp lavet et prototype print til et projekt jeg arbejder med - men hvor får man det lavet billigst og bedst?

Jeg vil helst undgå at skulle lave design i eagle selv...
6  Using Arduino / Displays / Re: Are red displays slower than others? on: March 07, 2011, 07:07:58 am
-20 to +70...

it is just painfully slow compared to my green ones..
7  Using Arduino / Displays / Re: Are red displays slower than others? on: March 06, 2011, 04:51:56 pm
Ok here is some video.

Ambient temperature is about 15 deg celcius.



Notice how slowly the "old" characters disappear, and also note the artifacts :/

Faulty display?
8  Using Arduino / Displays / Re: Are red displays slower than others? on: March 05, 2011, 07:20:50 am
I'll try to post some video - it is REALLY slow...

it is about 5 dec celcius right now, and that does make it slower, but it is extremely slow..
9  Using Arduino / Displays / Are red displays slower than others? on: March 03, 2011, 03:09:57 pm
I have been using green 20x4 displays for some time now, but my recent project required a red display. There is one problem though - it is HUGELY slow..

This is the display:
http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=250628556092&ssPageName=ADME:X:AAQ:GB:1123

is it normal that the red ones are so much slower? or have I just recieved a faulty display?
10  Using Arduino / Displays / Re: LCD Brightness via PWM? on: February 26, 2011, 03:31:13 pm
Yes you're absolutely right. I'll try it out, would be really nice to be able to control the contrast from the arduino. smiley
11  Using Arduino / Displays / Re: LCD Brightness via PWM? on: February 26, 2011, 03:26:51 pm
Ahh sorry I was writing brightness - but I meant contrast..
12  Using Arduino / Displays / LCD Brightness via PWM? on: February 26, 2011, 02:55:54 pm
Hi I have a 20x4 LCD hooked up to my Arduino and it is running perfect, however I find it annoying that I have to open my closed box in order to change the LCD brightness via the variable resistor. Is it possible to control the LCD brightness via a PWM signal rather than 5v + variable resistor.
13  Forum 2005-2010 (read only) / Syntax & Programs / Re: Argh.. FSM troubles.. on: October 14, 2010, 03:24:30 am
Quote
Well, 6 seems to be some magic number that only you know about. Without knowing which variable (btnDown, btnMode, btnChange, btnUp, btnPull, btnPush) contains that value, it's hard to know which if test has issues.

#define btnUp 1
#define btnDown 2
#define btnMode 3
#define btnChange 4
#define btnPush 5
#define btnPull 6

Quote
You are never assigning a new value to buttonState, so it should NOT read 6 then go back to 0.

Read my last post, the ret value in readArm() never changes despite it is being called properly. It just returns 6 - no matter what.
THAT is the issue.
14  Forum 2005-2010 (read only) / Syntax & Programs / Re: Argh.. FSM troubles.. on: October 13, 2010, 07:50:08 am
Those delays are to make sure the ADC settles properly before trying to read data from it. Normally I take x readings and average the vales found, this is just a quick'n'dirty smiley

Quote
Where do you assign a new value to buttonState? Shouldn't buttonState get the value returned by readArm()?

I don't. problem is that I in readArm() send the ret value to the seriel, it is that value that "hangs" at 6. under normal operation I'd assign the return value from readArm to buttonState - but it is the ret (and the return value) from readArm that gets stuck at 6 somehow. :/
15  Forum 2005-2010 (read only) / Syntax & Programs / Re: Argh.. FSM troubles.. on: October 13, 2010, 06:21:06 am
Quote
Perhaps you need to explain what is supposed to be happening better.

buttonState shuld not "hang" with a value of 6. It should read 6 (for button pull), then go back to 0 - just like when I'm not in a while loop.
But it keeps that value of 6 despite I call the function withn the while statement.

Quote
Why does the value returned by readArm() depend on the values on two different analog pins AND the time AND serial port data?

- Time to make a rough debounce on the button.

- Two Analog values because this is the way the switch is made (it's a radio stalk from a Peugeot 306, it has one feed and two outputs - thus I need two analog pins to get all 6 actions)

- Serial - like I wrote to be able to "simulate" the switch when I have the Arduino on the table and not in the car. if you look at it you'll see I OR the buttons and the serial, not AND.
Pages: [1] 2