Geoff Bunza geoffb
Aug 03, 2022 · Edited

Geoff Bunza's Journal/Blog Index




Authored Topics of Interest

Authored Model Railroad Hobbyist Articles

Geoff Bunza's Blog Index: https://mrhmag.com/blog/geoff-bunza
More Scale Model Animation videos at: https://www.youtube.com/user/DrGeoffB
Home page: http://www.scalemodelanimation.com

Reply 2
Nick Santo amsnick

Thanks Geoff!

Thank You very much for your contributions and now for their organization!  I have enjoyed and used your thoughts a lot over time!

Thanks again!

Nick

https://nixtrainz.com/ Home of the Decoder Buddy

Full disclosure: I am the inventor of the Decoder Buddy and I sell it via the link above.

Reply 0
Geoff Bunza geoffb

@Nick

Hi Nick,

Many thanks for your kind comments. "Glad you are enjoying the projects!
Have fun! 
Best regards,
Geoff

Geoff Bunza's Blog Index: https://mrhmag.com/blog/geoff-bunza
More Scale Model Animation videos at: https://www.youtube.com/user/DrGeoffB
Home page: http://www.scalemodelanimation.com

Reply 0
canuk5838

Help with Arduino controlled Servos for turnouts

Hi Geoff,

Your probably tired of this subject by now but I could really use your help to try and tie a lot of loose ends together.

I have downloaded the zip file for the arduino sketch but have had a lot of trouble getting it to open. when I do I get all kinds of error messages that the servo h file does not exist. But I can see it in the tab???

---------------

What I'm trying to do.....I have your pic of the circuit....I have the UNO R3 and have an Adafruit servo shield to attach the servos. I have made a small board with all the resistors and connections.

Not sure if if the Adafruit board will require any special programming.

Also I have the added array lines that would be required for bi color leds and I would like to use N/O push buttons.

I know you have published all this stuff but I have a lot of trouble relocating the info because of all the related posts that are in the threads. I know its all good info but it really gets confusing.

The program is my biggest problem right now. I'm sure once the Uno is programmed I can handle the rest of it...

I'm not a programmer (obviously) and could really use some expert guidance.

Hope to hear from you

Thank you

Vic Nelson

Reply 0
Geoff Bunza geoffb

@Vic re:Issues

Hi Vic,

I'm never tired of good questions from friendly modelers. Unfortunately you have left out way too much info: What sketch are you referring to and what article did you find your material in?

Switched servos were covered early on in the December 2016 MRH article on a Modelers Intro to Arduinos. To support sketches like Switched_8_Servos.ino which were in the article additional materials you would need to put the SoftwareServo library folder into your .../Documents/Arduino/libraries/ folder not into the  .../Documents/Arduino/ folder where the Switched_8_Servos folder containing Switched_8_Servos.ino needs to go.

The fact that the servo h file does not exist. But I can see it in the tab shows that you put the wrong library in the wrong place. You can download both folders in this zip:  /sites/model-railroad-hobbyist.com/files/users/geoffbfiles/Vics_files.zip

I have the added array lines that would be required for bi color leds and I would like to use N/O push buttons.
I can't help you if you do not provide all the things you modified. Add via zip file or copy and paste, please. Undoubtedly, to support bi-colored LEDs you will need another Arduino pin per servo, too.

Last, this blog index is precisely the wrong place for you to ask questions expecting help. Please post your questions in the comments of the appropriate article. Alternately, you can also send a PM (Private Message) via this Model Railroad Hobbyist forum, by clicking on GeoffB in my post and then click Contact.

Have fun! 
Best regards,
Geoff Bunza

Geoff Bunza's Blog Index: https://mrhmag.com/blog/geoff-bunza
More Scale Model Animation videos at: https://www.youtube.com/user/DrGeoffB
Home page: http://www.scalemodelanimation.com

Reply 0
railandsail

private email

Hi Goeff. as i am sure you are aware the private email feature is turned off at the moment.

i have a question for you that i would want to keep private. Could you send me a private email i could respond to?
railandsail           at          gmail

Reply 0
Tom Sullivan narrowgauger
Geoff,  I'm building a very simple garden railway (Irish 3' narrow gauge using LGB 45mm track).  I'd like to run my engines with battery, no decoders/sound and a very simple speed control and reverse.
Just like to watch them run.......
Thanks in advance for any advice or point me in the right direction.  (I can solder). 
Reply 0
Bernd
Geoff,  I'm building a very simple garden railway (Irish 3' narrow gauge using LGB 45mm track).  I'd like to run my engines with battery, no decoders/sound and a very simple speed control and reverse.
Just like to watch them run.......
Thanks in advance for any advice or point me in the right direction.  (I can solder). 


Check out the Deltang R/C controllers made in England. LINK:  http://www.micronradiocontrol.co.uk/rx_dt.html

Bernd

New York, Vermont & Northern Rwy. - Route of the Black Diamonds - NCSWIC

Reply 1
Tom Sullivan narrowgauger
Thanks Bernd......I'm familiar with Deltang (following Rik's blogs)......don't think Deltang is still be imported to the US but I may be wrong.
If anyone knows a US supplier would they please let me know......thanks in advance.....tom
Reply 1
Bernd
Thanks Bernd......I'm familiar with Deltang (following Rik's blogs)......don't think Deltang is still be imported to the US but I may be wrong.
If anyone knows a US supplier would they please let me know......thanks in advance.....tom


I purchased from Micron Radio a couple of months ago. No problem getting the R/C's. I think there was one dealer in the US way back. I don't think they are in business anymore.

Bernd

New York, Vermont & Northern Rwy. - Route of the Black Diamonds - NCSWIC

Reply 1
Tom Sullivan narrowgauger
Thanks Bernd.....I'll chec k with Micron Radio.  
Reply 1
MarkCritical
Hi Geoff,
Sorry to bother you with a silly  issue. i have  Arduino mega with a sensor shield. i have downloaded your sketch 'JMRISensorScanMega' and the 'Sensor San. py' (latest versions with the correct com port). i have followed the order of events as in an earlier reply. 

I hooked up a sensor to the sensor shield  (V2.0) and but can see no changes in the JMRI, i followed the 'Little Wicket' you tube, I have tested all components and they are all working correctly. I have also run a test software in the Arduino to see the sensor change using serial monitor.

is there any current issues with windows 10, JMRI or Arduino, that would cause an issue.
(I'm very new to all this , there doesn't appear to be any way to get training on this other than  copy paste scan through and try to follow what someone like yourself has written).
Reply 1
Geoff Bunza geoffb
Hi Mark,

is there any current issues with windows 10, JMRI or Arduino, that would cause an issue.
(I'm very new to all this , there doesn't appear to be any way to get training on this other than  copy paste scan through and try to follow what someone like yourself has written).

There are no outstanding issues with Win 10 or otherwise, as this is known to work correctly.
Here are some points to carefully consider:

1. The sensor table needed to be set up and saved before running the sensor scan script to make it all happen.

2. The sensor channel port to the Arduino USB serial channel must never appear in the JMRI "Preferences" for any connection. The script itself opens the port and JMRI (java?) has always been precisely finicky (that's a technical term) about serial ports. The sensor channel USB connection goes directly into JMRI, and bypasses everything except the script and the sensor table. You can have multiple sensor channels, all independently feeding parts of the sensor table. The idea was to enable a very large quantity of sensors and make them available to JMRI. The same goes for the turnout channel(s) to enable large quantities of data out of JMRI.

3. Editing the scripts to include the COM channel must be done with an editor that does not add invisible formatting characters to the script. Notepad++ is great for this and is a free download. Never use tabs in the script, only spaces. Spacing is jython specific and is critical. Do not reformat the scripts or change the spacing of script statements.

4. You cannot run the Arduino IDE serial monitor simultaneously with running the sensor channel. Once you know the COM port definition for the Arduino sensor channel, shut down the Arduino IDE and leave the Arduino plugged in -- unmodified.

5. The order of operation should be Arduino sensor Channel plugged into USB, JMRI start, Sensor table set up and open, Sensor script start, sensor table is initialized and operating with the sensor channel.

6. If you are using DCC++ or DCC++EX, the sensor channel to the Arduino needs to be a separate USB Serial Port to a different Arduino,
not the Arduino running DCC++.

7. Make sure you are using the newest script revision (Rev2) here:     http://mrhpub.com/files/users/geoffbfiles/JMRI_Channels_Rev2.zip
You can find a more detailed explanation here:  SMA28 JMRI Sensor Channels – Direct Arduino to JMRI Communications - Simple Support for Lots of Detectors
https://forum.mrhmag.com/post/sma28-jmri-sensor-channels-%E2%80%93-direct-arduino-to-jmri-communications-simple-support-for-lots-of-12210793

8. Please direct all future questions to the SMA28 article comments above. Questions and Comments are inappropriate here.

Have fun!  🙂
Best regards,
Geoff Bunza

Geoff Bunza's Blog Index: https://mrhmag.com/blog/geoff-bunza
More Scale Model Animation videos at: https://www.youtube.com/user/DrGeoffB
Home page: http://www.scalemodelanimation.com

Reply 0
Reply