Show Posts
Pages: [1] 2 3 4
1  Using Arduino / Programming Questions / Re: Simultaneous Tasks on: February 03, 2014, 12:26:05 pm
You can -  not by putting everything inside an ISR - but by using a state variable and multiple short loops this works like a charm. It is all in the design of the program. In complex situations this is not an ideal solution, as that basically comes down to writing a simple kernel, but if the number of tasks is low and the tasks are simple it works.
2  Using Arduino / Programming Questions / Re: Simultaneous Tasks on: February 03, 2014, 11:38:32 am
Also, you can use timers and interrupts. Interrupts will stop the current running task when triggered and switch to another task, and when that is finished back to the original task. Interrupts can be triggered by a state ( change) of an input pin. Timers work in a similar way, but are triggered by a timer that hass expired. Making two things happen at exactly the same time in not possible, but if you switch fast enough, it will appear as if they happen simultaniously.

Pieter
3  Using Arduino / General Electronics / Re: Need 25kHz PWM signal for 4 pin PC fan on: January 29, 2014, 06:30:35 am
you can use an arduino, see http://forum.arduino.cc/index.php?topic=18742.0.

Sometimes you can get away with a lower pwm frequency, but this may shorten the life of the fan(controller), it also makes things a little noisy (fan may start to whine, or suddenly go flat out to max rpm at a low duty cycle).
It is recommended to put an optocoupler on the tacho line, and add some serious decoupling to remedy the electrical noise from the fan.

Also, make sure that when there is no control input, the device keeps the rpm a a safe minimum level (make it "fail-safe"), otherwise your CPU is going to be in thermal protection mode before your OS (and thus the control software) has finished loading.

Pieter
4  Using Arduino / General Electronics / Re: Am I a resistor? on: January 29, 2014, 06:00:46 am
Poking things with a screwdriver is a common debugging technique. And when you find the spot that makes it work solder the screwdriver in place.

______
Rob
If you hit a really good spot, the screwdriver will weld itself in place, no soldering required!
5  Using Arduino / General Electronics / Re: electrical diagram explanation on: December 15, 2013, 07:22:42 am
I think your decimal places are screwed: I of an led is 20mA, which is 0.02A not the 0.2 you seem to have used.

And: 6mA will make an LED light up. Even way less than that will make it light up. It will be dim, but it will light up. Try a 1 kOhm resistor, it will still work. Also, the resistance of a LED is best looked up in the datasheet. LED's dont work like a resistor, as their resitance is not very linear.
6  Using Arduino / General Electronics / Re: Concerning electronic ics on: December 09, 2013, 04:39:56 pm
What, as opposed to tubes?

My memory's not what it used to be but I think the early tamogotchis had hard disks in them.


I thought there was punchcards in them things...
7  Using Arduino / Sensors / Re: AnalogInput, Car Temprature sensor, Look up table interpolation major headache on: November 28, 2013, 05:41:40 am
What temperature does the sensor measure? Outside air, intake air, oil, coolant? Some cars use the current through the resistor as a measure of airflow and temperature, as a means of calculating the air mass going into the engine. In such a case, voltage vs. temperature is not really a linear relation. So reading the voltage may not be the way to go. Some signalconditioning may be required. Also, in your conversion to temperature, I think some array indexes are missing. That could cause some inacuracy.
8  Using Arduino / Sensors / Re: Which sensor to detect rodent movment behind sheetrock or wallboard? on: November 28, 2013, 05:25:35 am
Cat v1.0 works a treat. Other small predators  (ferrets / martens) also work fine, but may be a little more difficult to keep. If you want to sense rodents electronically, use a contact microphone on the outside of the wall. That way you won't have to drill any holes. Anything you put inside the wall must be rodent-proof, which is a real challenge in itself. From my own experience, rodent-proof means steel (or at least metal), glass or ceramics. Everything else is just a challenge for the rodents, and they usually win.
9  Using Arduino / Programming Questions / Re: Ph sensor atlas scientific and arduino Uno + LCD 16x2 on: November 21, 2013, 11:00:16 am
dear pbrouwer... what do you mean, "also, sensorstring is sent to the lcd on each iteration of loop, even if it isn't complete."
now i had display the value of the sensor... but the problem now is the value is display with other word that i not know... such as... " 4.21PEdsd"  the value 4.21 is correct, but the PEdsd is i not know...

A string is an array of characters ending with a null character,
In your program, the sensorstring is displayed, even if the received string is not yet complete, that is, no terminating null character. this means your program will print the string, plus whatever happens to be in the adjacent memory locations, until it encounters a null character. Once the string is complete, it will print nothing.
10  Using Arduino / General Electronics / Re: Arduino Uno Voltage Regulator Temperature on: November 20, 2013, 02:52:23 pm
Temperature depends a bit on the manufacturer, but most specify 0-125 degrees C, with 25-100 degrees C being the most stable range. I would not recommend getting these regulators that hot. You don't want to burn yourself. Under normal circumstances, they shouldn't get very warm though. If they do, you are either drawing too much current, or the input voltage is very high.
11  Using Arduino / General Electronics / Re: Using the Arduino Micro to power Raspberry Pi? on: November 20, 2013, 02:38:06 pm
I was going to say 15 seconds is too short a time for a Linux system to boot. It is however long enough for a Raspberry Pi running RISC OS.
It is still out of spec with regards to the current though.

The other thing you might notice is that the Arduino appears on one of two serial ports pretty much at random.

The OP using a micro, powered from an ESC. A micro can only safely deliver a few dozen miliamps through its regulator to other devices, so I asume the ESC can deliver a steady 5V to power both. If not, the magic smoke will tell pretty quickly that all is not as it should be.
12  Using Arduino / General Electronics / Re: iDevice charging voltage divider on: November 20, 2013, 02:21:12 pm
Could they be sensing resistance rather than voltage? Or use the resistor network to detect a voltage drop that is the result of overloading (a sort of power sense)? In those cases the values of the resistors matter, not the voltages they produce.
13  Using Arduino / Programming Questions / Re: 2 dimensional array readout problem on: November 20, 2013, 02:09:08 pm
To store stuff in the flash memory, use PROGMEM. Volatile does sort of the opposite. And, as Paul suggested, use the smallest possible type. Memory is limited on an arduino, and you can't even use all of it.
14  Using Arduino / Programming Questions / Re: Ph sensor atlas scientific and arduino Uno + LCD 16x2 on: November 20, 2013, 01:55:45 pm
Sensorstring is set to "" after it is sent to the serial port.
also, sensorstring is sent to the lcd on each iteration of loop, even if it isn't complete.
That could be a problem.
another problem could be that you give the pH sensor no time to respond, and then you wait for three seconds, which could be too much.
15  Using Arduino / Programming Questions / Re: Problem with Serial.read and bigger numbers on: November 20, 2013, 01:42:32 pm
Quote
Bugs create some excitement
Personally, I think you misspelled stress/unwanted attention/grief. Either that or you are one weird dude.
You can add frustration/despair/fear and quite a few other things to that, excitement comes in many disguises. I might have been a bit sarcastic here (and that could be the result of tracking down too many bugs).
Point I was trying to make is that it is really easy to make flawed code that seems to work fine, but then all of a sudden doesn't. It can create really weird behavior. And really: bugs should cause some commotion. If they don't, it means there's too many of them, or no-one cares about them being there.
Pages: [1] 2 3 4