Show Posts
Pages: [1] 2 3 ... 88
1  Community / Exhibition / Gallery / Re: It Woiks! on: Today at 12:26:41 pm
Looking at your previous posts, it has been an exciting journey for you - and the finished project is noce. There is no such thing as "simple" - your project may be too advanced for others on this forum. If you as an indvidual feel proud of it, then it is indeed a good project.

Even so, I sincerley think it is a good project. You completed it, nice looking box an all. Now, the litmus test: Is it being used when you play a board game that requires a die or pair of dice smiley ?
2  Using Arduino / Project Guidance / Re: Stepper motors and delay command on: September 14, 2014, 03:04:00 pm
probably fails, you should write
- the "L" makes sure the compiler does not reduce it to an int. (You may want to add a comment // 7minutes wait - for clarity)

I do not understand "because the power go off while using delay ()".

Are you asking for what to do if the power dies "unexpectedly"? Then look at EEPROM to write your Step value into the first 4 memory bytes, and retrieve this value on power up.

Or is something in your driver electronics shutting power down after inactivity? In that case there is little you can do in the program
3  Using Arduino / Programming Questions / Re: The Software Servo Library issues with example code provided on: September 13, 2014, 01:51:07 pm
OK, the flaw escapes me, too.

When you say "refuses to accept any more input", are you saying that your debug version shows that you never enter the case'0'..'9' ? Or that the servos never move? If you enter ABA do you get ABA return?

I am not familiar with the SoftwareServo library, so I am assuming it behaves the same way as the hardware servo library. Have you tried the "normal" servo library?
4  Using Arduino / Project Guidance / Re: Thoughts on how to set this clock I made (single LED clock) on: September 11, 2014, 04:14:30 pm
I made a a onehand clock out of an amperemeter .... and had the same issue.

 Input a a single button. a short press just activates the display mode and the long push activates the time setting mode.

You push on the button until the hours match, then make a pause, then push the button until the minutes match. (actually done in 4 stages, one for each digit) When you do not push the button the system reverts to time display.
5  Using Arduino / Project Guidance / Re: Driving Motors with RPM control. on: September 11, 2014, 03:51:10 pm
Why have you pinMode()s for pins 9 and 10 and digitalWrite()s for pins 8 and 9 - especially as none of them is doing anything.
Probably the brake/enable pins of the board. Still, code should use the same pins smiley

presume stepper.step(10000) causes the motor to move 10000 steps or 50 revolutions.

Does stepper.step() block until all the moves are done?
Yes it moves 10000 steps. IF the step value given in the initialisation is correct, then that is 50 revolutions.

step() is a blocking function.

Ace67aod: When you say you change the speed, are you trying to make it go faster? Because I do not think it will do. The step speed is set to 300 - that is RPM - ( => 5 rps * 200 steps => 1 Khz step rate ) so it is done in 10 seconds, and is possible for a good stepper (&driver). Dead start/stop without acceleration is limiting it, too. Try only 200 steps at 6 rpm - ie 10 seconds to do one revolution. Does it do that exactly?

I wonder how you change the speed. Read the pot value, map it, call setspeed()?.  If all you want is "rpm" and not positional control, then use a DC motor (with or without gearing) and control it with a single PWM outputpin and analogWrite.
6  Using Arduino / Project Guidance / Re: Driving Motors with RPM control. on: September 10, 2014, 05:36:04 pm
this seems like a position control type of POT
I can NOT think of a potentiometer (assuming this what is meant when you write POT) that is NOT a position device - ie position of knob is a resistance value which usually is set up so it provides a voltage proportional to the position. What you do with the volatge is another thing - regulate a light intensity, speed of a motor, position of a stepper or servo, volume of the music, pitch ofa note ...

however the movement is choppy
could have two causes. The first is a pot is usually "noisy", ie the when you move it a little bit the resistance goes to high, to low, just right to low ... if you are controlling -f.ex - a light or music volume this is usually not evident. Depending on how you write the program it will show up as a jerky motor movement. A bit more software (running average) will fix that. The other possible cause is that your program or wiring is wrong, ie it just happens to work almost. (No shame there, we all learn better from our mistakes smiley ) Like a fortuitous resonance between a PWM signal width and a hobby servo .. or whatever - I am guessing/fantisizing here.

The suggestions is that you write a very simple sketch. One that just turns the motor. Then edit it to make the motor turn at a different rate. Another very simple sketch (I think it is in the examples) that echoes the pot position to Serial.print. And then you "simply" combine the two - the value from the pot is used to set the motor speed.

Feel free to post the code of any of your steps for comments (and do click the [#]-button whilst the code i s selected in the edit window - so it is put in a nice box, in proper font and format) . The same goes for the wiring - a photo of handdrawn wiring diagram is OK if you do not use Fritzing or eagle or whatever.
7  Using Arduino / Project Guidance / Re: Automatic Watering project on: September 09, 2014, 06:28:49 pm
Last post: September 08, 2014, 12:22:01 pm "Bump": Today at 02:30:50 pm
My appologies - I missed the date change.
8  Using Arduino / Project Guidance / Re: How to Rotate a Stepper Motor to Pre-Specified Degree + Delay on: September 09, 2014, 03:59:18 pm
And if someone could server my dinner, that would be great too.

Mind you, there is another section where you can ask for "professional help" - meaning you pay for it.

I have looked up the code
Well, what have you looked up? Show that and which bits do not suit you, then we can give a clue where to start modifying it to become your own code.
9  Using Arduino / Project Guidance / Re: Driving Motors with RPM control. on: September 09, 2014, 03:13:01 pm

Have you looked at the included examples in the Arduino IDE?

You do not control a stepper with the PWM signals. Any set of 2 or 4 pins will do. (depending on your stepper driver chip/Mosfet/Hbridge)

10  Using Arduino / Project Guidance / Re: Automatic Watering project on: September 09, 2014, 03:09:23 pm
Two hours -- and you're impatient. Wait at least a day before "bump"ing your thread.

PualS' comment is that you defined a prototype, where you probably intended to define a function. In the Arduino IDE, it automatically generates prototypes, so you dont need to. This is so you do not have to worry about the order of defining your functions.

It may well be the sensor reads lower values for more moisture, as longs as it notices the difference. You're not doing an absolute measurment. You just test for high value, rather than a low.

11  Using Arduino / Project Guidance / Re: Need small diodes - 0603 on: September 08, 2014, 01:41:11 pm
Tch tch ... and a moderator as well. Wouldnt this fit better in General Electronics section?  smiley-mr-green
12  International / Scandinavia / Re: Försöker bestämma mig vad jag skall använda, uppskattar verkligen hjälp on: September 02, 2014, 03:37:19 pm

Fint projekt. Det kan lösas med en vanlig Arduino, men en Mega är också fint. (Om jag nu har forståt dig). 8x8 pixlar är 24 bytes i RGBfärg256niveau. 1920x1080 är 6Mbyte. Jag antager at det bild är i et enkelt pixleformat - udpakning från JPG eller liknande vet jag intet om - men det tager en del udräkning. BMP er perfekt - 1:1 af bytes och pixlar (eller 3:1 för 24bits). Är det färg eller svart/gråt/vitt(monochrome) eller bara svart och vitt?

Från SD kortet læser du ind dit första 8x8 bild-bit (eller du skanner en 1920x1080 och letar frem dom pixlarene). Du tænder lamporna, signal til kamera  om at öppna shutter kortvarigt. (om kameraen inte vil eksponere två gånger på samme bild, hold den öppen og använd noget fremfor linsen at öppna/stänga)  Stepper mottorene snurrar til den nya position.

"Rinse and repeat" som det står på shampoo-flaska. Du gör en slinga hvor koordinaterne gås igennom.

Det tager bare et par hundrede rader Arduino kod. SD bilbliotekt vil nog fylla en del.

64 lampor kontrlleras ganska lätt med passende shiftregister som TLC5940 (4 styks). Om lampan är for stor (ström) sätt bare en transistor/mosfet imellan. Signalet er digitalt så man behöver inte tänka på analog-eletronik.

Steppermotorene driver noget mekanik, och en X/Y ram är enklast, men det kan också göras som robotarm.

Om jeg tänker på et litet 8x8 som det här så skal du flytta 2cmx1920/8=nästan 5 meter.

Som altid frågar jag aldrig VARFÖR ;-) även om jag är nyfiken. Låter som et kul projekt.
13  Using Arduino / Project Guidance / Re: G Code on Arduino? on: August 28, 2014, 02:48:37 pm
Sure. Use the Progmem feature. This allows you to store an array in the 32K Flash/Programstore. Only hassle is that you need to write it as part of your program as one long
prog_uchar Motion[] PROGMEM  = {"G1 X10 Y10;G1 Z10 E10;G1 X5 Y5 Z5 E5; ....
(here I've used the ";" as the newlinecharacter.

You can split your program into several files, so one file only holds this progmem defenition.

At this time it may occur to you that you are using 10 bytes to store two ints. So I would throw away all the Gcode interpretation and just store the XYZE values in a list of ints. Yes, the Gcode allows for floats, but you can just scale it up by (say) 10 and then only store it in inst which are tenths of millimitere. (int limits you to +/- 32000). Or you can define your own "language" and really compress/save bytes.

Then you can go sophisticated and transfer from serial port to EEprom (which though only holds 1K) so you do not need to reprogarm. Or go the whole hog and implement you falshprogramming - but that is far beyond my skills, too
14  Using Arduino / Motors, Mechanics, and Power / Re: VarSpeedServo - a modified Servo library with speed control on: August 28, 2014, 02:34:33 pm
kinda solved it, when i figured only writeMicroseconds can override the middle position after attach,
slowmove cant and write probably cant too...
so i can store the position of the servos after each move to eeprom and write it back in void setup before attaching the servos.
That would have been my suggestion, too. Note that the eeprom is not infinitly rewritable ("The EEPROM has an endurance of at least 100,000 write/erase cycles" in the spec), so add in a some "filtering" so you only store when there has been a great enough move from previous stored value if you do this many times a second. (one million seconds is 11+ days)
15  International / Scandinavia / Re: Vibrationsmatare med ljusbarriär. on: August 28, 2014, 02:16:28 pm
Ska jag sätta "delay" någon annan stans?

Nej och nej nej nej - låt bli att använda delay.


Din program logik skal vara at den nolställer en Timer varhe gång den bryts og stänger mataren när timeren er 4000 större en millis.

Nämde jag att du inte skal använda delay() ?
Pages: [1] 2 3 ... 88