Friday, 11 September 2015

Project Number 2: The model railway

 

The 2nd project i’ve embarked upon, a far longer term project than the clock is building a model railway, with an arduino at the heart of its operation. The overall idea is to have a system where all the trains, accessories and extra bits can be run through a timetable, whilst if I want to, i can take manual control of the trains/points and the accessories such as signals can still react to what i’m doing.

As you can probably tell this is quite a large undertaking, probably requiring some serious planing and thought. however I have the space and time to do it, so here is what i think needs doing.

#1 Reactive track side accessories.

By this I mean Signals, crossings, anything that reacts as a train goes past. Individually these are pretty simple to do: sensor -> detect train -> change signal/crossing -> wait x seconds -> change back. Even when you want to link up multiple sensors it’s mostly simple, just change out the “wait x seconds to detect train on 2nd sensor -> change 2nd sensor to red, change previous to yellow/green. Overall i think this will probably quite a simple section to implement however, maybe slightly harder depending on the number of signals that i have to play with.

 

 #2 Lighting

this should be the simplest section to implement, however it will probably be the last as its something that would need to be done once everything else is in place. Mostly it would just be a group of LEDs set to turn on and off over time, perhaps setting them up in banks so they stagger on during ‘nighttime’ rather than all coming on at once.

#3 Points

so the simple things about points is that they’re operated by a switch and it changes the tracks direction (assuming you have the motor and all relevant parts). it gets more complicated when you try and sync it up to the signals in order to ensure no head on collisions (such as a station). I think initially i’ll start with just getting the points working (again a later task once i get the track in place) and then work on the more complicated stuff once i have a better understanding of the code.

#4 Trains

The Fun Part! yep, because theres nothing better than having a model railway than running the trains. I’ve actually already accomplished this part and i’ll fill in the details later when I get home and remember what part goes into where. It did involve a potentiometer which was quite fun.
So yeh thats the 2nd of the 3 projects i’m currently working on at the moment. As i’ve said in both this and the previous blog, i’ll add pictures/code/media up when i’m home and on a better internet connection.
Thanks for reading.

Time. Model Railways. Cosplay.

So. I’ve actually started doing this. I’ve been thinking about this for a while and now i’m on holiday, i’ve finally got round to it. Woo! Spare time!
As you’ve probably guessed this is a blog about Arduinos, particularly my projects using an Arduino but may be involving other computing parts.

My Projects

#1 Clock.
The initial idea is to have 12 LEDs in a circle representing the hours of a clock, and lighting each one as that hour starts. Simple, but a good starting project and one that i can expand once i learn more.

Currently, i have the clock built out of lego and i’ve wired it up. Using quite a simple 1 pin to 1 led to 1 resistor, as i said it’s simple and needs refinement but that can come later. Walk before you run i think is the phrase.

For the code, i’ve got a simple ifElse statement running at the moment to ensure that the time.h library is actually working and that i’ve got the basic concept of telling the Arduino to read the time.

From here i think my plan will be to get the clock running as a 12 hour clock, before working out how to set the correct time for the clock. Finally, when i know more, i’ll look into adding more LEDs in order to incorporate a minute hand.

I have 2 other projects that are ongoing at the moment, firstly incorporating an arduino into a model railway set up and 2ndly creating a Tron cosplay (based off the newer movie) that can go either red or blue/white and do other cool stuff, this one is going to take a while as i have to plan and learn a lot more in order to get it going.

That’s all for now, i’ll work on getting photos/code/extra bits up in the coming weeks. Probably when im back home.

Hope you enjoyed reading,
see ya soon.