Show Posts
Pages: 1 ... 308 309 [310] 311 312 ... 844
4636  Using Arduino / Project Guidance / Re: Display throttle position on LCD with Arduino on: September 19, 2013, 07:05:55 pm
Is the O2 sensor a wideband one? If so of course you'll have a separate controller and these often provide their own logging mechanisms.

In my experience the process of mapping on the street is far less straight forward than you'd guess since the steady state fueling is hidden behind all the transients. It needs a lot of averaging and cleaning up the raw data to eliminate the outliers before you can get a good steady state tune - and then you also need to tune the transients. So, the trick IMO is to get your analysis algorithm right to cope with noisy data and data not neatly aligned with your map vertices, rather than try to get your collection method to give you clean data neatly aligned with your map vertices. Knowing which parts of your map have been adequately sampled (so you can fill in the missing areas) is the only part of this that IMO needs live feedback.

The TPS is usually a hall effect sensor and usually not linear

The cars I usually work on are not very modern and perhaps things are done differently these days, but they use throttle potentiometers rather than hall effect sensors. (I'm used to seeing Hall effect and MVR sensors for crank/cam position sensors.)
4637  Using Arduino / Project Guidance / Re: Position around pivot point on: September 19, 2013, 06:58:41 pm
You don't say how much freedom you've got to design this, but I'd try to put a hinge on top to deal with the see-saw motion and a sleeve that is free to rotate around the shaft to deal with the rotation. That gives you two simple joints that need angular sensors fitting but neither of them seem particular complicated to fit.
4638  Using Arduino / Programming Questions / Re: Problem with sequence on: September 19, 2013, 02:59:11 pm
I find it impossible to make sense of the code, because all of the variable names are written in a foreign language and none of them are intelligible.

It would help if you could put an English comment next to each variable definition to explain what value it holds.

I notice that you have several variables and constants which have the same name just with different capitalisation. That's a very bad idea since it makes it harder to keep track of which is which - and also makes it more likely that you will use the wrong one somewhere by mistake. In this case it's even worse because you are not consistent about which ones use upper case.

I recommend that you get into the habbit of writing constant values all in UPPERCASE
Code:
#define FC_ABAJO_PIN 9

and write all your variable names in lowercase

Code:
int fc_abajo = digitalRead(FC_ABAJO_PIN);

Now if only I knew what FC meant and what ABAJO meant I would be able to work out what the value represented.
4639  Using Arduino / Programming Questions / Re: Very, very strange bug! on: September 19, 2013, 02:40:07 pm
int time, x, y = 10;

That defines three variables and initialises one of them. It's not Arduino-specific, this is just C++.

If you want to declare them like that and initialise them all, you need to initialise them all.

Code:
int time = 10, x = 10, y = 10;
4640  Using Arduino / Programming Questions / Re: Anyone Knows how to exit a task when serial is send ? on: September 19, 2013, 01:24:36 pm
That depends what you mean by "task". If you mean "sequence of actions" then you can restructure your code to carry out that sequence without blocking, so that you can carry out the task in parallel with handling subsequent serial input.
4641  Using Arduino / Project Guidance / Re: Arduino control for a hi fi amplifier on: September 19, 2013, 01:16:10 pm
It's possible for an Arduino to control a digital pot.
4642  Using Arduino / Programming Questions / Re: Catching server response in char array? on: September 19, 2013, 10:28:16 am
Look for examples of reading and buffering serial input - it's essentially the same problem.

This is the code where you current read a single byte:
Code:
  if (client.available()) {
    char c = client.read();
    Serial.print(c);
  }

You would need to change this so that instead of printing the character to the serial port, it appends it to a buffer:

Code:
buffer[length++] = c;

If you're holding the message as a null-terminated string (the sensible way for buffering text) then append a null terminator to the buffer to mark the end of the string:

Code:
buffer[length] = 0;

Make sure you don't overflow the bounds of the buffer, by checking the number of characters already stored against the size of the buffer before appending. In this size check, make sure to account for the extra byte needed to store the null terminator.

After you've received a complete message and dealt with it, clear the buffer by setting length back to zero.
4643  Using Arduino / Programming Questions / Re: Writing UUID to EEPROM of Arduino UNO on: September 19, 2013, 10:23:06 am
Once you have got your data in a single variable, you can use EEPROM_writeAnything() to write the variable to a specified location in EEPROM, and EEPROM_readAnything() to read it back again subsequently. It's just one call to save the data and another call to retrieve it - it really couldn't get any simpler.

http://playground.arduino.cc/Code/EEPROMWriteAnything
4644  Using Arduino / Project Guidance / Re: Display throttle position on LCD with Arduino on: September 19, 2013, 10:17:51 am
Yes, that seems feasible. Reading an input voltage in the 0-5V range is trivial, and there are plenty of examples of displaying values on an LCD.

However, this seems like a relatively crude way to approach the problem. It would be far better to log the TPS and lambda during a run and then use interpolation to adjust the map for all the samples, not relying on the samples being close to close to the corner of a map cell. The main need I can see for live feedback is to inform the rider which cells of the map have been adequately sampled, since in my experience typical use tends to oversample a small proportion of cells and can leave others with no data, making it impossible to tune those parts of the map..
4645  Using Arduino / Project Guidance / Re: Building a horse feeding machine on: September 19, 2013, 10:05:17 am
You can get Arduinos such as Ardulog with SD card support built in, or you can get shields such as an Ethernet shield for the standard UNO and similar Arduinos which includes an SD card.

The sensible options for input and output would depend what things need to be input and output. So far it's not obvious that the installed device needs any user interface at all.
4646  Using Arduino / Project Guidance / Re: Arduino control for a hi fi amplifier on: September 19, 2013, 09:59:16 am
I don't see any schematic.

What sort of device will you use for the user to input volume changes, and output does the Arduino need to provide to the amp to set the volume?
4647  Using Arduino / Programming Questions / Re: Can we parse into a XML file with Arduino on: September 19, 2013, 09:26:28 am
I'm not sure which EEPROM you're using, but the integral EEPROM storage is relatively small. If you're storing 256 bytes per minute over five minutes, is it actually going to fit in the EEPROM?

Is it really necessary to use EEPROM storage to buffer it? You don't seem to be buffering a huge amount of data and it seems like the sort of data that could be represented in a sufficiently compact format to hold it all in RAM.

4648  Using Arduino / Project Guidance / Re: DIY electric hookah on: September 19, 2013, 06:53:06 am
I've never used a hookah but I would have guessed that the coals are literally burning i.e. red hot. A normal soldering gun won't get anywhere near hot enough for that. Electric fire heating elements and toasters etc do, so perhaps you would be better off getting a suitable length of the resistive wire used for those, make up a former to stop the coils from shorting out, and calculate/measure the voltage and current needed to power it. Since this would have much less thermal mass than a soldering iron top, it would heat up much quicker (fractions of a second rather than seconds).

Once it's working you might want to think about whether you just want an on/off control, or an analog control that gets hotter the more air flow there is.
4649  Using Arduino / Project Guidance / Re: Transmit Serial Data Via 5vDC between Arduinos on: September 19, 2013, 06:48:00 am
The one-wire interface can carry power and a signal over a single digital line (plus ground) but only provides minute amounts of power - nothing like enough to power an Arduino. The only way I can think of to power an Arduino using that approach would be to have the sender output a DC voltage which was modulated between two levels - use a voltage regulator at the receiver to produce a consistent supply voltage to power it, and a voltage divider to bring the 'raw' voltage down to a level that the receiving Arduino's ADC can read. Then perform thresholding to detect the level transitions and decode the signal. It's going to involve quite a bit of fiddly electronics and coding to get rid of that third wire.
4650  Using Arduino / Project Guidance / Re: what Sensor for a laser line on: September 19, 2013, 06:42:08 am
Something like this was the original idea, but there was no way to distinguish what bike crossed the line, if more than one was crossing at close to the same time, all bikes would get the signal and stop timer right....

You haven't mentioned that requirement until now. That makes the problem massively harder and I can't think of any feasible way to achieve that.
Pages: 1 ... 308 309 [310] 311 312 ... 844