The K'Nex Forum  

Project: Automated K'nex Coaster

This is a discussion on Project: Automated K'nex Coaster within the K'Nex Contraptions: Gear Systems, Furniture, and Other forum, part of the K'Nex Models Discussion and Construction category; Since this is not yet much of an actual coaster I thought you guys might be interested. As of now ...


Go Back   The K'Nex Forum > K'Nex Models Discussion and Construction > K'Nex Contraptions: Gear Systems, Furniture, and Other

Forum Rules FAQ Members List Social Groups Calendar Search Today's Posts Mark Forums Read
  #1  
Old 09-02-2009, 03:09 PM
Maxlaam's Avatar
The one and only
 
Join Date: Feb 2007
Location: Breda Netherlands
Posts: 513
Models Made: 2
Maxlaam is on a distinguished road
Default Project: Automated K'nex Coaster

Since this is not yet much of an actual coaster I thought you guys might be interested.

As of now I'm really planning ahead and comparing prices.
Germany cost me pretty penny and I am almost broke. Another way of financing the project promising my mom to quit smoking... I suck at making promises so this one is kinda hard. And I hate betraying or not living after a promises.
I guess the only option is to start working a little more than usual and stop spending my hard earned cash on other stuff.

Next to the whining is the actual stuff I'm planning to build.

The first plans of an automated K'nex coaster came up in my mind just at a random time when a friend of mine visited me at the campsite. The idea was to make a coaster run with 2 trains that used sensors and buttons to automate the coaster, so buttons for dispatch and gates. And sensors to turn the lift on or off. Pretty much like a real coaster.

Our first plan was to buy a microchip and write everything on it and hook it up to a power supply and wire it with sensors and buttons. Fuck us, we thought it was simple like that.

The second plan was making it in an analog/physical way. How about some relays attached to buttons, sensors and timers. This prove too much work and diagrams.

Then a geeky family member visited me at the campsite. (Remember I didn't have Internet there so I was completely reliant on words and drawings we came up with.) I told him my plans and he remembered this programmable circuit board with inputs and outputs.

Gotcha, Arduino™ it's gonna be! The programming language is based on Java. And you can easily hook up motors/servos, sensors, buttons and lights using a Breadboard!

As of now I am not going into the coding yet. I need to find out about prices and stuff I need, Leds Buttons Sensors etc.

I will be ordering an Arduino™ together with that cousin of mine to save on prices. Leds, sensors buttons and wire can easily be purchased at a store near me.

For now everything is about planning and comparing.
Wish me luck and enjoy!
__________________
Reply With Quote
  #2  
Old 09-02-2009, 05:10 PM
Kairah's Avatar
Super Moderator
 
Join Date: Jul 2009
Location: Nederland
Posts: 360
Models Made: 11
Kairah is on a distinguished road
Default

Hey thats a good idea. So basically you are going to hook up a PLC to some servo's and knex motor's.

If you need to know the prices on specific parts, then you might want to check out conrad.nl.

Do you have programmed anything like this before? (Its in C or C++ I think)
Reply With Quote
  #3  
Old 09-02-2009, 08:11 PM
Maxlaam's Avatar
The one and only
 
Join Date: Feb 2007
Location: Breda Netherlands
Posts: 513
Models Made: 2
Maxlaam is on a distinguished road
Default

Basically yes, but I will use regular hobby motors. I looked at the Arduino™ motor shield, which uses a separate power supply to power the motors. Hooking 2 motors and a servo up to the main Arduino™ board might prove a problem with the power. A second plan was using relays to power the motors.

I'm not a big fan of conrad.nl The website looks messy and is very user unfriendly, however the IR sensors appeared to be fairly cheap. But I'm going to the local radio-beurs tomorrow and get some information about the parts.

About the coding, I did some coding in Lua which derived from C/C++. It's also similar to Java (as people told me.) But I'm not afraid of coding it. Next year IT classes will start for me so this is also an excellent learning project. And if I can't figure it out, I got people backing me up that actually code for a living.
__________________
Reply With Quote
  #4  
Old 09-02-2009, 09:10 PM
Coaster105's Avatar
Super Moderator
 
Join Date: Mar 2007
Location: Vancouver B.C
Posts: 431
Models Made: 5
Coaster105 is on a distinguished road
Default

I'm dumb...

no idea what your talking about but it sounds cool. i like the chain turning off and on. Or you could have it like on some real coasters, where the chain lift slows down to a crawl, but doesn't stop.

Hopefully you can pull this off.
Reply With Quote
  #5  
Old 09-02-2009, 09:34 PM
Shadowman's Avatar
Senior Member
 
Join Date: Sep 2008
Location: Tennessee!
Posts: 632
Models Made: 11
Shadowman is on a distinguished road
Default

Cool idea, even though I don't know anything about programing.
RightWayTrey on SSC built an automatic station and chain lift on one of his coasters, but it uses switches and buttons (the system is rather complicated).

I look forward to seeing the finished project!
__________________

Click to see my Youtube channel! Check out my Blog!

My largest ball machine to date is Cataclysm,
using 28,538 pieces.
Reply With Quote
  #6  
Old 09-03-2009, 01:02 PM
Maxlaam's Avatar
The one and only
 
Join Date: Feb 2007
Location: Breda Netherlands
Posts: 513
Models Made: 2
Maxlaam is on a distinguished road
Default

Quote:
Originally Posted by Coaster105 View Post
I'm dumb...

no idea what your talking about but it sounds cool. i like the chain turning off and on. Or you could have it like on some real coasters, where the chain lift slows down to a crawl, but doesn't stop.

Hopefully you can pull this off.
Thats a really cool idea!

Problem is is that I have to figure out a way to change the resistance of the power flowing to the motors. Maybe V2 or so will have this

Quote:
Originally Posted by Shadowman
Cool idea, even though I don't know anything about programing.
RightWayTrey on SSC built an automatic station and chain lift on one of his coasters, but it uses switches and buttons (the system is rather complicated).

I look forward to seeing the finished project!
Mmh, like using timers and relays?


Today I went to the Radio-Beurs and got me some stuff: Buttons, Wirecutters, LEDs (50 Red 10 Green), Jumperwires for the breadboard, pinheaders wires and resistors.

I'm probably going again tonight to get me a potentiometer.
__________________
Reply With Quote
  #7  
Old 09-03-2009, 02:35 PM
Kairah's Avatar
Super Moderator
 
Join Date: Jul 2009
Location: Nederland
Posts: 360
Models Made: 11
Kairah is on a distinguished road
Default

Wat is een potentiometer?

Sorry for dutch
Reply With Quote
  #8  
Old 09-03-2009, 04:28 PM
Maxlaam's Avatar
The one and only
 
Join Date: Feb 2007
Location: Breda Netherlands
Posts: 513
Models Made: 2
Maxlaam is on a distinguished road
Default

Potentiometer is like a dimmer/rotary switch.

When you turn the knob it will give a different voltage which can be translated in the Arduino to do something.
__________________
Reply With Quote
  #9  
Old 09-03-2009, 04:45 PM
Kairah's Avatar
Super Moderator
 
Join Date: Jul 2009
Location: Nederland
Posts: 360
Models Made: 11
Kairah is on a distinguished road
Default

Ahh okay I understand. Thanks : )
Reply With Quote
  #10  
Old 09-15-2009, 12:36 PM
Maxlaam's Avatar
The one and only
 
Join Date: Feb 2007
Location: Breda Netherlands
Posts: 513
Models Made: 2
Maxlaam is on a distinguished road
Default

I'm able to earn a lot of cash this month, therefore I hope to get everything in in October.
__________________
Reply With Quote
  #11  
Old 09-18-2009, 04:55 PM
mynci321's Avatar
Dynamic Designer
 
Join Date: Sep 2009
Location: NC
Posts: 17
mynci321 is on a distinguished road
Default

Wow, this could be pretty cool. Good luck with the coding!
Reply With Quote
  #12  
Old 11-06-2009, 03:51 AM
Senior Member
 
Join Date: Nov 2009
Location: Belgium
Posts: 320
Models Made: 4
floris2burn is on a distinguished road
Default

Well, when we had to build a robot for school, my lab partner had this huge amount of electronical stuff at home, so it was rather easy to start building our own circuits. This programmable circuit board might be easier in overall.

Enyhow, it might be possible using your own elements (find it in old electronical machines, flea markets, etc)
The stuff you need is relais, batteries having the right voltage for them, some kind of sensors (could be a simple switch like the pickture) (sorry, I can't find the correct English term for this)


With this, and a print circuit, you can build a lot!

For example: the chain lift needs to work when the train enters the ramp:
Just before/at the ramp, there's the first switch. This one works as a "start button". When the train leaves the ramp, there's another switch functioning as "stop button".

If you need a little off delay, you can insert a condensator.

Or to go original, if you need a certain "waiting time" in the station. You could, for example, start a motor that turns a wheel (with opening) or bar (at a wheel). When the wheel makes a full turn, it will operate the contact again. Which stops the motion and also operates another relais, operating the "leave station motor".

The advance of using relais is that the motors can operate at their own voltage (as the relais just operates one or more switches). So for the 3V k'nex motor you can just cut one of it's wires and put the switch in there. Or you can take out the batteries, put wires on the contact plates and use those to make a cicruit with batteries and the switch. (if needed, a seperate battery holder can be used)

Man, you're almost getting me into building it myself XD

Though, if you realy want to go advanced, an electronics shop (not tv, computer store) should have a large amount of circuit boards doing all kinds of things. Little motion sensors, time switches etc.

you realy shouldn't buy expensive plc's or alike stuff to be able to make this.
Though, using something like a plc could make it "easier" to make stuff work automatical. But then there's still the programming...

cheers!

Last edited by floris2burn; 11-06-2009 at 04:08 AM. Reason: added advances of relais
Reply With Quote
  #13  
Old 11-10-2009, 02:47 PM
Maxlaam's Avatar
The one and only
 
Join Date: Feb 2007
Location: Breda Netherlands
Posts: 513
Models Made: 2
Maxlaam is on a distinguished road
Default

Thanks for the huge wall of text,

As of now, the products are in besides the relays, those switches do look a lot more reliable than the photoresistors I have now. They only work during a certain time of the day. I'm gonna see if I can get my hands on those switches. About the motors, I kinda thought what you did, using normal batteries through a relay and hook 'm on the contact plates of the motors. Saves money and wiring and a ton of soldering.

If you can send me a PM with the dutch term of those switches I'll order a couple soon enough, all I need now is a coaster to put the stuff on and code the darn thing. Uhm... I need to contact my nephew xD

I made a simple photoresistor switch that turns on an LED when it reaches a certain luxvalue (light intensity for those who don't know)

I also need to buy a bigger breadboard, right now it's like 5 x 3 cm, which is rather small to integrate LED's buttons and wiring on.

Thanks for your info!!
__________________
Reply With Quote
  #14  
Old 12-06-2009, 05:33 PM
Maxlaam's Avatar
The one and only
 
Join Date: Feb 2007
Location: Breda Netherlands
Posts: 513
Models Made: 2
Maxlaam is on a distinguished road
Default

I announce hereby that project Phase is under construction!
__________________
Reply With Quote
  #15  
Old 12-28-2009, 09:28 AM
Kairah's Avatar
Super Moderator
 
Join Date: Jul 2009
Location: Nederland
Posts: 360
Models Made: 11
Kairah is on a distinguished road
Default

Why didn't you post those video's here? Those gates work perfect! Was it hard to figure out the arduino/programming?
__________________

Click to see my Youtube channel!
Reply With Quote
  #16  
Old 12-29-2009, 05:08 PM
Maxlaam's Avatar
The one and only
 
Join Date: Feb 2007
Location: Breda Netherlands
Posts: 513
Models Made: 2
Maxlaam is on a distinguished road
Default

Woops, sorry, I forgot about this thread after I started building.

Here are the videos and pictures!

Link does not work

Link does not work

Pictures!











The tiredrives is needed to push the train onto the lift. Every part that needs a push in an horizontal direction will be tiredrive, station, brakes.

The programing was easy, until I combined the 2 separate programs into one. It apparently can't multi thread properly. So it keeps running a certain program until it realizes something changed.

I'm going to work with my nephew on the code on new years eve. I will be spending my time there.

As of now I added a loop, but sadly, my batteries died out on me... So expect an update maybe tomorrow!
__________________
Reply With Quote
  #17  
Old 12-30-2009, 06:56 PM
BGTKing's Avatar
Webmaster
 
Join Date: Dec 2002
Location: Midtown Atlanta
Posts: 600
BGTKing is on a distinguished road
Send a message via AIM to BGTKing
Default

Looking impressive so far. Definitely adds more of a feel of realism.
__________________
The K'Nex Forum Webmaster
If you have any questions or need something done, PM me.

BGTGuide | Florida Thrills | SSCoasters
Reply With Quote
  #18  
Old 12-30-2009, 08:55 PM
Coaster105's Avatar
Super Moderator
 
Join Date: Mar 2007
Location: Vancouver B.C
Posts: 431
Models Made: 5
Coaster105 is on a distinguished road
Default

Very cool. It will be great to see it all run at once with the completed ride.
Reply With Quote
  #19  
Old 12-31-2009, 04:07 AM
Senior Member
 
Join Date: Nov 2009
Location: Belgium
Posts: 320
Models Made: 4
floris2burn is on a distinguished road
Default

I wish I could do something like this as end project on school. To bad I'm at this high-school (the 18+ one, like an university) and the final projects will be a lot more difficult and so.. (and it mostly has to contribute with a factory or other school, not some plain knex project)

caus this'd have a lot of potential, programming trough PLC's, or maybe on the computer and using ethernet or the communication ports.
*starts dreaming away*
Reply With Quote
  #20  
Old 01-09-2010, 08:32 AM
Maxlaam's Avatar
The one and only
 
Join Date: Feb 2007
Location: Breda Netherlands
Posts: 513
Models Made: 2
Maxlaam is on a distinguished road
Default

Darn darn darn! The code is completely broken!
I can start all over again!

First thing is that instead of using a delay for the blinking for an LED I used an interval, that works, but occasionally messes up.

Secondly, it seems to confuse Digital pin 1 and 2, those are used to read the state of the switch and dispatch button. It opens the gates when I press the dispatch button and the switch does nothing. I checked, checked, double checked the code for the parts that include those 2 buttons/switches and as far as I can tell they are assigned and wired up correctly!

This confuses me and is giving me a major headache.

All I can do now is start over again and try adding function by function instead of using a semi-premade code and editing that.
__________________
Reply With Quote
  #21  
Old 01-09-2010, 09:16 AM
Senior Member
 
Join Date: Nov 2009
Location: Belgium
Posts: 320
Models Made: 4
floris2burn is on a distinguished road
Default

If the gates are messing up, shouldn't you test the gates seperately with a new program (and save the old one).
And if it comes to coding, I got some experience in visual basic and step7 (Siemen PLC), let me know if you need help with that.
Reply With Quote
  #22  
Old 01-09-2010, 03:05 PM
Maxlaam's Avatar
The one and only
 
Join Date: Feb 2007
Location: Breda Netherlands
Posts: 513
Models Made: 2
Maxlaam is on a distinguished road
Default

I can send you the code if you want to. Currently it SEMI WORKS.

The gates are fixed, but the program that controls the dispatch cycle is acting weird. It randomly starts running and it randomly stops. I have no clue what is going on, in theory all the code is doing what it should do, but it really feels like something is acting up in the chip.

There is a slight chance something is making a short...
__________________
Reply With Quote
  #23  
Old 01-17-2010, 02:44 PM
Maxlaam's Avatar
The one and only
 
Join Date: Feb 2007
Location: Breda Netherlands
Posts: 513
Models Made: 2
Maxlaam is on a distinguished road
Default

Vlog!

Link does not work

Link does not work
__________________
Reply With Quote
  #24  
Old 01-18-2010, 03:03 PM
Kairah's Avatar
Super Moderator
 
Join Date: Jul 2009
Location: Nederland
Posts: 360
Models Made: 11
Kairah is on a distinguished road
Default

Nice progress... I'm just wondering, did you make a SFC (Sequential function chart) before you made the program? We have to use them at school and they can be really helpfull to determine what your program must do and how to make/change it.
__________________

Click to see my Youtube channel!
Reply With Quote
  #25  
Old 01-20-2010, 03:24 PM
Maxlaam's Avatar
The one and only
 
Join Date: Feb 2007
Location: Breda Netherlands
Posts: 513
Models Made: 2
Maxlaam is on a distinguished road
Default

I didn't use any charts besides the examples at arduino.cc I might do it later if I can find a nice program to make it easy.
__________________
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 02:15 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2
Copyright Knexforum.com 2009