pierre52

Our club exhibition layout is a work in progress and on one of the 16 modules we decided to feature a Bar Mills kit “Hunch Landing” (a small fishing wharf/harbour). 

20Kit(1).jpg 

The module also hosts one of the exits from staging and this needed to be concealed with a deep cutting/tunnel. 

As we worked on the terraforming of the cutting one of our members suggested that the hill would be a perfect location for a lighthouse.  With that little seed planted the next obvious suggestion followed that it should be a working lighthouse.

The Walthers “Rocky Point Lighthouse” sprang to mind but with none of these available in New Zealand we searched for an alternative.  One of our local suppliers had a suitable Kibri kit of an HO lighthouse.

ri%20Kit.jpg 

Although one of the two options with the Kibri Kit included an LED beacon, Chris our electronics guruEG.jpg elected to take on the challenge of making a “proper animation”.

The remainder of this blog will show how we went about it and include a copy of the arduino sketch .

Peter

The Redwood Sub

Reply 0
pierre52

Plug N Play

As each of our modules has to be stored in a frame between shows, we have a scenery height limitation.  With the lighthouse sitting halfway up a hill,  the top of the lighthouse came dangerously close to exceeding that limit.   We therefore elected to make the top part of the lighthouse structure removable. 

After a bit of consideration we figured that we could use a ten pin plug and some 3D printed parts to modify the kit and make it Plug n Play.   We had used the same technique for our working signals so it didn’t take long to conjure up the first prototype.  

e%203(1).jpg 

LH%202.jpg 

Meanwhile Chris had manufactured an array of 16 LEDs.  He used  0802s on the top and 1206s on the bottom to give the necessary cone shape. 

D%20Blob.jpg 

The blob was held together with Microscale Kristal Klear (our go to for all LED work in tight spaces as it is both flexible and insulating).  In this case however the Kristal Klear may not have been the best choice as getting the array to stay together in a workable shape while soldering the 8 pairs to their respective leads proved to be a nightmare. 

While Kristal Klear can also be used to make great lenses it does take awhile to dry. We have found Aliphatic woodworking adhesive to be a great alternative for keeping small wires and LEDs in place as it dries in less than 30 minutes and is a lot easier to use than hot glue.

The lighthouse has a common positive lead and eight signal lead connections  to the AccD.  On the plug, the two central pins are the common positive so if the light is plugged in the wrong way round no damage will be done.

Peter

The Redwood Sub

Reply 0
pierre52

A purpose designed Accessory Decoder

Chris has also designed our own version of LCC for lighting and animation control.  To avoid confusion we call our board an “Accessory Decoder” (AccD).

LHC2.jpg 

The AccD he has designed  has an onboard Arduino and uses the Arduino I2C protocol to communicate with our main module control boards and JMRI. Thus every animation on the layout can be synchronised with train movement and/or controlled by the dispatcher.  

Essentially, it is an Arduino Nano with a Universal Shield.  There are two regulators, one to power all the outputs and the other runs the CPU.  There are screw terminals on every pin.  It can run stepper motors and 500mA loads without any additional hardware.

Peter

The Redwood Sub

Reply 0
pierre52

Testing Times

At this point a test rig was manufactured to check that all the parts would play together nicely.

0Rigs(1).jpg 

g%202(1).jpg 

Initial tests proved the concept and code would work but with a small re-design of one of the 3D prints and a few changes to the code we think we now have it about right.

Sorry but having real problems trying to embed the code so here is the link:
 
 
This has mostly been done under the limitations imposed by Covid 19 so we have yet to get all the components and modules together in one place.  Since total lock down we have had to resort to “letterbox” exchanges of parts and sanitising everything as we go.
  

Peter

The Redwood Sub

Reply 0
pierre52

Arduino Code

Here is the Arduino code for anyone interested:

//Code to control an array of 8 pairs of  LEDs to simulate the slowly rotating beacon in a Lighthouse.

// Chris Wilson Apr 2020

 

#include < SoftPWM.h>
#include < SoftPWM_timer.h>

const byte LHLeds = 8;                      //Number of LED pairs in array
const byte LHPins[LHLeds] = {2,3,4,5,6,7,8,9};   // assign LED pairs to pins
byte LHcounter = 0;
const byte MaxPWM = 50;
//unsigned long LHInterval = 100; // delay in ms
//unsigned long LHPrevmillis;
 
void setup() {
  SoftPWMBegin();
  for (int i=0; i< LHLeds; i++){
    //pinMode(LHPins, OUTPUT);
    SoftPWMSet(LHPins, 0);
  }
  SoftPWMSetPercent(LHPins[7], MaxPWM);
}

void loop() {
  for (int i=0; i< LHLeds; i++){
    //LedOn(LHPins);
    int led2TurnOff;
    if (i==0) led2TurnOff=7;
    //else if (i==1) led2TurnOff=7;
    else (led2TurnOff=i-1);
    LedOn(LHPins, LHPins[led2TurnOff]);
    //delay(500);
  }
  if (LHcounter < LHLeds-2){
    LHcounter++;
  }
  else {
    LHcounter=0;
  }
}

void LedOn(int ledpinOn, int ledpinOff){
  for (int i=1; i< MaxPWM+1; i++) {
    SoftPWMSetPercent(ledpinOn,i);
    SoftPWMSetPercent(ledpinOff,MaxPWM-i);
    if (i< 10) delay(25);
    else delay(8);
  }
}

 

Peter

The Redwood Sub

Reply 0
Onizukachan

Really nice work and thanks

Really nice work and thanks for including the sketch! 

Reply 0
pharmd98233

A working lighthouse

This is an excellent revision to conventional lighthouse electronics and worthy of an article in Model Railroad Hobbyist.

Thank you for your work!

Reply 0
JC Shall

Good Video

Peter, thanks for providing the video.  The results of this effort were good, and I think are convincing.

Reply 0
Geoff Bunza geoffb

Great Job Peter!

Hi Peter,

Nicely done. Thanks for sharing your work. Might you post a short video of the operation.
I am curious to see the effect.

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
pierre52

Thanks

Thank you for the kind comments.  This has been a fun project and a great team effort. It highlights the benefits of joining a club where the collective skills of individuals can be successfully blended.

Peter

The Redwood Sub

Reply 0
pierre52

Video

Hi Geoff

I endeavoured to embed the video in an earlier post but failed miserably.  So instead I posted a link.  Here it is again for you:

Peter

The Redwood Sub

Reply 0
Pennsy_Nut

You Betcha!

A terrific job. Glad you had others to help. Made it a lot easier, didn't it? Keep up the good work and do post pictures of the finished project.

Morgan Bilbo, DCS50, UR93, UT4D, SPROG IIv4, JMRI. PRR 1952.

Reply 0
Geoff Bunza geoffb

@Peter

Hi Peter,

OK, got it. I am not super familiar with light houses, but that rotation rate seems a little fast.

Again, very nicely done. 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
FernandoBellini

Very nice!

Hi Peter amazing job! Here is the embedded video. I agree with Geoff that a slower motion would make it even better. 

 

Reply 0
jeffshultz

Rotation speed

Somewhere between 1/2 and 2/3rds as fast as that one is going should have it nailed. Even at that speed it looks amazingly smooth. 

orange70.jpg
Jeff Shultz - MRH Technical Assistant
DCC Features Matrix/My blog index
Modeling a fictional GWI shortline combining three separate areas into one freelance-ish railroad.

Reply 0
Ron Ventura Notace

Two articles here.

I agree that the lighthouse deserves, no, demands an article in MRH. But I think that board that Chris designed is also worthy of an article. Not so much an in depth design and build, as that may be too technical for many of us, (certainly me, an electronics nuff nuff) but an overview of what Chris set out to achieve, and a rundown of the capabilities and how the board might be used in other projects. Is there some way others could get hold of those boards for their own projects? I’m not suggesting Chris should give away his design, but maybe a charge for the files which could then be sent to one of those board fabrication companies. (Gerber files?). Just a thought.

Look out Geoff Bunza, you’ve got a rival in NZ. 

Ron Ventura

Melbourne, Australia

Reply 0
Geoff Bunza geoffb

@Ron

No Ron, never a rival... just another young grasshopper that will go on to do even greater things. 

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
pierre52

Speed vs smoothness

Yes it would be good to get the speed slower but that can be at the expense of smoothness.  There are a number of variables that can be adjusted and we are continuing to experiment to get the right balance.

We have dropped from 4 LEDs on at a time to 3. Note here that each of those strips of 2 is at a different light intensity.  One pair fading in, one at full intensity and the third fading out.  
 
We have also slowed down the 0 - 10% duty cycle pauses so that the light fades  on and off smoothly.  When an LED pair is at 10% duty cycle it is putting out 80% of its light so the first 10% has the greatest effect on the brightness.

Chris has also suggested that it looks much better in person.

 

We will keep you updated as the experiment continues.

Peter

The Redwood Sub

Reply 0
pierre52

Articles

Ron we aren’t even close to the talent that my good friend Geoff demonstrates on a daily basis.  Rather, this grasshopper continues to “wax on, wax off” at the feet of the master.  I have no plans to submit an article on any of this.   Instead I prefer to follow Dr Geoff’s example and provide whatever detail people need here on this Blog. 
 

Similarly, our Accessory Decoder is nothing new.  It is just a different form of amalgamating various open source Arduino based concepts into a single board.  It was designed to meet the somewhat unique needs of our modular layout.  We only have 3 connections between our modules (DCC Bus, 22v ACC Bus and Loconet).   It may not offer any advantage over an Arduino and DCC shield that others would find more versatile.
 

We have no problems with sharing our designs and files. Once again, I am following the example  of Dr Geoff by sharing what we have but very much staying clear of getting into selling boards, kits, or fully made up items. 
 

The whole subject of Layout Command and Control is an extraordinarily complex beast and I suspect everyone has their own very specific and unique ideas about how they want to slice an dice their own  beast.  The best we can do is offer ideas and examples that others may or may not find helpful.  If you think we can help your specific project then feel free to ask.

Peter

The Redwood Sub

Reply 0
Steve Watson SteveWatson

Excellent

My wife and I took on the task of animating a large scale lighthouse for the guy who hosts outdoor ops during the summer, so it's very useful to see the approach someone else has taken.

Reply 0
ackislander

About lighthouses

I live on Nantucket Island about thirty miles off Cape Cod.

We have three active lighthouses. Two of them are navigation lights that help ships avoid the many offshore shoals.  These are the tall lights like the one on your Kibri box. You have done a great job, by the way, of representing the shape of the fresnel lends that projects the light.

The good news is that navigation lights rotate at a different rate so mariners will know where they are:  once a minute, twice a minute, three times a minute.  It tells on the chart.  Anything flashing within those parameters would be prototypical.

The other kind of light is a Bug Light. It is a short light that marks the navigation channel into a harbor.  These have been replaced functionally by combination radar and light reflectors,  But ours continues to operate and may house our foghorn. 


In New England, the roof and top section of the light, down through the railing and a bit below, would be painted black as would the mullions that separate the sections of glass around the lens. In some cases, the bottom section of the shaft — maybe 1/8 — would also be painted black. The rest of the shaft would be white. 
 
If you use the Coast Guard building in this kit or the Walthers kit, the roof would be a darkish red, like the old Pactra Hull Red. The building  could be brick, clapboard or shingles, painted white, and the windows and doors would be painted a medium/dark gray green.  I checked with a Coast Guard lifer who remembers these colors at least going back into the 1970’s

The building is going to take some heavy kitbashing if you use it  The roof should be a simple gable.  The  Walthers building has a lot of other names, so you may be able to find it and repaint it.  But no building is required.  

Our bug light has been offered in a kit and was used by Iain Rice in his MR build “Roque Bluffs”.  The light is on Brant Point (brants are a kind of goose) but the Milwaukee boys edited it to “Brandt Point”, much more German, appropriate to Wisconsin.

Hope this helps  I know that lighthouses in other places are different, but these colors fit well with the Bar Mills kits.

Reply 0
pierre52

@ackislander

Thank you for that most useful prototypical information.  I had a feeling in the back of my mind that lighthouses had different light flash timings a bit like the morse code identifier on aeronautical navigation beacons.

You are right about the keepers cottage.  It is very much "European" style.  We have little room left on this module so I doubt we will use it.

The detail work on the structure is a work in process so your colour notes are most helpful for completing the finish layers.  Being a club exhibition layout we follow the rule of "somewhere, sometime USA"  and the 1 metre rule as that is the closest the pundits will get. If it looks good at 1 metre then that is "good enough"

Peter

The Redwood Sub

Reply 0
kelvin heads

Lighthouse

This is a great article. Thanks. Out of interest what club do you belong to?

 

Kelvin

Reply 0
pierre52

@ Kelvin

Same one that you have just joined Kelvin.  Catch up with you on the other side of lock down

Peter

The Redwood Sub

Reply 0
Oztrainz

So if...

Hi Peter, all

so if you were to modify the Arduino sketch so that: you have 2 lots of leds that flash, but unevenly spaced around the circumference of the light base, this would give an uneven flash timing as each set of lit leds appear to rotate inside the lighthouse top??

As for lighthouse keepers houses, some over here in Australia were quite ornate. If the lighthouse was in existence before a centralised authority took over lighthouse building and maintenance, perhaps the keeper's house doesn't have to be "de-europeansied" because the earlier lighthouses were a source of local pride, often built with some significant architectural flourishes, like this one

Regards,

John Garaty

Unanderra in oz

Read my Blog

Reply 0
Reply