Jump to content




General Electronics Forum - Questions etc.

amusement park coaster connecticut jonnycoaster quassy

  • Please log in to reply
132 replies to this topic

#1 Maxlaam

Maxlaam

    Tracing Tyrant's Steps

  • 8116 posts

Posted 28 December 2010 - 08:21 AM

Since people saw Looping Star with Phase integrated and the lights I've been getting quite a few PMs and visitor messages. I think I can say that you guys have literally been spamming me with questions about electronics the past couple of months.
However I'm not going to keep saying the same stuff to everyone over and over again, that's why I opened up this thread, if you have a question you can ask me or other members. Note, I am not an expert at this so bear in mind that I can not always answer your questions.

I would also like to add that I will not release any details from Project Phase.

Before you start building I want you to ask yourself this: Is it worth it to start using lights on this project? Electronics are cheap by themselves but a full grown project can cost you tens if not hundreds of dollars.

Wiring up electronics:

Rules for determining Voltage, Ampère and Resistor

Ohms Law:
R = U/I

Series:
Vtotal = V1 + V2 + V3 + ...
Itotal = I1 = I2 = I3 = ...

Example on how to determine the Voltage used and the Resistor Required.
LED at 2.1V and 20mA
Posted Image

12-(5*2.1) = 1.5V

Use Ohms Law:
R = 2.5/0.02
R = 75 Ohms
Best available resistor: 82 Ohms


Parallel:
Vtotal = V1 = V2 = V3 = ...
Itotal = I1 + I2 + I3 + ...


Example Determining Voltage, Current and resistor in Parallel+Series Circuit:
LED at 2.1V and 20mA
Using the info from the previous example, resistors are at 82 Ohms.
Posted Image

Determine the current needed from the power Supply:
3 series in parallel at 20mA per series = 3*20mA = 60mA

Posted Image

Always look up the data sheet for the LED you buy to get the exact values.
Always check how much your power-supply can handle, if the power-supply can not supply the current needed you are going to burn out your power-supply
Always take a resistor higher than the value you calculated.
Take a stabilized power supply if you want your LED's to flash and blink.
Always check how much a light organ kit can handle. If you need more than it can handle you need to start using relays.


SSCoasters Administrator
Read The Forum Rules(smart)

Posted Image
Posted ImagePosted Image


#2 Millcreek47

Millcreek47

    BANNED

  • 1186 posts

Posted 28 December 2010 - 08:46 AM

Don't LEDs shine brightest when they are all in series?

In my electronics class at school, we made a christmas ornament that had 8 flashing LEDs, 4 at a time. Its nothing like you've been doing though....

Posted Image
(Sig under construction)

-----XBL Gamertag - I were Speshul-----


Top 5: Time Machine, The Incredible Hulk, Goliath, Dueling Dragons, Georgia Scorcher


#3 Maxlaam

Maxlaam

    Tracing Tyrant's Steps

  • 8116 posts

Posted 28 December 2010 - 10:27 AM

Don't LEDs shine brightest when they are all in series?

In my electronics class at school, we made a christmas ornament that had 8 flashing LEDs, 4 at a time. Its nothing like you've been doing though....


I don't know where you are getting that from but that's not how it works. A LED shines at it brightest when it gets the voltage it needs. Just note that when you use 12 Volts you can only put 5 LED's in series if they require 2.1 Volts. If you put in 6 or 7 they will dim or not burn at all.


SSCoasters Administrator
Read The Forum Rules(smart)

Posted Image
Posted ImagePosted Image


#4 Jumpge

Jumpge

    Stopping by every now and then!

  • 3930 posts

Posted 29 December 2010 - 06:26 PM

Well, what about motors? For instance ~steelspectrum~, JPCoaster, TrippleHelix, and other people on SSC use custom motors. What is a power source for those? And if you were wanting to program a custom motor like an Lego Mindstorms program would let you do, how would you program it to possibly go forwards for X amount of seconds, and then go in reverse for X amount of seconds? What about controlling speeds on a custom motor? I read in ~steelspectrum~'s 'Condor' thread that he said he could make it go faster right at the end of the lift if he wanted it to, referring to this post. (this was when "Condor' was an inverted coaster) Is that was the 'big gray box' was for, used on 'Looping Star' and other casters you have made like the 'Big Apple testing' So, Answer the questions above please.

Posted Image


#5 Jogumpie

Jogumpie

    Living through the great Gump hiatus...

  • 13586 posts

Posted 29 December 2010 - 06:47 PM

That includes far more difficult electronics, including a microprocessor.


SSCoasters Administrator
The SSCoasters Forum Rules
DD_signature.jpg
YoutubeButton.pngFacebookButton.png


#6 Maxlaam

Maxlaam

    Tracing Tyrant's Steps

  • 8116 posts

Posted 29 December 2010 - 06:58 PM

Controlling Motor speeds requires PWM. PWM is not something I have ever messed around with. I never got to using motors that spin in two directions. (Stepper motors are the first motors I can come up with that can spin both forward and backwards with different speeds. And they are fairly expensive, I don't know how strong they are though.)

'Custom' motors can be any kind of motors, there is no specific suitable power supply for them, the motor requires a certain voltage to work and the power supply should be able to supply the right amount of current for the motors when they are being stressed.

Electronics are never the same, there are only rules that can help you determine what you need.

The "Big Grey Box" was just here because I couldn't fit everything into the control panel, as much as I wanted to though. In the end it proved to be a better solution though, and more clean. It only contained the power inputs for the motors and the relays to switch the motors on or off. It was a sub-station that allows for easier modifications with sensors and the like.


SSCoasters Administrator
Read The Forum Rules(smart)

Posted Image
Posted ImagePosted Image


#7 BGTKing

BGTKing

    Administrator

  • 7516 posts

Posted 29 December 2010 - 08:09 PM

Pulse width modulation (PWM) is pretty easy with right software and a microprocessor and controller. Although this was in upper level experimental methodology lab.


#8 Jumpge

Jumpge

    Stopping by every now and then!

  • 3930 posts

Posted 29 December 2010 - 08:12 PM

Well Maxlaam,

I was looking a lot at stepper motors and found some of them quite cheap actually! But I was wondering, is the programming system for a Stepper Motor quite expensive? I was on this website and found a good stepper motor on Sparkfun, and I found all of the things that I would need for this project electronically like circuit boards and servos here. So, is this a good website for a newbie in electronics? And would this way be a good motor for what I intend on using it for? The Sparkfun stepper motor is quite a powerful motor, according to this video. Pretty much my question is, is this a good store to buy my items from & would the motor be powerful enough (when it is all geared up to make it rotate faster like this) to achieve the job I need it to do?

-Jumpge

Posted Image


#9 Maxlaam

Maxlaam

    Tracing Tyrant's Steps

  • 8116 posts

Posted 29 December 2010 - 08:24 PM

I don't know a lot about motors.

Sparkfun makes great electronics kits but I don't use them myself. So I don't know what the quality is of their loose components.
I don't work with PWM motors besides servo's but that is the most basic you can do with PWM really.

An Arduino is capable of working with PWM and can be used to control stepper motors. But as I said before, I do not know if they are strong enough for anything you have planned.

I'm not good with programming either, Phase is as basic as it can get and almost all the code was taken from examples then modified to do what I wanted it to do. I really never got into controlling motors through an Arduino. However I do know that you can never, EVER hook up a motor straight away to the Arduino.

Just remember that if you want to make something as complex and custom as that, you have to make everything custom, you don't just buy complete things in a store and hook it together. It requires skill and knowledge.


SSCoasters Administrator
Read The Forum Rules(smart)

Posted Image
Posted ImagePosted Image


#10 Jumpge

Jumpge

    Stopping by every now and then!

  • 3930 posts

Posted 30 December 2010 - 08:33 AM

I was looking at Sparkfun and saw "Distributors" and I am not quite sure if they ship directly to you. Is this true? Do you have to pick it up at a store?


I was looking at different stepper motors, and the only thing that was confusing me was how you program the actual motor to go in one direction, another direction, and then how many rotations lasts. I think it is a computer program that you use to actually program the motor's direction, but how do you make a program that then runs by itself when you tell it to? Also, in the programming, is there a cretin program that makes the motor have a specific wait time in between each program or cycle? Is thee a tutorial on how to do these things that I could understand?

-Important! I am only a newbie and have no experience in electronics, so all new technical terms in electronics are not understandable. If you could explain this to me in any easier way, this would be great.

Posted Image


#11 Knexrule11

Knexrule11

    Sferico's President

  • 4456 posts

Posted 30 December 2010 - 09:20 AM

Well the problem is..... electronics arn't easy to explain. It would take a while to understand them.

:ph34r: SSCoasters Moderator :ph34r:
Fear the Bankatana | The SSCoasters Forum Rules

MySSCoasterssig.png
SfericoUserbar-1.png
Maverick|Tatsu|TTD|Fahrenheit|Skyrush|MF|Cheetah Hunt|Storm Runner|SheiKra|Montu
Coaster Count: 102


#12 Maxlaam

Maxlaam

    Tracing Tyrant's Steps

  • 8116 posts

Posted 30 December 2010 - 10:07 AM

I don't think you are up to this project if you don't know anything about electronics.

You don't think I can think up the entire schematic for what you are planning to do in 5 minutes, do you? Phase took a year to complete, and it was all trial and error. I can't really help you with the project if I don't have anything I can touch or see. I'm not going to tell you how to do it, it's your project so you have to do it yourself. I can only answer specific questions. And for programming, I know very very little about it.

Tutorials are the best way to go, then look at how they did it and modify it so you see what each thing does.


SSCoasters Administrator
Read The Forum Rules(smart)

Posted Image
Posted ImagePosted Image


#13 Jumpge

Jumpge

    Stopping by every now and then!

  • 3930 posts

Posted 30 December 2010 - 10:31 AM

Well, what about this. If one of these motors were hooked up to a power source, would it be able to run consistently at a steady rate? I think this would be a bit more simple for what I would need it for. My only question is what kind of power source would this need to power it?

Posted Image


#14 Maxlaam

Maxlaam

    Tracing Tyrant's Steps

  • 8116 posts

Posted 30 December 2010 - 10:46 AM

A motor starts to draw more current when you put a load on it. If you can find a power supply used a model trains you should have one that could power that motor. you can also adjust the speed on that (and maybe even the direction.) Just make sure that if your Power supply provides AC you should have an AC motor too.

I think you should start looking at this a little more specific, as in voltage used or the amount of RPM.
I don't think you should go for just any motor, you might wan to consider a geared motor. The motors you are looking at are specifically designed for model planes and helicopters, the blades on those machine are supposed to spin freely so they rarely coop with a lot of resistance. When you start putting a huge load on it they might break.


SSCoasters Administrator
Read The Forum Rules(smart)

Posted Image
Posted ImagePosted Image


#15 Jumpge

Jumpge

    Stopping by every now and then!

  • 3930 posts

Posted 30 December 2010 - 10:56 AM

Well, I realized too that I was looking at the wrong type of motor. I was looking at RC Helicopter and Plane motors when I should have looked at model cars. I found this model motor and I think after looking t some videos that it would be an efficient and very good motor to buy, since it can handle a ton of resistance.

The only thing is, that I want this thing to run on its own and not by me using a remote control like some cars. How would I make this work? Would I be able to wire the motor a certain way to make it run by itself? If not, I do have an easy way out, but on this project, I specifically want to learn some things about electronics. And I actually think that RC Cars run backwards? Is this true?

General question- What is a servo? And what is AC?

Posted Image


#16 Maxlaam

Maxlaam

    Tracing Tyrant's Steps

  • 8116 posts

Posted 30 December 2010 - 11:59 AM

You don't want any model motors, just buy a good geared motor, stop looking at RC motors, they will not be able to handle what you want it to do.

Best buy is to go with a powersupply used for model trains. They come really cheap and you can easily get them off of e-bay.

Servo is a motor that turns only 180° max, I use it to control the station gates, I can tell them to turn the gates 90° etc.

AC - Alternating Current ( + and - switch around x amount of times per second e.g. It comes out of a power socket in your house)
DC - Direct current ( + stays + and - stays -, e.g. A battery)


SSCoasters Administrator
Read The Forum Rules(smart)

Posted Image
Posted ImagePosted Image


#17 Jumpge

Jumpge

    Stopping by every now and then!

  • 3930 posts

Posted 30 December 2010 - 07:50 PM

So, what kind of "geared motor" are we talking about here? This kind of geared motor (that can be found at Radio Shack) or this type of "geared motor"? And would this be able to be hooked up to the same train power supply? And are these able to go in reverse as well?

The only thing I am not comprehending is why an RC Car motor would work for this job. The thing goes forwards and backwards at a high RPM, so why would this not work for the job I need it to do?

The only other question is about programming an actual command. How do you program lights on 'Looping Star' and 'XenoX' to make different patterns of lighting? Would this same thing apply for wiring and programming to the forward/reverse and wait time for a motor?

Posted Image


#18 floris2burn

floris2burn

    Software Engineer

  • 414 posts

Posted 31 December 2010 - 04:30 AM

Allright. Looks like I found the fun topic :)

AC/DC, as in the band? NO.
Alternatinc Current: If people say AC it mostly means a sinus voltage supplied at a certain frequency. For example, the American power supply is 115V AC, 60Hz.

Direct Current: This is a constant current/voltage, or a the poles don't switch.

The 3V and 12V k'nex motors are DC.

I guess there will be a lot of things that could use explanation, but I'm a little short on time right now.

Servo is a motor that turns only 180° max, I use it to control the station gates, I can tell them to turn the gates 90° etc.

NOT true, that's only the case for this specific servo that comes with the ardx arduino kit. Also because it's cheap.
I'll try to explain the difference between servo's and stepper motor's later on, but I'll have to grab my course for that.

To answer on the whole "does this RC car motor fit", you have to consider this:
First of all, will it in some way fit to k'nex?
Secondly, what does it have to do? Stepper motors are used for getting to a certain position or rotating a certain angle.
Thirdly, how strong must the motor be? The RC motors are VERY powerful. Even too powerful if you ask me. It works on kilo-volts or kilo-amps, which is dangerous and you can't make a custom control for that.

If however, this motor proves to be the motor of you choice, then you'll have to get the whole power supply unit and control unit. To "control" this motor, you'll then have to wreck the remote control and apply some electronics to it for controlling it in the way you want.


How to animate lights?
Well, you'll need some (micro)processor for that, but most of us got familiar with an arduino now. So to animate a sets of lights/LED's, you'll have to split everything in groups. A group is a set of lights that will all burn at the same time. So each group can be controlled, but no longer be split in "this half of the group goes on and the other doesn't", you'll have to think it out from the start.
Then, if it involves a lot of lights, you'll have to switch them using transistors. Which then get controlled by the 'arduino'. Remember, each group will be an output on the arduino. If you want a lot of groups, you'll need shift registers.


I can't tell you the whole story about electronics and electrics in one post, but feel free to ask specific questions.


#19 Maxlaam

Maxlaam

    Tracing Tyrant's Steps

  • 8116 posts

Posted 01 January 2011 - 12:08 PM

I should leave the motors to you Floris.

The Lights on XenoX are not powered by an Arduino. Simply to many LED's so I went with the lazy solution of buying a Light Organ kit.

Looping Star's Light code was just this:

LED1 == HIGH
wait(500)
LED1 == LOW
Something like that. You should be able to do that without any knowledge, I just made it more versatile by making each pattern a separate function so I could switch around the patterns and make it run an x number of times before going to the next one.


Floris, I would be glad if you assisted me in this topic, as I said, I only know the basics.


SSCoasters Administrator
Read The Forum Rules(smart)

Posted Image
Posted ImagePosted Image


#20 floris2burn

floris2burn

    Software Engineer

  • 414 posts

Posted 01 January 2011 - 04:56 PM

I've said it a few times to Max, but I'll only say it here once.

If you use the arduino for other things beside light animation -controlling your ride for example- DON'T use DELAY's.
A delay pauses your arduino program for a certain amount of time. Within this time you can't scan for incoming signals like buttons, switches, sensors.

This is done far easier by using the arduino's clock time. There's an example that uses this time in the library (BlinkWithoutDelay). What you do is remembering the arduino time and compare it with the actual time. As soon as it reaches the desired value, you tell the program to do something.

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