For example (this is only a part of a possible arduino program):
unsigned long currentMillis = millis();
if (currentMillis - previousMillis >= 500) {
stepcounter = stepcounter + 1;
previousMillis = currentMillis;
}
case (stepcounter) {
case 1:
break;
case 2:
break;
case 3: stepcounter = 0;
break;
}
General Electronics Forum - Questions etc.
#21
Posted 01 January 2011 - 05:07 PM
#22
Posted 01 January 2011 - 05:18 PM
These have 13 (uno 14) digital pins and 6 analog input pins.
The digital pins can be programmed to be either inputs or outputs.
A digital pin will read high when you apply more then 3V on it. And will read low when it's not connected, or better, connected to the ground.
A digital pin set low will have 0V (ground), and 5V when high.
An analog input pin just reads the voltage between 0 and 5 volts and translates this into an integer value of 0 to 1023.
So if, for example, you want to turn a motor on, you have to power the relay.
Set the output pin high (5Volts) and trough a resistor you'll send this to the base pin of the transistor. The transistor on it's turn will then power the relay (which should also have a diode over the coil to absorb the peak current on switch off).
Because the relay switches, the motor can be turned on/off, depending on how you wire the whole thing.
#23
Posted 01 January 2011 - 05:29 PM
Well, I can understand everything with the breaks and cases, but what about actually programming the Arduino? What does this involve when actually soldering the circuit? How do you make this program be wired to make a command like this with the Arduino? What does this involve doing? What kinds of materials will I need to do this whole programming project with an Arduino?
Look at the Make Magazine Arduino 101's at youtube. They are tutorials that feature the examples you can find in the Arduino Development enviroment, they explain you how to hook it up and why to hook it up in that way.
It's not as easy as hooking up wire to a button and then to the digital pin.
SSCoasters Administrator
Read The Forum Rules(smart)
#24
Posted 02 January 2011 - 04:07 PM
They consume little current and the basic ones already switch at up to 100Hz.
Now, if you get a high frequency SSr you can actually use PWM for contolling larger loads.
With this you can actually control a motors speed using an arduinos PWM.
Note however that these cost more then regular relays and you'll need a fast on to usw the full PWM range of an arduino.
It's PWM pulse is at 500Hz, so the period is 2ms. The actual range of the PWM is 0 to 255. So you can imagine that at 1 or 254 you either need a realy fast SSr, or need to come down to a smaller range around the median.
Cheers
#25
Posted 06 January 2011 - 05:55 PM
Edit: Is this an adaptor? Like what I would need in Max's other thread: http://www.vellemanu...view/?id=522968
#26
Posted 06 January 2011 - 06:01 PM
Yes that is an adapter!
Maybe you should ask you parents for a little help on this SuperTKD, I'm sure they know how to do this, saves me a lot of time and answering pretty straight forward questions.
SSCoasters Administrator
Read The Forum Rules(smart)
#27
Posted 06 January 2011 - 06:06 PM
#28
Posted 06 January 2011 - 06:09 PM
Does it have wires?
Yes.
Does it supply power?
Yes.
Does it smell?
No.
Can you find it at a hardware store?
YES!
Edit: I'm sorry this just had to be done...
SSCoasters Administrator
Read The Forum Rules(smart)
#29
Posted 06 January 2011 - 06:33 PM
#30
Posted 06 January 2011 - 06:49 PM
SSCoasters Administrator
Read The Forum Rules(smart)
#31
Posted 07 January 2011 - 02:48 AM
If you're trying to connect 2 items at which there are loose ended wires, either remove one or both of those wires and get one long wire.
It's possible to use breadboards for experiments. These are sort of "pin it on" plates. But if you got a setup that you'll use for a while, for example: the whole automation of a coaster, then soldering is a must. This is to protect things from disconnecting. If there's a whole bunch of breadboard wires is covering your breadboard, and you accidentally get stuck to one and pull it out. Then it's a "fun" game to figure out where it came from and where it should go.
Like this.
And what do you need that adapter for? You're an euro going to america?
#32
Posted 07 January 2011 - 03:38 AM
Soldering smells, I was soldering all day and now my face smells like it Aside from the fact that it's prolly toxic I don't mindDoes it smell?
No.
here's what I made.
The leds blink to music,
That is the circuit box I have 2 transistors to amplify the audio signal for the lights.
I still need a shipment of the right kind of transistors to come in, but untill then we'll jsut pretend those are the right ones.
The 4 leds on ether end are red, they will light up only when the music get loud
Yes that is a cut up 2x4 and yes that is a cut up pop bottle as the clear covering, and yes i used a sharpie to "paint" the wood.
I never ever ever wire in series. parallel is the way to go!
#33
Posted 07 January 2011 - 03:41 AM
#34
Posted 07 January 2011 - 03:43 AM
#35
Posted 07 January 2011 - 03:47 AM
It does look cool though, if it works with a headphone jack
#36
Posted 07 January 2011 - 06:47 AM
But parallel isn't always the way to go, it's a lot more work and definitely isn't needed all the times. For example, my LED sign contain series of 5 led's. The ore you wire in parallel the more current you start to draw from the power supply, if it isn't able to coop with high currents you are going to burn it out.
SSCoasters Administrator
Read The Forum Rules(smart)
#37
Posted 07 January 2011 - 07:25 AM
Sooner or later you'll have to work in parallel. I'm not talking about 10 or 20 leds in series of 5, but like a whole screen. Adapters like for the 12V motor are very limited in current, and have not so large wires, but they're as large as they should be.
But there are still a lot smaller wires used in circuit boards, and some people use larger power supplies, like lab or cpu's. You can get a good amount of current from those.
#38
Posted 07 January 2011 - 07:38 AM
regarding motors. Any DC motor will run forward/reverse and at different speeds depending on the voltage supplied. If you want it to go the other way reverse the polarity. Increase speed increase voltage. Think of electric train controls. They are very simple motors controlled by a power supply that can be adjusted easily.
That is why the battery powered motors run slower when the batteries are weak. They have less voltage.
Comet Recreation still underway.
Proof you never grow up if you keep playing with toys!
#39
Posted 07 January 2011 - 03:46 PM
A 9 volt battery wouldn't be able to supply 20 leds in series tho, witch is why I used parallel.
#40
Posted 07 January 2011 - 06:13 PM
SSCoasters Administrator
Read The Forum Rules(smart)