Show Posts
Pages: 1 ... 23 24 [25] 26 27 ... 107
361  Using Arduino / Project Guidance / Re: Pulsing a pwm output for motor control. on: May 25, 2014, 11:09:25 pm
I want to control a geared DC motor for a wire feeder.
I want to use PWM to control the speed and I need to be able to significantly adjust the pwm frequency.
With PWM, you usually adjust the pulse width and keep the frequency the same. The Arduino gives a range of widths from 0 (Off) to 255 (Fully on). Is that 'significant' enough for you?
Quote
I thought it would be relatively simple to do, but when I realised the delay command messes all other timings, it got complicated.
Embrace the concept used in 'Blink Without Delay.'
Quote
I would be open to using a large stepper instead of the geared 24v motor, but i dont know how easy it would be to fit into machine (might be easy, i suppose).
That would be for you to determine, as we can't see your machine.
362  Using Arduino / Project Guidance / Re: Pulling lots of wire vs remote monitoring via wifi on: May 25, 2014, 10:55:29 pm
And make sure to pull another string through in parallel with the new cable so that, when you are finished there is a string that can be used to pull a future cable through without all the fiddling.

Obvious thing to do, but sometimes forgotten.
Yes it is obvious and yes I did forget it.  smiley-red
363  Using Arduino / Project Guidance / Re: Small RTU device on: May 25, 2014, 10:46:51 pm
Oh,  and what does RTU mean?
My crystal ball tells me that it's probably a 'Radio Telemetry Unit' but, as he appears to want to keep it a secret, we'll probably never know for certain.
364  Using Arduino / Project Guidance / Re: Model Rail Speed on: May 25, 2014, 10:22:19 pm
Most of your answers were already pre-emptied in  my request for help.
You obviously do not understand prototypical nor model rail and in these instances it would be better if you left the subject alone.
You might, then, be surprised to learn that Robin 2 has built radio controlled, battery locomotives in 'N' gauge. With your attitude, I'd be surprised if anyone else bothered to answer you.
365  Topics / Product Design / Designing shields on: May 25, 2014, 10:34:35 am
Many times I see the sort of question: "How do I get shield X to work with shield Y when they both use pin Z?"
Surely it's not beyond the wit of shield designers to give the user a choice of pins (using, for example, configurable jumpers) to avoid conflicts. Shield designers seem to be of the Henry Ford variety..."You can have any pin arrangement you want, as long as it's the one I choose!"
I realise that there may be space constraints and that some shields require PWM and/or analogue pins that cannot be changed, but purely digital inputs/outputs could use almost any of the other pins. If there were simply pads that the user could solder jumpers to, it would not increase the cost of the shield.
The inclusion of the possibility to easily reconfigure the input/output pins would increase the versatility of the shield and, therefore, increase it's sales potential.
What brought this to mind is that I'm designing a shield that uses 6 purely digital inputs/outputs and currently I'm using pins A0 to A5 (probably the least conflicted pins). But what if the user needs his analogue pins for something else?

366  Using Arduino / Programming Questions / Re: Using Timers instead of delays on: May 25, 2014, 12:30:13 am
Try this:
Code:
unsigned long startTime = millis();
unsigned long myDelay = 1000; // 1 second. Change to whatever delay you want
int state = 1;
      if(buttonPushCounter ==0 && currentgear == '2' && previousgear == '1' ) {
      while(state < 5){
         switch (state){
           case 1:
              if (millis()-startTime >=myDelay){  //has time elapsed?
                      Serial1.write("\x10\x40\x87") ; //yes
                      startTime = millis();  //reset startTime for next output
                      state++; //go to next state
             }
             break;
           case 2:
              if (millis()-startTime >=myDelay){
                      Serial1.write("\x10\x40\x88") ;
                      startTime = millis();
                      state++;
              }
              break;
           case 3:
              if (millis()-startTime >=myDelay){
                      Serial1.write("\x10\x40\x89") ;
                      startTime = millis();
                      state++;
              }
              break;
           case 4:
              if (millis()-startTime >=myDelay){
                      Serial1.write("\x10\x40\x32") ;
                      startTime = millis();
                      state++;
              }
              break;
          default:  //you should never get here
            state = 1;  //reset to start, just in case!
            break;
         }
    }
}
367  Using Arduino / Project Guidance / Re: Pulling lots of wire vs remote monitoring via wifi on: May 24, 2014, 10:28:45 pm
You haven't told us how many "many sensors" is. 10, 100, 1000, 1,000,000? A guestimate would help.
You haven't told us what these sensors are and how often they need to be read. A temperature sensor probably only needs to be read once a minute, whereas an accelerometer, to measure pitch and yaw, would have to be read almost continuously.

To echo PeterH's reply, an Ethernet cable would probably do what you need and also have the capability for 2 way communications - you could send data/instructions back to your Arduino.
Ethernet cable is about 4 - 5mm ( ~1/5") in diameter and remember, it's much easier to pull it down your conduit than to pull it up. You've got gravity to help you that way. smiley  Pull slowly so as not to damage the other cables (through friction) already in the conduit.
If the conduit is plastic, and not metal, tie a small iron object (like a very small bolt) to a cotton thread and drop it down your conduit. If it gets stuck you can 'jiggle' it with a magnet to free it or even draw it along a horizontal length of conduit. When your thread appears at the bottom, tie some thin string to the top and pull that through.  Now you can attach your cable to the string at the top and pull it through. With metal trunking, tie a small piece of cotton wool to your thread and, if you've got a compressor, blow it through. Either way, it's a job that requires two people and much patience!
368  Using Arduino / Project Guidance / Re: Switching / monitoring multiple mains outlets & environmental. on: May 24, 2014, 08:51:13 pm
Hi there Lee.
I presume, for your project, you want a mains supply with as few drop-outs and spikes as possible. I'm no expert on power supplies, but wouldn't using relays give you more spikes and dropouts? Have you thought about using triacs, instead of relays, for switching the mains current?
369  Community / Bar Sport / Re: What Faggot means in the UK on: May 23, 2014, 11:05:41 pm
Ahh yes, wagon wheels, used to be twice as big as they are now.
The manufacturers claim they are exactly the same size as they have always been. It's us that have got bigger ( through eating too many of them?), not the wagon wheels that have got smaller.
370  Using Arduino / General Electronics / Re: For slow digital circuits, do I need ground between each wire? on: May 23, 2014, 10:43:25 pm
What about the 80 core ribbon cable used on 40 pin IDE hard drives?

Yes, they have 50% ground wires.

Your point is...?
They have inter-core grounds, which jackrae denied.
371  Using Arduino / Programming Questions / Re: Motor not running on: May 23, 2014, 09:57:26 pm
Code:
if(secs<10){
      lcd.setCursor(12,0);
      lcd.print(secs);
      lcd.setCursor(11,0);
      lcd.print(0);
    }
    else{
      lcd.setCursor(11,0);
      lcd.print(secs);
    }
Much simpler:
Code:
  lcd.setCursor(11,0);
  int tens =secs/10;
  lcd.print(tens);  //print tens or a zero if none
  lcd.setCursor(12,0);
  lcd.print(secs %10);  //print units
372  Using Arduino / Programming Questions / Re: I need help with sequence with millis() on: May 23, 2014, 09:15:39 pm
Lets see if I understand this right.
If I would use just one sequence I could just determine the on/off points in time and reset the time(start calculating from last note played for the next note.
Now with multiple sequences I would set the statemachine up for each note I use in sequences. Then I calculate the the times when given note comes up for play.
You'll need a different set of time variables for each sequence, if you want to play them concurrently. PrevTime1, prevTime2, currTime1, currTime2, interval1, interval2, etc.
373  Using Arduino / Programming Questions / Re: Using Timers instead of delays on: May 23, 2014, 08:56:51 pm
1) Write the first one.
2) Look at the clock
3) Is it time to write the next one?
4) If no, go and do something else and return to 2
5) If yes, write the next one
6) loop back to 2
374  Using Arduino / Project Guidance / Re: Reading and comparing dates in Arduino Mega 2560 on: May 23, 2014, 08:36:42 pm
Another doubt... What should I do if we be in a bissextile year ? I'll have one day more in minutes...
I don't know what you mean by a bissextile year. If you mean a leap year (one that occurs every 4 years) then just do:
if year modulo 4 = 0  then add an extra day (24 * 60 Minutes) after February 28th. That will work until February 2100!
375  Using Arduino / Project Guidance / Re: Arduino Micro "CAN CODE MAKE YOUR MICRO HOT" on: May 23, 2014, 07:21:33 pm
Why do you have two Serial.begin(9600); in setup()?
Pages: 1 ... 23 24 [25] 26 27 ... 107