Skip to main content

gunrunnerjohn:

How many lines of code are you packing in there? 

I can't tell you that either. There are a lot of pieces. Since the Nano only has 1 hardware serial port, I'm trying to use the SoftwareSerial library so that I can cascade from one signal to another.


I've done tests using SoftwareSerial between two Nanos and in isolation, it all works fine. But when I merge it with the signal operations software, it crashes.

So now, what I need to try is linking Nanos over some distance (around 10 feet) to exchange some basic status information using just plain wire. I also need to remove some of the features that I had planned on that would have enabled me to change certain parameters over the serial line. One way or another, I'll figure it out.

Attachments

Images (1)
  • mceclip0
Last edited by Consolidated Leo
rtr12:

Have you looked at the Adafruit Metro or Metro Mini? I am not sure but they may have added things the Arduinos don't have. I think they are maybe Uno and Nano or Mini take-offs using the same processors. They are supposed to be compatible with the Adruino IDE, but I was thinking they were programmed with Adafruit's Circuit Python? Not sure maybe they work on either C or Python?

Tom: I'll take a look at the Metro. I'm not against changing to a different processor. I've already looked at the STM32 which might work out better. At one time, there was (is) a version of the Arduino Mega that was downsized to some degree. But I don't think it ever caught on. Small,  cheap, powerful - pick any two.

Last edited by Consolidated Leo

stan2004:

Leo, it's your thread so not my call, but seems this Arduino talk is getting far afield of the topic?!  As you recall the reason for starting this thread in the first place was to allow focus on selecting 1-cent diodes and/or resistors when you don't have smooth/steady DC voltage.  Just my 2 cents. 

Stan: No offense taken. You are correct that we have drifted into unknown territory for the topic at hand. But that seems to be the way that these things go. I don't plan to wrangle it into the corral. If the topic wanders a bit, that's okay with me. Maybe I could modify the topic to "More Questions from Leo".

Anyway, I think we can let this stand on it's own merits and drift into the archives.

Last edited by Consolidated Leo
Pingman:

Leo, enough with the background color, please?  Perhaps it's just me, but I find the use of background colors renders the text virtually unreadable.

They are your posts so do as you like; but, as one who might benefit from the discussion, the background colors makes that impossible for me.

Right! I'll have to make a note of that; how to bug Pingman.

Last edited by Consolidated Leo

At the risk of possibly getting this thread back on track, I have another question. I have mentioned that Tom (rtr12) has a project going with Rod Stewart in which they are working on developing a PCB for colored signals. Here's a link to that project.

While looking over their schematic, I came across an optocoupler; the LTV-8141. This is an AC input part that drives a darlington transistor to create a trigger for their 555 timer. This can be used with the isolated rail method to detect train location. It is specified for 6-12 volts presumably from an auxiliary power source; either AC or DC. Here's the area from the schematic (Version 5.4):


For an AC optocoupler, the internal LEDs are arranged with opposite polarity so that the current runs through one LED or the other. So each LED will see the full-wave AC but the reverse voltage does not affect them because there is an alternate path (the other LED) to handle the load. At least I think that's how it works.

The LTV-8141 specifications indicate that this component operates with a forward voltage of 1.2 volts (typical). And the max current is ±50ma. With the 2200 ohm resistor in place that works out to low currents between 2ma and 5ma. The specifications also say that the CTR (current transfer rate) is 600%.

So my question is what does CTR mean and does this really work at such low currents? How do you figure that out from the specifications?

Attachments

Images (1)
  • mceclip0
Last edited by Consolidated Leo

Current Transfer Ratio (CTR) - is the ratio of the output current to the input current for an Opto-Coupler.

                       Ic - Collector Current
       CTR  =    -----------------------------------
                      If - Input Current

I use the LTV-8141 in a motor drive sensor application.  For my use, I connect it across a drive motor with a 4.7k current limiting resistor. 

For your example of a CTR of 600%, if you have a 2ma current in the LED side, you have a possible 12ma current on the output side.  Obviously, the current depends on the configuration of the output circuit, the 600% is what is possible.  Here's the circuit I'm talking about.  The relay closes with less than a volt on the motor leads.  The DPDT relay can be used for a variety of effects to be triggered on locomotive movement.

000

I use similar AC opto parts on my Super-Chuffer.

Attachments

Images (1)
  • 000
Last edited by gunrunnerjohn

That LTV-8141 addition actually came from Stan a few years ago. He suggested that to me way back in an earlier version of the 4 way traffic light project to reset the traffic lights from a RR crossing signal. And also as a way to learn a little something about the opto-isolators. We just copied his suggestions from that project to the new project.  

I keep all these great suggestions I get around here, but sometimes I'm just a bit slow getting around to using them somewhere...

And yes, unfortunately the Metros are a bit more expensive. From GRJ's earlier post I think they are similar in capabilities to the Arduinos as well. Earlier I was thinking they had a bit more to offer than the Arduinos, but maybe not so much.

Last edited by rtr12

It's a not that hard to solder SMT parts.

I start by tinning one pad.  Then I take the part in my tweezers and touch the soldering iron to the pad.  I slide the part into position and remove the iron.  If it's not perfectly aligned, carefully grab it again and heat the junction and position it.  Now I put the tweezer tip on it with gentle pressue and heat it one more time, that gets it flush with the PCB with all legs on the PDB.  Finally, I just go around and solder the other connections one at a time.  T needle tip soldering iron and .020" solder is what I use.

I am not real good with the SMT stuff, it can get pretty ugly. But, I cheat and use one of these. And now they have a nice, new, improved and larger version here. This one is very tempting!   

My preference is still for through hole parts. Unfortunately they seem to be disappearing and some are getting harder to find. On the brighter side, PCBs will cost a lot less at some places. 

I use my microscope for forensic analysis of PCB failures at times, and to examine stuff that's too small to read.  I find that my ring light magnifier and reading glasses are enough for any SMT that I so.  I limit myself to 0603 sized parts or larger, smaller than that gets pretty dicey for me.  For lead pitch, I prefer .95mm and wider.  The narrower pitches are just too difficult to do with soldering irons.  I have started to do work with the hot air tool at times, but I'm still feeling my way with that.

Last edited by gunrunnerjohn

I realize that when you need to stuff electronics into an engine where there is little room for negotiation, SMT parts are a necessity. I have trouble with 0.1" spacing as it is. And you're right, Tom. Through hole design is becoming a lost art. I use a regular old magnifier taped to a swivel lamp. That's not cheating. It's smart and practical. I don't expect to be soldering SMT parts even though I understand the technique.

The PCB makers are starting to offer part placement options to their list of services for a fee. The competition will help reduce the overall price and that may bring me to consider SMT in design work.

Yes the microscope takes some getting used to for soldering. I don't have it mastered by any means. That newer one looks pretty nice though, 7" screen too!

I saw a youtube video the other day where someone had gotten a 'solder mask' (or something...forgive my terminology here) and used a hot plate to solder the SMT parts. The 'solder mask' was a thin metal sheet with cut outs for only the solder pads. He lined that up with the PCB and smeared some kind of solder paste all over it, the metal sheet only allowing it to cover the solder pads. Then he placed all the parts on the PCB with the solder paste on it, put it on a hot plate and melted the solder. The hot plate (probably also wrong terminology) was just a flat pad of some sort that got hot enough to melt solder (not like the cooking kind). It looked pretty slick in the video. Like something maybe even I could do! 

You probably already know about all this, but I'm pretty sure he said he got the thin metal template when he ordered the PCBs, and I believe he used JLCPCB to order from. I'll have to look around over there and see if I can figure out what/how he ordered the template. It looked pretty slick, especially if you had several boards to solder up. Looked like it would really make things a lot faster and easier. 

Leo, this might just make it possible for us to start using SMT parts. I don't know the cost of this, but as you say, more people using it may bring the prices down. 

Last edited by rtr12
rtr12 posted:

Yes the microscope takes some getting used to for soldering. I don't have it mastered by any means. That newer one looks pretty nice though, 7" screen too!

I saw a youtube video the other day where someone had gotten a 'solder mask' (or something...forgive my terminology here) and used a hot plate to solder the SMT parts. The 'solder mask' was a thin metal sheet with cut outs for only the solder pads. He lined that up with the PCB and smeared some kind of solder paste all over it, the metal sheet only allowing it to cover the solder pads. Then he placed all the parts on the PCB with the solder paste on it, put it on a hot plate and melted the solder. The hot plate (probably also wrong terminology) was just a flat pad of some sort that got hot enough to melt solder (not like the cooking kind). It looked pretty slick in the video. Like something maybe even I could do! 

You probably already know about all this, but I'm pretty sure he said he got the thin metal template when he ordered the PCBs, and I believe he used JLCPCB to order from. I'll have to look around over there and see if I can figure out what/how he ordered the template. It looked pretty slick, especially if you had several boards to solder up. Looked like it would really make things a lot faster and easier. 

Yes, the solder stencil is typically an option when you order most boards.  For small quantities, they make them out of mylar, for larger quantities, they're stainless.

However, the solder paste used has a very short shelf life, so you have to be doing quite a number to make it worthwhile.  Also, typically you'd want panelized boards as it's rare for the solder stencil to be done for a single board.  I had a whole raft of stencils from an old PCB house, they sent me all my working stencils when they folded up their business.  However, they're typically unique to each PCB house, so they were worthless and got recycled.

The "hotplate" you refer to was likely an infrared soldering tool.

1,000 might be a stretch for the nifty template thing, but it was pretty neat. Maybe for 25 or maybe even 50 boards or so it might pay off? The guy I saw was just doing one PCB, but I wonder if you could panelize a bunch of boards and get a template for the whole thing?

Of course, there is still the placement of all the tiny little parts and the size of the hot plate thing...and probably a few other things I'm missing here? Just getting the little tiny parts out of those 'strips' they come in can be challenging for me, and then if you drop some...

The solder stencil is typically done for a whole panel, the ones I had were for 12 of the Super-Chuffers and 25 of the lighting modules.

You still have to place all the parts precisely on the solder paste, so it's still very labor intensive.  For one PCB, unless there were a ton of parts on it, it doesn't make much sense to screw around with a stencil.

I fooled around with the paste a couple of times, but I don't do anything that it would save me any time on.

As far as panelization, for my products they typically panelize anywhere from ten to 30 boards.  The real reason for the panels is for the pick-n-place machine, they can use the stencil to apply solder paste to the whole panel, then the pick-n-place machine can do it's thing and not have a lot of board handling.  For the small run shops I use, the panel has never been more than around 6" square.  The biggest single board I've run is the TMCC Buffer, it was around 2 1/2" x 3", and they did those in panels of two.

FWIW, when you supply the parts for an assembly house, the small stuff is typically very cheap, and they want about 20% extra parts.  They will lose a few starting up the machine and threading them into the reels, especially stuff like resistors and caps.  When I get the excess parts back from a run, there's usually a bunch of loose parts in the bag with the remaining taped parts.

Add Reply

Post

OGR Publishing, Inc., 1310 Eastside Centre Ct, Ste 6, Mountain Home, AR 72653
800-980-OGRR (6477)
www.ogaugerr.com

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