Skip to main content

@BillYo414 posted:

You gotta be pumped for three in a row! That's a great streak!

Thanks Bill!  I am.  Seems like I've been trying to run in waist-deep mud the past few weeks - missing either this critical component or that one, struggling to make those **** Dupont fasteners, and just doing a lot of wheel spinning.  Finally all the research and testing has paid off in some serious forward progress.

George

George.....it was good to see you at York.....it was also funny to say out loud....."I've got to get this smokestack picture to George", and, at that very instant we realized that we were standing next to each other!

E4D1DEBD-C235-44AC-BD40-6A7353C5AABE

Peter

Peter,

Remember how I said this stack was close to the Federal Paperboard stack?  Well, I don't have a good photo of that stack (just remembered how it looked).  There don't seem to be any photos of it around.  Thanks to a reference librarian in Steubenville, I know about a YouTube video of its demolition.  While short, the video tells me several things:

  1. The stack was made of brick.  I also recall that it said "F E D E R A L" along its length.
  2. It was painted a cream color with a brown top.
  3. The Altoona Model Works stack is probably a good stand-in for it.


https://www.youtube.com/watch?v=koAsbDHslQM

It's pretty cool how one little thread of knowledge can lead to more information and eventually a useful discovery.  So, thanks again for putting me on to that Altoona Model works smoke stack.

George

Updated 5/21/2022:

Every so often, you have to go backwards to make some forward progress.  Here's last week's roundup of activities:

  • As you may know, there are 4 furnaces in my Open Hearth model - #11, #12, #13, and #14.  The plan is to have each animate a different set of activities in the Open Hearth process.  The animations are carried out on an Arduino MEGA 2560 processor running a C program I am writing.  To date, I have finished the bulk of the Furnace11 code (at least the logic for invoking the relays) but I'm not particularly happy with it.  It’s convoluted.  I’m leaving the MP3 player logic until later.
  • I then moved on to try writing the Furnace13 code which is the most complex.  Keeping track of the “{“ and matching “}” (in the C programming language) motivated me to search for a pretty-printer and a way of matching parenthesis.  The answer was moving to the 2nd version of the Arduino IDE (Integrated Development Environment).  It also has a debugger, which I’ve yet to try.
  • I got well into the Furnace13 state logic and decided it was becoming too big, too complex, and too unwieldy.  There's a lot of potential for logic errors.  Looked at YouTube and found a task scheduler tutorial.  SchedTask seems to be the correct choice.  I am investigating this more fully, but it looks very promising.  Using the Task Scheduler will simplify the code, removing most of the state machine logic, improving comprehension, and making it easier to maintain.  Using it will allow me to build small, simple functions to perform specific tasks and control their use.
  • Ordered and received a long (25’) USB A-B cable for programming the Arduino. While it lets me connect my development computer (in the workshop) to the Open Hearth base in the trainroom, I’m thinking that running back and forth is not a great idea.  Therefore, I have decided to clean up the table in the workshop, move the OH onto it, and do both the programming and the physical model construction there.
  • Before I can move the model, a general clean-up of the workshop will be necessary. The paints have already gone back into their storage area beneath the spray booth.  The electrical workbench will get cleared of its track-related components; the OH lighting and Arduino components will be staged there.  Open Hearth structural components will go back into the Open Hearth project box until needed.

It's progress, of a sort.

More when I know it.

George

@BillYo414 posted:

Thanks for discovering the scheduler! That sounds like it would be way easier than trying to account for every logic case. This thread is going to be a treasure trove of information on Arduino when you're done.

Absolutely will be a better approach.  I was up over 150 lines of code in a single function just keeping track of all the states in one furnace!    I got it to compile, but I was anticipating a very long, confusing effort to validate all the logic.

This is going to be much, much simpler.

George

Updated 5/23/2022:

With Judy's help and the installation of handles on one end of the base, we moved the mill into the workshop.  By tilting, it  can be made to fit through a 30" wide standard interior door without disassembly.  That's huge as I plan to transport from time to time.

As of last night, I was able to write 2 small programs that will activate a relay.  Each uses a different task scheduler approach.  This is also a big step.  The job immediately in front of me is to scale up these code snippets into useful functions for the mill.

More when I know it.

George

@BillYo414 posted:

How does the task scheduler work? Is there a counter that runs and you specify the intervals you would like events to occur?

Briefly, you create a list of tasks with running details (when, duration, routine to invoke, etc.) and then pass them to the scheduler task in the main loop.  It then executes the list.

I will give you more detail as I learn them.  I tried to modify (scale-up) the test program yesterday and encountered some difficulties.  Pretty sure it's due to my lack of understanding.  I am in discussions with the developer right now.

George

Updated 6/8/2022:

Much effort, small amount of visible progress to report.

The Arduino program is coming along.  The use of the scheduler library has made the task much simpler but the bulk of the effort is still ahead of me.  With all the routines needed and the complexity of the simulation, I think we are looking a program size of around 1,000 SLOC (source lines of code).

Right now I am in the process of wiring some of the relays and components inside the "Lean-To", which will house all the electronics.  Thank goodness for Amazon - my source for many components and hardware fittings.

More when I know it.  

George

@BillYo414 posted:

How would you rank 1000 SLOC in the programming realm? Is that considered a big code in your opinion?

Did you end up getting the smoke units positioned in the open hearth?

That's a harder question to answer than you might imagine.

I would say that 1,000 SLOC is a big program for the hobby segment or certainly for a hobbyist.  Most of the Arduino tutorial examples are very small, less than 20 lines, and perform specific individual tasks.  I have in mind another program that will react to a sensor and then set off some lights and other effects.  It should come in well under 100 lines of code.  Developers working for me have had responsibility for much larger individual pieces of code or cumulative segments that were well in excess of that number.  Project teams I led have delivered systems in the 200,000+ SLOC range.

This Open Hearth program is fairly complex (4 furnaces, 6-10 effects / furnace, 4 different operating modes) and while complexity and size have a relationship, it's not cut and dried.  I've seen small C programs that are really complicated.  Or at least difficult to decipher.  And some large programs are relatively simple, especially if they've been designed properly to employ good software engineering practices (re-use, inheritance, etc.).

Part of the complexity lies, at least in my opinion, in the choice of language.  I don't think C will ever be my favorite language;  something about the syntax just doesn't appeal to me.  I much prefer languages that are a little more formal in construction - Pascal, Modula-2, Visual Basic, Python, even Fortran.  And a language that doesn't enforce strong typing is just asking for trouble.

Sorry, that was probably a very roundabout answer.

Yes, I did get the smoke units mounted in the 2 furnaces that will use them.

George

@BillYo414 posted:

This answer is actually really great for someone like me that can do some basic coding and wants to learn more. I've been curious what I might be getting into when I get to that point.

Bill,

One of the common failings of courses that promise to teach you a programming language is that they only do exactly that.  They teach the student the syntax of the language, not how to realistically use it advantageously.  An "If" statement, "while" loop, or array are pretty much the same in a great many computer languages.  Learning how to use the constructs to actually achieve your objective is a different story.  The next step might be an "Algorithms" or "Data Structures" course.  These are harder, but they force the student to think abstractly about what they want to do and how a language's constructs might be used to achieve that.  One of the good things about the Introduction to Computer Science course taught at La Roche was its focus on learning how to create and use algorithms in writing code.  (I didn't design the course, but I whole-heartedly agree with the approach).

George

@BillYo414 posted:

@G3750 I'm not at all qualified to know any better but that seems like a reasonable way to learn in my opinion. I'm definitely at the lines of code level. I find myself coming up with a pattern, coding it to make sure the pattern works, and then going back and simplifying the code. It's all been based around if statements though. No fancy maneuvering beyond that.

You can certainly go a long way in that manner if the program is simple enough.

George

Last edited by G3750

Updated 6/12/2022:

No real programming progress was made during the last 2 days due to a problem with a beta (release candidate) version of the Arduino IDE (Integrated Development Environment).  Thanks to the prompt and excellent support from the folks at Arduino, the minor issue was quickly rectified.

Some progress on the control panel in the Lean-To has been made.  I have found a way to use some connectors with the legs of an LED to attach a wire without soldering.  Testing has verified my approach.  We are waiting on some LED holder clips to mount them in the control panel.  The uprights for the control panel are being cut.

More when I know it.

George

Updated 6/13/2022:

I'm going to need another small project (don't worry there are plenty of candidates ).  It seems that parts I need (and thought I had on hand) will take their sweet time getting to me.  I don't want to install the uprights for the control panel as that will block access to the breadboard.  There are still a few items to place on that breadboard (some of the aforementioned missing parts).

So, I think it's time to return to installing smokestack lights and painting trusses.

George

Updated 6/23/2022:

  • Never did get to the truss painting.    The LED clips arrived and those LEDs got mounted on the control panel.  So did a SPST flip switch.  I am working on mounting and wiring the potentiometers to the control panel.
  • Arduino jumpers are being numbered and color-coded as the relay boards are attached.
  • More (invisible) progress in writing C for the Arduino. My code is becoming more organized, better commented, and smaller as I work towards improving it.
  • The MP3 players have arrived.  Eventually, I will write an Arduino test program to test their operation.
More when I know it. 
George

Updated 6/30/2022:

Yesterday I had one of those moments.  You know, the kind where the blind man says "I see!!!!". 

Several fixes / re-orgs took place.  The Open Hearth's Arduino connects to 3 vertically stacked 8-relay boards.  Trying to connect wires from lights, smoke units, and whatnot to them made me re-think the set-up.  Regarding the 3 mounted and difficult to wire Arduino 8-relay boards, I’ve decided that the physical wiring connected to them are even bulkier and more troublesome to manage than the Dupont jumpers from the Arduino.

  • I disconnected all the Dupont jumpers from the relays and re-organized their pin numbering and grouping.  This will make the wiring more practical and less cumbersome.  For example, all overhead lights are grouped (pins - relays - wires).  Same thing is being done for furnace interior lights.  This will fill-out the bottom (#1) relay board.  The color coding is being maintained, which requires finding the proper color 5 cm length Dupont jumpers and re-labeling them.  I am using a Klein wire marking book for this purpose.
  • The above forced a pin re-numbering will have to be done inside the code as well. I created a new “cheat sheet” for the pin numbers which I am using faithfully to make the changes slowly and systematically.  Otherwise, I risk losing what little sanity is left to me. 
  • I discovered about 3 coding errors and fixed those.  As soon as the first set of wires (the overhead lights) is done, I will test out the code to see if I fixed the bugs.

The good news is that I am finding and fixing issues.  At this point there don't seem to be any unexplained issues (I just hate those).

More when I know it. 

George

Updated 7/05/2022:
  • I am working on the 2nd (of 9) full trusses.  Man, these puppies soak up a lot of paint!
  • Started working with the strings of LEDs for the overhead lights in the mill bays. These were made several years ago by Evan Design to my specifications. The mini-chip LEDs are glued into lampshades. There are 10 lights in a string and they run under the trusses. There are 4 such strings.
  • Also bought some Plastruct 1/16" U channel which will be used to hide the very thin (magnet) wires for the overhead lights in the mill bays.  I will place the wire in the U channel and then glue it to the underside of the truss.

All this is a welcome break from programming.
More when I know it. 
George

Add Reply

Post
×
×
×
×
Link copied to your clipboard.
×
×