Jump to content




General Electronics Forum - Questions etc.

amusement park coaster connecticut jonnycoaster quassy

  • Please log in to reply
132 replies to this topic

#21 Jumpge

Jumpge

    Stopping by every now and then!

  • 3930 posts

Posted 01 January 2011 - 05:07 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?

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;
}



Posted Image


#22 floris2burn

floris2burn

    Software Engineer

  • 414 posts

Posted 01 January 2011 - 05:18 PM

Let's take a basic arduino (duemilanove, or now uno).
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 Maxlaam

Maxlaam

    Tracing Tyrant's Steps

  • 8116 posts

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)

Posted Image
Posted ImagePosted Image


#24 floris2burn

floris2burn

    Software Engineer

  • 414 posts

Posted 02 January 2011 - 04:07 PM

This came to mind a moment ago. There are relays called solid state relays. These do what normal relays do just a lot faster.
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 SuperTKDKid

SuperTKDKid

    Lead Engineer

  • 2750 posts

Posted 06 January 2011 - 05:55 PM

One last thing. Is soldering what you do to connect the wires or is it something else?

Edit: Is this an adaptor? Like what I would need in Max's other thread: http://www.vellemanu...view/?id=522968

Posted Image


#26 Maxlaam

Maxlaam

    Tracing Tyrant's Steps

  • 8116 posts

Posted 06 January 2011 - 06:01 PM

Soldering is used to connect wires together, but is not necessary, it's more of a "permanent" solution, you can de-solder it though. It's definitely the strongest solution. You need a soldering iron and solder. Put the wires together and keep the soldering iron in one hand and some solder into the other, then press the solder against the wires and heat it up with the solder iron, it should flow nicely between the wire resulting in a shiny and strong connection. If your solder looks dull or has lumps it's not a secure connection, try to use as little as possible but enough for a strong connection.

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)

Posted Image
Posted ImagePosted Image


#27 SuperTKDKid

SuperTKDKid

    Lead Engineer

  • 2750 posts

Posted 06 January 2011 - 06:06 PM

Is that something that I would find at a hardware store?

Posted Image


#28 Maxlaam

Maxlaam

    Tracing Tyrant's Steps

  • 8116 posts

Posted 06 January 2011 - 06:09 PM

We are now playing the game:"Who is it?"

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)

Posted Image
Posted ImagePosted Image


#29 SuperTKDKid

SuperTKDKid

    Lead Engineer

  • 2750 posts

Posted 06 January 2011 - 06:33 PM

Another question. Is that basically what I would use for this? A.K.A. would it work?

Posted Image


#30 Maxlaam

Maxlaam

    Tracing Tyrant's Steps

  • 8116 posts

Posted 06 January 2011 - 06:49 PM

Ask your parents for help.


SSCoasters Administrator
Read The Forum Rules(smart)

Posted Image
Posted ImagePosted Image


#31 floris2burn

floris2burn

    Software Engineer

  • 414 posts

Posted 07 January 2011 - 02:48 AM

I might have seen too much about industrial electricity, but it's best if you don't solder 2 wires together.
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 the_burrito_master

the_burrito_master

    mili force 10 years late.

  • 2879 posts

Posted 07 January 2011 - 03:38 AM

Does it smell?

No.

Soldering smells, I was soldering all day and now my face smells like it :P Aside from the fact that it's prolly toxic I don't mind :D

here's what I made.
Posted Image

The leds blink to music,
Posted Image

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.

Posted Image

The 4 leds on ether end are red, they will light up only when the music get loud :D

Posted Image
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 floris2burn

floris2burn

    Software Engineer

  • 414 posts

Posted 07 January 2011 - 03:41 AM

Is that a light bar that lights up according to the voltage supplied?


#34 the_burrito_master

the_burrito_master

    mili force 10 years late.

  • 2879 posts

Posted 07 January 2011 - 03:43 AM

Sadly no, just the 2 different colors will light up depending on the sound of the music that is being run through the circuit.


#35 floris2burn

floris2burn

    Software Engineer

  • 414 posts

Posted 07 January 2011 - 03:47 AM

Now I started thinking that you steer current with a transistor and now voltage XD

It does look cool though, if it works with a headphone jack :P


#36 Maxlaam

Maxlaam

    Tracing Tyrant's Steps

  • 8116 posts

Posted 07 January 2011 - 06:47 AM

Looks cool, really fancy, this is what this forum is for :)

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)

Posted Image
Posted ImagePosted Image


#37 floris2burn

floris2burn

    Software Engineer

  • 414 posts

Posted 07 January 2011 - 07:25 AM

The amount of led's you can put in series depends on the voltage you have.

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 ForgotToGrowUp

ForgotToGrowUp

    Lead Engineer

  • 1732 posts

Posted 07 January 2011 - 07:38 AM

didn't read the entire thread...

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 the_burrito_master

the_burrito_master

    mili force 10 years late.

  • 2879 posts

Posted 07 January 2011 - 03:46 PM

I use batteries, so it's not a problem unless the battery burns up.

A 9 volt battery wouldn't be able to supply 20 leds in series tho, witch is why I used parallel.


#40 Maxlaam

Maxlaam

    Tracing Tyrant's Steps

  • 8116 posts

Posted 07 January 2011 - 06:13 PM

You could run 3 maybe even 4 in parallel with a resistor though. It draws less Amps thus allows for a lighter power supply.


SSCoasters Administrator
Read The Forum Rules(smart)

Posted Image
Posted ImagePosted Image