Show Posts
Pages: 1 ... 3 4 [5] 6 7 ... 91
61  Using Arduino / Motors, Mechanics, and Power / Re: How to control actuator speed and direction using potentiometer on: March 31, 2014, 03:32:16 am
Hi.

Last December you already asked about this and got some correct answers.
Why don't you pick up that thread and go on over there ?
Did you actually do anything with the information over there ?
You should have been able to control those actuators by now, three full months should be enough to know how to read a potentiometer and to find out how to use that information to your actuator(s).
Hardest thing is to provide enough current.
62  General Category / General Discussion / Re: how to get karrma on: March 30, 2014, 06:13:00 pm
There are no ranks over here.
There are members, moderators that keep order on the forum and administrators that are to be seen as the technical staff.

Karma is awarded by other members, most of the time because you did or said something that an other member liked.
They can give you karma by clicking the green + sign next to your name.
So if you like to have some more karma, you have to earn it.
You cannot demand karma so if you are being a good member that posts helpful messages but no one cares to give you karma for that, so be it.
It is nice to be recognised for your work, but if there is no karma awarded to someone that doens't mean their contributions are less worth or anything.
If someone has tons of karma, that might suggest they are giving a lot of useful answers, but it doesn't mean their answer is alway absolutely better than someone else's answer.

The colored stars and "member type" are related to number of posts.
It doesn't matter what quality those posts are, the post count sets this automatically.

63  International / Nederlands / Re: hulp gevraagd voor arduino regelunit voor distilleer apparaat on: March 30, 2014, 05:58:14 pm
Hoi.

Je hebt een klok sketch opgezocht en die code heb je aangepast zodat er afgeteld word.
Daarmee maak je het jezelf wel moeilijk.
Want die code bevat delen die niet zo heel eenvoudig zijn.
Dit stukje is de essentie van je klok:
Code:
   Sec = -(millis()/milliDivSecs)%60; // divide by 1000 and mod by 60 gives seconds from milliseconds

Je hebt daarbij de - toegevoegd ten opzichte van de originele code.
Maar die originele code wil alleen maar de de secondes herleiden ten opzichte van de systeemklok (oftewel het aantal hartslagen van de Arduino), terwijl jij er iets anders mee wil.

Je hebt de variabele Sec wel goed gedefinieerd, en ook een waarde gegeven, maar die waarde gaat er meteen aan als je zegt:
Code:
Sec =
.
Omdat je dat niet kunt zien, zal ik vertellen wat daar staat:
Er staat Sec-spatie-is-spatie.
Je wijst een nieuwe waarde toe aan Sec, en op dat moment is de oude waarde uit Sec al verdwenen.
Je zegt dus niet dat je een bewerking doet op de waarde uit Sec, maar je wijst gewoon zonder meer iets nieuws toe.
Ik heb je code (omdat het niet erg veel was) even aangepast aan mijn hardware en er toen een beetje mee zitten spelen om vast te stellen of wat ik hierboven schreef ook wel echt waar is.
Daarbij heb ik net voor loop() een delay ingevoegd.
Als ik de delay 2 seconden maak, begint het aftellen bij 14 seconden en elke 1000 milliseconden meer geeft een lagere beginwaarde.
Het probleem is de systeemklok.
Je hebt weinig (lees: geen) controle over die systeemklok, het ding begint op een bepaald moment en dat moment bepaalt dan ook hoe je uitkomt met deze aanpak.

Maar het belangrijkste is natuurlijk hoe kun je dit nu oplossen ?
Je hoeft alleen maar te weten wanneer er een seconde is verstreken.
Je hoeft helemaal niet te weten hoe laat het in Arduinoland is.
Dus dat hele gedoe met het vaststellen van de tijd door de klok uit te lezen en dan te vertalen naar een secondeteller is te ingewikkeld.
Als je kijkt of het verschil tussen previousMillis en currentMillis groter is dan 999, dan is er dus een seconde verstreken.
In dat geval kun je dus 1 van de secondes aftrekken en vervolgens het scherm vernieuwen en previousMillis updaten.
Ik denk dat je dit stukje zelf kunt omzetten in code, het is echt niets anders dan wat 'blink without delay' doet.
64  Using Arduino / General Electronics / Re: LED And PhotoResistor on: March 30, 2014, 04:55:44 am
Well, that looks like:

5 volts - 10K - LED - PhotoResistor - GND.
There's no wires visible apart from the power supply (with odd colors by the way).
So i guess you want to have this work without controlling it with your Arduino ?
That is not going to work, at least because the 10K is much too large in this case.
Your 560R resistor would be better and that might be what you had before (i don't know).

You are experimenting with several LEDs (there was a red LED before, and i see an IR LED).
You got that you need to limit current if you are powering a LED from 5 volts , "serving as what you believe is a step down to ground".
That remark makes some more sense to me now.
It is not exactly what that resistor is for.
That resistor limits current to your LED.
In that case 560 Ohms isn't a bit low as i stated before, but it's twice what is recommended for this (most used in the examples over here is 220 or 270 Ohms), but you can use that 560R without a problem, you'll just have a somewhat dim LED.
The 10.000 Ohms resistor limits the current so much that there will be barely any light emitting from the LED.
And the photo resistor will be of very little influence anymore.

Hoe do you want to wire this all up to your Arduino and have it control the LED brightness:
First you need to do is to build the voltage divider.
You can have a go with that using your 10K resistor and the photo resistor, wire them like:
5 volts - 10K - photoR - GND, and connect the junction of the two resistors to the Arduino input pin.
Also connect Arduino output pin - 560R - LED Anode - LED Cathode - GND.

Now you can read the voltage, which will be lower at more light, at your Arduino input pin.
And you can control the LED at your Arduino output pin accordingly.
Use one of the output pins that has a ~ mark next to it, it means that pin is PWM capable.
65  Using Arduino / General Electronics / Re: LED And PhotoResistor on: March 29, 2014, 05:22:17 pm
So we seem to live in the same timezone.

To get how this works, some explanation is in order.
You can't measure resistance with an Arduino.
But you can measure a voltage up to the voltage that is powering your Arduino (typically 5 volts).
If you would connect a resistor of some kind to either 5 volts or GND, and the other side to the input pin then you would always see the level you connected to.
If you connect 2 resistors and the input pin to the point where both resistors are joining, you create a voltage divider.
In case one of them is a variable (photo) resistor, and the other one fixed then you can measure the entity that is causing the variation in that resistor.
The division of the 5 volts over the resistors is the same as their ratio.
Now if the fixed resistor is tied to GND and the photo resistor is tied to 5 volts, more light would lead to a lower resistance and the input level gets a bit more towards the 5 volts.
If the photoresistor is tied to GND and the other one to 5 volts, more light leads to the input getting closer to GND.

The photo shows a toggle switch, your 560 Ohm resistor (seems a bit of a low value to me) and the photoresistor.
It's unclear to me what the switch is for, and how the resistors are connected.
And it's also unclear how the Arduino is connected to all this.
Could you tell a bit more about that ?
66  Using Arduino / General Electronics / Re: LED And PhotoResistor on: March 29, 2014, 04:35:22 pm
Magician is probably right, based on how you would use a resistor and a photoresistor for input.
And that is easier than reprogramming and so also easier than i could think of.
But i can't say i got that that is how you have wired it up from your description, and the huge photo doesn't help here either.

My "you can't" is the answer to you asking how to make the photoresistor have the resistance increase with more light.
67  Using Arduino / General Electronics / Re: LED And PhotoResistor on: March 29, 2014, 03:57:09 pm
Hi Markrose, and welcome.

You can't.
You have to accept that the hardware is as-is (that's why it is hardware).
So if you want the behavior to change, you should do that by programming in the correct way.
I hope you are using AnalogInput from the examples in IDE (which does something similar to what you described, but not the same), because that means you are going through the examples to get started.

If you want to work this out the easiest way i can think of, look up map in reference on this site.
68  International / Nederlands / Re: stuurbediening on: March 29, 2014, 03:29:38 pm
Hoi Nald.

Je hebt gelijk, als je kan moet je altijd het gebruik van delay() proberen te voorkomen.

Maar jouw probleem is vermoedelijk al een tijdje opgelost.
Want dit zijn infrarood afstandbediening signalen.
En daar zijn meerdere oplossingen voor te vinden.
Let er op dat deze link naar een oplossing leidt die in 2009 is gemaakt, en daarmee voor IDE 1.0.
Dat betekent dat als deze niet is bijgewerkt, die mogelijk niet meer goed zal werken (compile errors gaat geven).
Ik zal nog ff kijken of ik iets recenters kan vinden.
69  Using Arduino / Displays / Re: My LCD display has become dimmer. on: March 29, 2014, 12:43:15 pm
You can't place an image here, other that what you did (attaching it).
If you want to put the image in a post, instead of attaching it under the post, you need to have a place to upload the image to, like imageshack or photobucket.
Then, after uploading the image, you can point to that in your post, where it will appear.
But please use another picture that is sharp and actually shows what you can see on your screen.

I have the same shield, and i'm also one of the 76 reviewers of it.
This shield has this issue (click !) for sure.
You might have done some damage to your Arduino pin 10 that tries to control the brightness of the backlight.
You may want to check the status of pin 10, to ensure that is set to send 5 volts and not some PWM value (you would also need to set it as an output).
If you do send a PWM value to it, make it a value of 255 (full strength), after reading the link i posted a moment ago.
The picture does seem to show a dim LED, mine is quite bright.
70  Using Arduino / Displays / Re: Using I2C 16x2 LCD with Arduino on: March 29, 2014, 04:25:21 am
That link to your product shows another link to a datasheet.
It tells you quite well how to use it.
That includes connection details and how to initialize it.
I have no idea if that is the same as what other modules expect or not.
So i can't tell whether you need to find or even build yourself some specific library to this display.
71  Using Arduino / Motors, Mechanics, and Power / Re: MULTIPLE STEPPER MOTORS + 1 DC MOTOR on: March 28, 2014, 07:59:32 pm
Sure.
72  Using Arduino / LEDs and Multiplexing / Re: 3 Position LED Control on: March 26, 2014, 05:57:12 pm
Hi MisterMimoBot, and welcome.

Your plan sounds good to me.
Except for the part where you plan to connect the switch to what you call 'power'.
I guess you mean 5 volts by that.
You could do that, but i recommend you to connect the center pin of your switch to GND.
Then you can enable the internal pull up of your input pin.
Now, if you have the switch at the center position, bot inputs are HIGH.
And if you flip the switch to one side, the pin on the other side of that switch will be pulled towards LOW.
You can read that.
That is about the simplest way to do this.
There are ways to do this with just one input pin, but for starters it is better to keep things simple.

Of course i understand it's cool to play with nice colors and have instant results.
But still i'd suggest you find the examples in IDE and play with those.
So first have a look at what an example does, then change it a bit and see whether that does what you expected it to do or not.
That's a lot of fun and you'll learn a lot.
And by doing so you'll also meet different ways to use LEDs, switches and buzzers.
You'll even learn how to use timers in a correct way (blink without delay is a hot item over here).

Lots of success, and not the least lots of fun !
73  International / Nederlands / Re: hulp gevraagd voor arduino regelunit voor distilleer apparaat on: March 26, 2014, 05:32:34 pm
Nou das dus het begin.
Je laat nu de Arduino ook in zijn hoofd tellen.
Maar terwijl je dat doet, laat je m wel elke tel roepen: "Dertig minuten : Negenenvijftig seconden".
Dus hij telt dan wel in zijn hoofd, maar niet "hardop".
En dat komt omdat je niets doet met de minuten en de seconden.
Dus dan gaan werken aan wat ik in mijn vorige post al zei: elke seconde een seconde er af.
En als je onder de nul seconden uitkomt, zet je de secondes weer op negenenvijftig, maar tel je tegelijk ook een minuut eraf.
Hoe dat ook alweer ging met die secondes die onder de nul uitkomen, vind je terug in je distiller sketch.
In "Distiller_Maart_17.ino" bijvoorbeeld, staat zoiets in regels 177 en 178.
Maar omdat je hier maar 1 richting op gaat (alleen omlaag, nooit omhoog) hoef jij maar 1 zo'n regel te gebruiken.

Als ik jou was zou ik eerst beginnen met de secondes.
Als je die goed hebt kun je de minuten ook in de gaten gaan houden, na de secondes zal je dat ineens heel simpel voorkomen.
74  Using Arduino / Motors, Mechanics, and Power / Re: Encoder counting IC on: March 26, 2014, 04:10:33 pm
No.
That is an encoder (and it looks to be an expensive one too).
An encoder generates at least 2 pulses that are phase shifted.
Because of that you can not only see movement, but you can also see the direction of that movement.

An IC is an Integrated Circuit, also known as 'chip'.
The chip you are looking for, decodes the signals from the encoder, and offers data to a processor.
You can do this with an Arduino, but using a dedicated chip takes a lot of work off of the Arduino.
I told about a HCTL-2017-A00 (click !).
That is a commercial link (first that popped up in Google) to a Dutch Mouser site and it has a link to the product's datasheet.
A datasheet like that tells you about the product and how to use it, but some knowledge about the matter is assumed.
Reading it might shed some light (pun intended) on how encoders work, and how this chip helps in using those signals.
75  Using Arduino / Motors, Mechanics, and Power / Re: Encoder counting IC on: March 25, 2014, 06:40:14 pm
Hoi Mondriaan, en welkom !

Did you read through the entire article at least twice ?
If you do that, some of your questions will be (partially) answered.

  • An encoder counting IC is some solution that catches the pulses form an encoder (a sensor), and generates pulses or counts that can be connected to an Arduino for example.
    First hit on Google was "HCTL-2017-A00"
  • A hall sensor is a sensor that measures magnetic fields (and/or variations in that)
    It can be used to sense a position in relation to one ore multiple magnets, or earths' magnetic field.
    The article explains that PEC means Periodic Error Correction (of the transmission gears).
    I guess that means it's used to get rid of some mismatch in a given gear ratio and the actual ratio, which does happen now and then)
Pages: 1 ... 3 4 [5] 6 7 ... 91