Show Posts
Pages: [1] 2 3 ... 81
1  Using Arduino / Project Guidance / Re: Which Arduino should I buy for my design idea ? on: April 16, 2014, 07:22:53 am
The Arduino solution will have less components (simpler circuit - less things that go wrong) and you can easily change the "logic" by rewriting the program.

My personal favorite for the water level would be the same arrangement as in a toilet - an arm with a float - and a simple potentiometer. (as always . water and electroincs do not mix - you need to think twice & thrice about keeping the water away from wires) It might be a softish plastic rod and use a force/bend sensor rather than the rotary motion of a potetionemeter (No moving parts - more reliable)

The connection to the house alarm : is it just an external circuit switch you open/close (which the house system sees as "Water Problem!") or does the Arduino have to do complex communication (WiFI/BlueTooth...)? In the simple case an Uno should be ample.

Someone in the General Electronics forum may have an opinion how to run a signal for 15m - usually this is a current loop if sending an analog value, and any old twisted pair if sending a serial/digital information.
2  Using Arduino / Project Guidance / Re: 2 Stepper Motors with 300 to 600 rpm on: April 16, 2014, 06:34:23 am
I help everyone, newbie and experienced alike ... if I can help smiley

The speed of a stepper motor is not dependant on the voltage or current, but the speed of steps. The top speed is dependent on how much "oomph" you can put in each step, ie current which depends on the voltage. You have specified the shield, so you just need motors to match (you did not specify which motors) ie not requiring too much current. A stepper looses strength as the speed goes up. I've seen a note that a NEMA17 will peak at around 600rpm ith 12V (ie stepping faster will not make it go faster), but can cope with almost twice the speed at 24V.

600rpm requires you make a step pulse every 500us - easily done with the Arduino. Even for two.

If you are testing for vibration, remember a stepper generates a lot of mechanical noise. I presume your load test will involve a excentric weight (otherwise the "phase of rotation" makes no sense to me) so you may ned a fancy mounting to dampen the motor contribution.
3  Community / Website and Forum / Re: Dealing with spam on: April 15, 2014, 03:10:13 pm
No, Robin2 is thinking (I think - he can answer for himself smiley-wink ) of that the newbie has to write a one (or more) posts just saying "hello I have just started ...." type pleasantaries. Then (s)he can write a proper question with a proper subject.

Spammers enrol, and start sending adverts. As they do not choose the "magic subject line" for their post they would be automtically blocked. Until they adjust the robots to send the first magic post.

I think Jacks original idea is sound enough. If one leaves out my "enhacement" then basically any newbie and any spammer is just put in the queue. 1st-post-approvers just need to use 2 seconds to look at the post if it is Arduino relevant (they do NOT need to answer, just approve - it then is visible to all) or hit delete (which deletes the post and user).

(Now either I or Jack will follow the link at the bottom on EACH webpage to SimpleMachines documentation to see if it is exensible.)
4  Using Arduino / Project Guidance / Re: Turning on and off 12V fans using arduino on: April 15, 2014, 02:59:44 pm
If you want to be sure, post a simple question in "General Electronics" asking if that is a "logic MOSFET". I do not think so - the Gate Threshold is not the same as the voltage for fully on. They cite 10V gatevoltage for the fill on and besides, 0.15 Ohm for fully on is not mindboggling low, but sufficient for your purpose. Otherwise you can use "any" MOSFET, and a small signal pnp transistor to pull the gate voltage up to the 10+V.

The in series resistor kan be 1K or so  it is to avoid the current pulse when going from 0V to 5V damaging (stressing, quickened wear out) you Arduino output pin. The pulldown resistor (typically 10K to 56K is there to ensure that the gate is OFF when you apply power until the Arduino has set the pinMode to OUTPUT. If there is no problem if the fans start turning a little just at power up, you can leave it out. But it is almost to cheap to leave it out.

This circuit with these values can have all fans in parallel activated by one digital pin, or repeat the circuit for any number of pins to have them inidvidually connected. (Are you measuring temperature or something and the fans are there to compensate?)
5  Using Arduino / Project Guidance / Re: Speed LCD DISPLAY on: April 15, 2014, 02:43:34 pm
I will help you to learn smiley-wink

The first exercise is to verify that your programming enviroment is working. Start the IDE, read in the example Blink sketch, modify it so the LED blinks in a heart rythm - short on, short off, slightly longer on, long off.

The second is to verify that your sensor hookup is good. You probably need a resistor in series with the emitter, to limit the current. I do not know exactly what kind of sensor you have, but probably you put a resistor between sensor and 5V and the other sensor leg to ground. Check polarity. The joint beween the resistor and sensor goes to an analog input. Load the example AnalogInOutSerial and thus you can read the sensors reaction in various positions and cars blocking.

You may find that you can hook it to a digital input pin instead, it depends on the sensor and your choice of the resistor. In which case your loop simply copies the read value to the LED value.

Lastly - the actual problem. I outlined the general program in previous post. Here I just give the central piece - you need to fill in setup and some other stuff - pretty printout, choose pin, trigger values (if not using digitalRead) and you may need to change < to > depending if the values is high or low when the beam is clear. The TrackLength should be a float. You choice of units determines if the result is cm/s or km/hour
Code:
while ( analogRead(StartSensor) < TriggerValue )
   /* code waits here until 1st beam is interrupted */ ;
StartTime = millis() ;
while ( analogRead(EndSensor) < TriggerValue )
   /* code waits here until 2nd beam is interrupted*/ ;
EndTime = millis() ;
Serial.println(TrackLength/(EndTime-StartTime));
This is very simple code. You need to chage the Serial.print to use the LCD - but first get this bit to work, then get the LCD. This way if the LCD shows "wrong" you know it is not the measurement if that showed right. Build your devices in steps, and get each step working.
6  Using Arduino / Project Guidance / Re: Speed LCD DISPLAY on: April 15, 2014, 06:15:09 am
There is more than one "Arduino Starter Kit" out there, so which one do you have? Or rather, if you can not see or read from your content list if you have two lighsensors, then your problem is first to learn (google, wikipedia) what lightsensors you do have (or order two from any of the hobby/arduino shops)

Assuming that is not a problem, you're doing fine: Keep reading the lightsensor one until it is blocked, store the millis() value in a variable and start polling the 2nd sensor until it blocks, subtract the noted millis() value from the current and print the value ( distance/milisdiff to get it as a speed)
7  Using Arduino / Project Guidance / Re: Turning on and off 12V fans using arduino on: April 15, 2014, 06:10:52 am
You get a "Logic" MOSFET. These turn completely ON at 5V. Look at the spec sheet for Vgs(on) being 5V or less. here is a typical example: http://www.sparkfun.com/datasheets/Components/General/RFP30N06LE.pdf
8  Community / Website and Forum / Re: Dealing with spam on: April 14, 2014, 10:02:25 am
I like this suggestion for other reasons:
The first or first N posts, is the perfect time to tell the user if he/she has choosen a bad board for their question, and give guidance on why this is so and how to choose it next time. Also the [code] [/code] can be explained. Crossposting would also be caught, and likewise the URGENT NOOB .... well, frequent posters know what I mean.

Why would they listen more to advice with this than before? Because their post does not get published until they acknowledge !

The work of the auxiliary moderators would be a simple [reject-spam] or [boilerplate about xyz] where xyz is the above very common problems of 1st time posters. So it should be no more than a few cut-n-paste of the usual links (to the GammonStickies, subsections).

It is not meant as an absolute filter, just a little extension to the spam-filter function as Jack suggested to remove some of the obvious 1st post error.
9  Using Arduino / Programming Questions / Re: Stepper motor, LED, Light sensor on: April 14, 2014, 09:46:05 am
(I have asked a moderator to move this to Programming where it belongs. It is not about education is it?)

I see nothing obviously wrong with the program, which leaves the possibility that your wiring for the motor is wrong - and it takes so much current that the Arduino goes in a bad state. Do you power the motor through some transistor/mosfet/driverchip or directly of the Arduino pins?
10  Using Arduino / Programming Questions / Re: Example: SerialBlinkWithoutDelay on: April 14, 2014, 01:58:31 am
Code:
  while (Serial.available())
Won't this effectively act as blocking code, albeit for a very short time ?
"Any" code is blocking while it runs. So it depends on how much "parsing" you do with the serial characters. Just stuffing them into a different buffer is not much fun, as they already lie in a buffer and memory is short enough as it is. (You can turn any parsing algorithm into a step wise parsing with a little state engine, so you do not need to have - f.ex - all digits of a number in a buffer before turing it into an int. Besides, if you do poll this code often enough, which you have to keep the LED blinking regularly, there will never accumulate more than one or maybe two characters in the Serial buffer.

And a note to the original poster Brad Burleson: Thanks for posting it. Whether the minor "tweaks" are needed or not, it is still good example for the number of programmers-to-be that struggle with the concept of writing non-blocking code, or have difficulty to come beyond the supplied example BlinkWithOutDelay sketch. Lets hope that enough persons find it with search.
11  Using Arduino / Project Guidance / Re: Merging i2c-sensor code with SPI SD-card code on: April 13, 2014, 04:03:43 pm
So you have linked to two demo programs - one copies the accelorometer readings to Serial, the other copies 3 analog pin readings to an SD file. What do you want to do ? Copy the accelorometer reading to the SD card?

The "Overview" of what you have to do: Put the the two programs in one file. Take alle the setup() bits and put them in one setup() call. Likewise the loop bits. When this compiles you will need to change the Serial.print() of the accelorometer bit to datafile.print() and remove the analogRead bits.

Hope this gives you enough of a help to finish the details yourself.

(ByTheWay - when you write a post you can can click on AdvancedOptions below the text entry field, and upload large program sketch source code - this way you do not need to make links)
12  International / Scandinavia / Re: Klocka på Arduino Mega2560 on: April 13, 2014, 12:17:13 pm
Det er lättare at sätta en liten RTC med batteri til än dom andra möjlighederna och få bra tid.

Alle Arduinoer är afhängiga af krystallen eller resonatoren som är kobblat til ATmel chippen om man skal själv hålla tiden.

Bara NTP metoden befriar dig från at en gång imellem at justere klockan, sommartid och den slags.
13  Community / Exhibition / Gallery / Re: MasterMind - RotaryDial on: April 13, 2014, 12:08:44 pm
Found a bug and some needed improvements
1: Choosing game 5 and 7 now correctly has correct digit range
2: Show all green LEDs after win for 5 seconds,
3: Start a new game of same type after 10 seconds after win
4: removed the timeout if users pause for too long
14  Community / Bar Sport / Re: Your latest purchase on: April 13, 2014, 10:57:24 am
Now I need a USB A to micro-B cable or a micro-B adapter to fit, only have USB mini's.
Ah, yes, have similar problem. I have a box full of redundant USB A to B cables, a large handfull of USB-A to mini, but only have two USB-A to micro-USB - and got in a real panic yesterday as one of those two seemed to have been lost.

I have sort of been waiting for the last USB-A to USB-micro cables to do the same "spontaneous multiplication" the other cables have done, but this has not occured for a year now. So.... Ebay? Amazon? DealExtreme? ... (No you do NOT have to post the links, I can Google, I am just to mean to spend the money smiley )
15  Using Arduino / Programming Questions / Re: I have an if - else loop, but I cannot make the motor stop spinning on: April 11, 2014, 02:03:30 am
(Postscriptum note: Lar3ry mentioned the "Turn of LED twice" frst, in the commented version of the original code. Answers sometimes get submitted independently.

It is well worth reading the commented code as there are other seriouse flaws in the code, when it gets expanded.

BTW: The millis()==4000 will occur once ever 49.7 days smiley  )
Pages: [1] 2 3 ... 81