Jump to content




CotA 2013 Electronics


  • Please log in to reply
31 replies to this topic

#1 LaMbChOpZ

LaMbChOpZ

    Lead Particle Physicist and Musical Orchestrator

  • 2812 posts

Posted 13 August 2012 - 06:00 PM

For my CotA 2013 coaster, I'm looking to go more advanced with the programming (since the NXT can't handle the forces of the lift). I'm trying to be as efficient as possible while also being as straightforward so troubleshooting easier.


The set up I'm looking to make consists of 2 motors to control the lift hill and the brake run. I'm also going to attempt to make this ride "smart" by using reed switches to set off the different motors. The reeds will be set up on the brake run, station, start of the lift hill, and end of the lift hill and set off a light on the main panel to indicate where the cars are on the set up. I'm also going to include an emergency stop, on/off by key, dispatch button and light, and a new on/off switch called C.C.

C.C. stands for Civilian control. Since the event is so popular, why not allow those there to interact with the ride? Therefore, a second panel is going to be created with a light and a button for dispatch.

Here's a scheme of the control panel layout. Everything with yellow lines around it represent lights. Everything else are buttons (unless noted otherwise). Note, buttons not made to scale.

Posted Image

The 4 lights on top act like a visual way to see the trains on the circuit. The reed switches will be used to help the program move the trains around the circuit by means of being activated an deactivated. This will also help create a block system so there are no collisions or accidents.




And the C.C. panel

Posted Image



Thoughts? Seem plausible? Can this be programmed with a Arduino?


Edit: When it comes to coding, it won't be too hard. I have a good background in Java/C++ and read through Jochem's Balrog code with ease.

Member of a few physics experiments; Orchestrator and/or Copyist for a few musicals.


#2 TheSUCKCrew

TheSUCKCrew

    Way too old

  • 4095 posts

Posted 13 August 2012 - 06:09 PM

5 outputs for panels
3 inputs for panels
4 inputs reed switches
1 analog output for lift motors
1 analog output for brake run motor(s)
1 analog output for station motor(s)
__________________
8 outputs + 7 inputs

Are there gonna be servo's for the station, or anything alike that? In any case: I think practically all arduino's can handle this.



#3 LaMbChOpZ

LaMbChOpZ

    Lead Particle Physicist and Musical Orchestrator

  • 2812 posts

Posted 13 August 2012 - 06:18 PM

So far, 3 motors. 1 for the main lift that can move forwards and backwards, and 2 (station and brake run) transports running in a single direction. I wouldn't see the need for servos. Most likely stepper motors or motors that can rotate multiple times.

Member of a few physics experiments; Orchestrator and/or Copyist for a few musicals.


#4 Maxlaam

Maxlaam

    Tracing Tyrant's Steps

  • 8116 posts

Posted 13 August 2012 - 06:35 PM

Thoughts? Seem plausible? Can this be programmed with a Arduino?


Why wouldn't it be? I've done all this and more on Phase 3.0

Question, why stepper motors? I guess you don't own any 12V motors? They work great with mosfets!

The panel lay-out seems a bit messy like this. You should group important stuff together and less important stuff somewhere out of the way.

Posted Image

Look at my panel, all the controls for the coaster that are used a lot are on the right. Including the E-stop which should be easy to reach. (I'm right handed so right is suitable for me.)

Lights etc. aren't important on my ride, but it doesn't matter if anything happens with it by accident. A suitable spot is the bottom left.
The train selector button is hidden on the left, you shouldn't have to touch this when it is in operation. Placed out of my way.
The auto/manual button is placed in a more convenient place because switching it by accident doesn't hurt anything. Besides, it overwrites the Public allow/disallow. Which in next to the main power key, another logical spot, if I am not present and somebody else needs to operate the ride.

Be careful with reed switches, both me and Gump work with these now and we both had trouble with magnet alignment, although most of the problems occurring with Gump was because they were flung off the coaches because of the forces and the shaking ;) I solved many problems on my build by doubling the reeds in some area's. Though, if you make a train and have a magnet under each coach it should work a lot better.

5 outputs for panels
3 inputs for panels
4 inputs reed switches
1 analog output for lift motors
1 analog output for brake run motor(s)
1 analog output for station motor(s)
__________________
8 outputs + 7 inputs

Are there gonna be servo's for the station, or anything alike that? In any case: I think practically all arduino's can handle this.


Very much correct, however...
That's 15 pins you got there. An Uno only has 14 digital pins (0-13), I myself never use pins 0 and 1 as they appear to be communication pins and I can never get those to work with anything. It's possible with an Uno if you analogRead the inputs. analogWrite goes via a PWM-pin, aka a digital pin.

So in short, yes it is possible, but pay attention to the pin lay-out and how to set it up.


SSCoasters Administrator
Read The Forum Rules(smart)

Posted Image
Posted ImagePosted Image


#5 LaMbChOpZ

LaMbChOpZ

    Lead Particle Physicist and Musical Orchestrator

  • 2812 posts

Posted 13 August 2012 - 06:52 PM

^ Ah I see. We should have 12V motors, and can you control their speed (with code or resistors)? I'll work on redoing the panel, just had to get all my ideas out there :P As for the reed switches, I plan on using larger magnets. Have you tried repositioning the switches, like rotating 90*? Could work. I'll have to just get them and test them out. I'll repost the new panel design in a little bit. Also, what does the changing car allow you to do?

Member of a few physics experiments; Orchestrator and/or Copyist for a few musicals.


#6 Maxlaam

Maxlaam

    Tracing Tyrant's Steps

  • 8116 posts

Posted 13 August 2012 - 07:02 PM

^ Ah I see. We should have 12V motors, and can you control their speed (with code or resistors)? I'll work on redoing the panel, just had to get all my ideas out there :P As for the reed switches, I plan on using larger magnets. Have you tried repositioning the switches, like rotating 90*? Could work. I'll have to just get them and test them out. I'll repost the new panel design in a little bit. Also, what does the changing car allow you to do?


Use a MOSFET transistor and the PWM pins. I'm not entirely sure what Mosfet to use though. I think you should ask Jogumpie or Suck about that.

The problem with my reed switches is that there is over 6 meter of cable between the sensor and the Arduino, there is quite a drop of in power so in order to get a proper read the reed needs to be triggered for a few ms. Sometimes the coach just flies over causing the signal to go al wibbly wobbly, either causing an incorrect reading (not that this matters as it uses block sections) or not giving a proper signal at all. Reeds at high speed areas are a bit, well, buggy it seems. Larger magnets might work, or stronger ones. But I found that the magnets Jogumpie and I use (dealextreme.com) fit very nice with the K'NEX coaches. That being said, the coaches on the Super Mouse have a swivelling front axle, causing the coach to jump around on the track a bit. Sensor alignment was a pain as the wobbling of the car on the track might cause the magnet to miss the reed.
And yes, I have repositioned a few to lay flat on the track, it seemed to work most of the time but I also had one that didn't work, turned out to be a faulty cable so my results on that matter are rather, inconsequent...

The 1-2-3 train feature isn't fully implemented yet, but if you have looked at Gump's code you could make out that it's a more advanced way of looking for trains. You set the switch to correspond with the amount of trains and let it initialise, then the initialisation stops as soon as it found all of the trains.
Right now, Gump's model keeps going through the full initialisation on the boot, which can take quite a while because it always checks for 3 trains, even though there may only be 1 on the track. Basically, my button allows the initialisation to be cut of short as soon as it found the proper amount of trains. I may, in the future get rid of this system if I find another use for the switch. (Maybe a transfer-track controller?)


SSCoasters Administrator
Read The Forum Rules(smart)

Posted Image
Posted ImagePosted Image


#7 LaMbChOpZ

LaMbChOpZ

    Lead Particle Physicist and Musical Orchestrator

  • 2812 posts

Posted 13 August 2012 - 07:26 PM

Hmmm, interesting. I could use it for a transfer, although I'm not sure I'm going to make a working one.


So far, this is the newest design. As you can see, many changes. Most notably the layout (thanks Max!), but I really like the new illustrative layout on the board. I also have a lot of room for other buttons. I included a button for lights (on the lift, station, clock tower, spotlights on the lift supports, and possibly the "water fountain" spotlight).

Posted Image

Member of a few physics experiments; Orchestrator and/or Copyist for a few musicals.


#8 TheSUCKCrew

TheSUCKCrew

    Way too old

  • 4095 posts

Posted 13 August 2012 - 08:59 PM

Use a MOSFET transistor and the PWM pins. I'm not entirely sure what Mosfet to use though. I think you should ask Jogumpie or Suck about that.)


Well, you'll probably need 6 of those 12v motors to run your lift. So that will bring the needed current up to 4A. That's definitely a perfect job for MosFet's. But if you want to control direction too, you'll need to build an H-bridge, and building an H-bridge with MosFet's is not easy. Maybe you can use a relay to control the direction, and a MosFet to control the speed. If you need help finding the right components and drawing a scheme, I'd be glad to help. I'm currently working with MosFets a lot, and I have lots of knowledge of them.

Gump would probably suggest his H-bridge IC's. With these, you can control 2 motors their speed and direction or 4 motors speed only. I would only use these for the chaindrives in the station and brakerun.



#9 LaMbChOpZ

LaMbChOpZ

    Lead Particle Physicist and Musical Orchestrator

  • 2812 posts

Posted 13 August 2012 - 09:17 PM

I like the idea, but I'm not sure I'll be able to get 6 motors hooked up to get the drum to turn without a problem. Even 3 motors would be hard to get to work. I'll have to look into that a bit more.

Member of a few physics experiments; Orchestrator and/or Copyist for a few musicals.


#10 TheSUCKCrew

TheSUCKCrew

    Way too old

  • 4095 posts

Posted 14 August 2012 - 06:27 PM

If Gump can attach 8 motors to his lift, you can attach 6. No problem at all. Another idea would be to use a custom motor, like I'm currently doing. One of those will give you enough power for sure. And it will save you like 60 bucks, haha. I can give you a few ideas on how to get that started if you want me to.



#11 LaMbChOpZ

LaMbChOpZ

    Lead Particle Physicist and Musical Orchestrator

  • 2812 posts

Posted 14 August 2012 - 07:44 PM

Feel free to. I saw the video and it looked really cool. You can post it here or PM, whichever's easier. Anything that reduces the chance of problems and cost!

Member of a few physics experiments; Orchestrator and/or Copyist for a few musicals.


#12 LaMbChOpZ

LaMbChOpZ

    Lead Particle Physicist and Musical Orchestrator

  • 2812 posts

Posted 21 August 2012 - 06:28 AM

So it's been a little while since I updated this thread, but the electronics are picking up. I've already begun looking into motors and will hopefully find one suitable for my needs within the next few weeks. As for the control panel/ride, I have decided to go with reed switches, but I am debating about using the glass ones for an event like this; they would be set up once the coaster's in place, remain there during the event, and taken down first when it's over. At this point, I will probably stick with them, but I am looking for other options.

As for the control panels themselves, they are coming along nicely. I've already done some looking around and found a good quality of buttons/lights. I'm going to take some shortcuts however on the dispatch by not using pilot lights and a push button, rather, an illuminating push button. This will be done for both dispatch buttons.

When it comes to the little lights to display the car's location on the coaster, I was looking into pilot lights, but those are too big and expensive for me. I've instead opted to go to LED's. I'm going to buy 5 (one as a backup), 180* Yellow LED's and these covers I can put on them that will make them fit in a bit more with the panel.

Finally, my biggest challenge right now is going to be choosing an arduino board. I know we started that above, but here's an updated list of things it will control:

  • Lift Hill Motor (both directions and speed)
  • Station transport motor (one direction and speed)
  • Brake Run transport Motor (one direction and speed)
  • Other lights (spotlights, ones inside station, etc)
  • With code, maintain a block system so there are no collisions


As for buttons/features on the control panel, here is a better list:
  • 3, 2-Position
  • 1, 2-Position Key
  • 1 E-Stop Button
  • 2 Illuminated Green Push buttons
  • 4 LED's


I have to go to band camp now, but hopefully this makes it easier for the search for an arduino.

Member of a few physics experiments; Orchestrator and/or Copyist for a few musicals.


#13 Britfag

Britfag

    Everybody's Russian!

  • 3818 posts

Posted 21 August 2012 - 09:13 AM

Max, in response to your 'wibbly wobbly' input from Reeds, use a Non-inverting Op-Amp, easy to set up, and it'?d sort that entirely.

so happy to be the first guy using reeds ;)


#14 Maxlaam

Maxlaam

    Tracing Tyrant's Steps

  • 8116 posts

Posted 21 August 2012 - 01:05 PM

I'd say go with the Mega, saves you a lot of time.


SSCoasters Administrator
Read The Forum Rules(smart)

Posted Image
Posted ImagePosted Image


#15 TheSUCKCrew

TheSUCKCrew

    Way too old

  • 4095 posts

Posted 21 August 2012 - 01:47 PM

Absolutely. And I recommend buying one on ebay. These cheap ones are fake, but because arduino ALLOWS copying the board and selling them and they have the blueprints online, they really are exact replicas. They work fine, I've had mine for 2 years now and it still works. Or you can go with an official one, I don't know what their advantage is, haha. What I do know is that they are 3 times as expensive.



#16 ForgotToGrowUp

ForgotToGrowUp

    Lead Engineer

  • 1732 posts

Posted 21 August 2012 - 02:27 PM

That is about what I paid for mine from this seller.

They have a bunch of bundles so I bought one bundled with the SainSmart motor shield , which has 2 of the L293D Hbridge chips Gump used, and a prototyping shield.

Bart, can you show a picture of how you incorporated your custom motor into Knex? I have been thinking it's crazy to put 6 or more expensive, weak as hell Knex motors on a lift when one $20 cordless drill replacement motor would probably be much stronger. (kicking myslef, I threw away the guts of a 13V cordless drill I dropped off a ladder a few years back... before the Knex obsession kicked in)

Comet Recreation still underway.

Proof you never grow up if you keep playing with toys!


#17 Maxlaam

Maxlaam

    Tracing Tyrant's Steps

  • 8116 posts

Posted 21 August 2012 - 02:38 PM

I don't know what their advantage is, haha. What I do know is that they are 3 times as expensive.


I get mine at an official dealer. The guys offers me discounts on everything he sells. That and if you do manage to blow it up, my dealer gives 100% warranty. The Uno models come with stickers too :D


SSCoasters Administrator
Read The Forum Rules(smart)

Posted Image
Posted ImagePosted Image


#18 TheSUCKCrew

TheSUCKCrew

    Way too old

  • 4095 posts

Posted 21 August 2012 - 03:18 PM

Yeah, great that you get discount. But Lamb doesn't, and he will probably not get any warranty on his arduino either if he buys a real one in america.



#19 Maxlaam

Maxlaam

    Tracing Tyrant's Steps

  • 8116 posts

Posted 21 August 2012 - 06:56 PM

Yeah, great that you get discount. But Lamb doesn't, and he will probably not get any warranty on his arduino either if he buys a real one in america.


If he buys from a legitimate dealer he most likely will get warranty on his product. Electronics have a high chance of being dead on arrival.


SSCoasters Administrator
Read The Forum Rules(smart)

Posted Image
Posted ImagePosted Image


#20 TheSUCKCrew

TheSUCKCrew

    Way too old

  • 4095 posts

Posted 21 August 2012 - 07:06 PM

Okay then. You will pay 40$ extra for the warranty on a 20$ product. Lamb, you must decide for yourself what you want. An official one might be a bit better (well, my fake one still works fine and I've never heard any complaints about the fake ones anyways), because it is made by a trusted company. For me it wasn't worth the money.