cteno4 Posted April 19, 2021 Share Posted April 19, 2021 It’s basically built on top of C++, but with many prebuilt functions and libraries and scads available on the web. It’s pretty intuitive, but not wrapped in a more friendly structure like a HyperTalk language. For something like this you probably would not need to write any C as I’m sure there are enough sitting around to modify to do simple digital ons and offs. Just need to set the system to start a new loop after each on/off to the opposite in a set/random amount of time. lots of places to start from https://makersportal.com/blog/2018/2/2/arduino-randomly-blinking-multiple-leds-with-only-9-lines-of-code https://www.factoryforward.com/random-led-patterns-arduino/ for long on/off may work to set up an array for future time to flip on/off and reset next flip time then a loop checking time, I can’t remember how the events work that well, c was 4 decades ago for me. great thing for super simple things like this the nanos are great and now the AT Tiny do it on one tiny chip! I was dreaming of a little pcb that would have an ATtiny and circuits for like 4-6 leds, each with a smd limiting resistor and a SMD trimmer pot to adjust brightness. Probably could be about an inch square. The IO ports and power pads take up most of the room! https://www.instructables.com/Program-ATtiny-Chips-with-Arduino/ It’s funny as computer “languages” are a form of language but more like a logic structure which my dyslexic brain loves and finds little of in spoken languages but computer languages speak well to the dyslexic “symbolic logic” brain structure. What throws me a huge curve in lower level languages is small syntax errors of a character that I read right thru I think from my brain’s compensation with reading written language and just pulling meaning from and ditching a lot of the word and writing structure. Even when the programming editor says tilt in red on something I can stare at it thinking no that’s right and have to really stop myself and reset to see the error in my brain. Anyhow it’s on my todo list to jump onto arduino here at some point when I have a little chink of time to focus on it. This is a perfect little project for it! so keep a little extra wire on your led leads in the building so you could wire them onto a nano or ATtiny later! cheers jeff 1 Link to comment
Martijn Meerts Posted April 20, 2021 Share Posted April 20, 2021 You can also program in things like fluorescent light tubes turning on for office buildings / stores, or use an RGB LED to simulate a house where the TV is turned on etc. There are also components that had this already built-in and can be controlled using DCC, so that's another option. This is also a good way to trigger for example lights on a level crossing, since you can use a layout control software to trigger the lights if a train is in a certain block. 2 Link to comment
gavino200 Posted April 24, 2021 Author Share Posted April 24, 2021 I just finished my "Getting started with Arduino" book. The exercises were fairly simple but I played around with the programs, altering the variables in every way I could think of. It's kind of fun and less intimidating than I expected. I can't really "write" any but the most basic code, but I feel fairly confident about building circuits controlled by an arduino and/or altering existing script to specific needs. I think I'll have a go at making a loco speedometer. I might try to copy the one showcased by @Madsingin his shin-yukari blog. I could use one of these for my automation and I'm looking for an arduino project to learn from. I'll also focus on some LED projects. Perhaps signals or building light control. I'm quite looking forward to it. If there isn't a suitable thread in the DCC forum I might start one. 3 Link to comment
Madsing Posted April 24, 2021 Share Posted April 24, 2021 Don’t hesitate to ask if you have any question! 1 Link to comment
Sheffie Posted April 24, 2021 Share Posted April 24, 2021 Send me an example of the code? I’d be interested to take a look at it... and maybe I could come up with some suggestions. (I’m a professional coder) 1 Link to comment
Madsing Posted April 25, 2021 Share Posted April 25, 2021 My Arduino and Raspberry Pi projects are here: https://github.com/madsing98 In particular, the speed display project's code is here: https://github.com/madsing98/Yukari-Speed-Display 1 Link to comment
gavino200 Posted April 26, 2021 Author Share Posted April 26, 2021 On 4/24/2021 at 12:52 AM, Madsing said: Don’t hesitate to ask if you have any question! I ordered the components today. The TCRT5000s look like they'll be useful for precision stops also. I ordered a few of the optical sensors without the boards, too, to use with my Digikeijs optical sensor module. I'm going to divide my Arduino experimentation into to main branches. On the one hand I'm going to try to simply mimic complex projects like this speed meter of yours. I'm going to try to copy it using only the information and photos on your blog. On the other hand I'm going to work on small simple projects where I'll try to understand the code completely, and improvise as much as possible. I ordered a book about writing code for LED projects. This will be perfect for me (I hope) as LED projects are a big part of what I want to do with Arduino. https://www.amazon.com/dp/1490980679?psc=1&smid=ATVPDKIKX0DER&ref_=chk_typ_imgToDp I'm also going to be looking for internet based lighting projects. My long term goal will to eventually incorporate OLED and video displays into my modelling. That captured my imagination from the first time I saw it done. What you have achieved in Shin-Yukari is a huge inspiration. If I eventually achieve anything a fraction as cool as that then the learning journey will be worth it. 2 Link to comment
jskirwin Posted May 2, 2021 Share Posted May 2, 2021 Anyone consider using fiber optics? I have a Dwarvin system I'm sitting on until I have enough buildings to use it on. Link to comment
cteno4 Posted May 2, 2021 Share Posted May 2, 2021 2 hours ago, jskirwin said: Anyone consider using fiber optics? I have a Dwarvin system I'm sitting on until I have enough buildings to use it on. yep i used them a lot when I was young for detail lighting like streetlights, wall lights, etc, especially then when there were no tiny SMD leds as alternatives. Still really useful in those situations where you want a really tiny pinpoint light or someone like a marque where you have chasing lights as you can much more easily run fiber optics to a line of lights and just bundle them back to like a half dozen leds to then light them with alternating flashing to give various chase effects or color changes. This would be a really hard thing to do with individual SMD leds and fiber optics can do a more or less prototypical light bulb in scale. jeff 1 Link to comment
gavino200 Posted May 2, 2021 Author Share Posted May 2, 2021 3 hours ago, jskirwin said: Anyone consider using fiber optics? I have a Dwarvin system I'm sitting on until I have enough buildings to use it on. I have some optical fibers that I'm holding onto waiting for a need/opportunity. Recently, Tom used some on his Akita mountain layout to make a small shrine lantern. While not exactly the same thing, I've experimented with home made light guides, made from clear plastic box material. Madsing has also used clear plastic to make a very elaborate effect on the front of his Station/Retail building. Links below. What's Dwarvin? Is it this? https://shop.dwarvenforge.com/ I'd love to hear about your results as you forge ahead. Feel free to post the techniques here even if they're gaming rather than train related. The modeling is essentially the same. These are my homemade light guides. There's a simple LED behind them. 3 Link to comment
jskirwin Posted May 3, 2021 Share Posted May 3, 2021 Quote What's Dwarvin? https://www.dwarvin.com/ I saw them profiled in Model Railroading and gave them a try. I have their Lamplighter 2S starter kit under a growing mound of structures I'm buying from Hobby Search. 1 Link to comment
gavino200 Posted May 3, 2021 Author Share Posted May 3, 2021 This product seems like it could be useful. https://www.dwarvin.com/collections/n-scale/products/copy-of-fiber-coupling-kit-for-1-5mm-fiber 1 Link to comment
cteno4 Posted May 3, 2021 Share Posted May 3, 2021 With heavier duty fiber optics you can light structures and even split a single trunk fiber int a number of smaller ones to light individual rooms in a structure. Heat shrink works pretty well for jointing fibers. Downside is fiber is a little harder to snake around in a structure as it can’t bend really tight without doing some thermal forming with it. You can make couplers for unplugging structures. You can dim and diffuse them at the end with a bit of translucent plastic or paint (gallery glass is great for this). I had good luck making several different end “bulbs” as a kid for different lights. Modern street light I cut the end off at an oblique angle and painted a tiny bit frosted nail polish over it to sort of make those oval street light lens. For the old hat lamps over doors I put a 3mm sequin for the lamp shade and got the end of the fiber hot and smooshed it to make a sort of flat disc the sequin sat over and it cast a nice circle down not too bit, not too small. For interior where I wanted a more diffused light (like a naked light bulb) I heated the end until it sort of made a little tear drop that would diffuse the light from coming straight out the end of the fiber. I remember playing with some plastic translucent beads to diffuse the light. Most of this I did just before I started college and stopped doing more trains for quite a while. im just use to wiring more and easier for the big lighting to fit in better and bend and run wires where easiest. Love the fiber for the little details. Easy to have a led in a structure light a little bit of led for a speciality detail like a lantern and not having to try to get the led into the lantern and hide the wires. jeff 4 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now