Jump to content
chadbag

JNSF DIY lighting project (PCB based)

Recommended Posts

gavino200

What's the purpose of the little cap and the resistor before the big cap?  Also how do you connect the voltage regulator? What's the wiring logic?

Share this post


Link to post
chadbag

@gavino200

 

The wiring logic is in the schematic I had posted earlier (ignore the values posted as they were representative).  What do you mean exactly "how do you connect the voltage regulator)?

 

Schematic-v0.1.5.pdf

 

The data sheet for the voltage regulator specifies a cap on the input and another on the output to "stabilize" the voltage.   The values can vary but several of the voltage regulators say using about a 0.33uF on the input and a 0.1uF on the output is enough.  For my test I used a 0.22uF on the input as I had a bunch here.

 

The small resister before the caps is to limit inrush current.  A smaller value may be better.  I am going to try 25ohm in my test circuit tomorrow. 

 

I also went from 1k to 2k in my test circuit and the length of time the LEDs were lit (or the fade time) was longer.  (Based on the time constant 𝞽 = RC )

 

 

 

 

  • Thanks 1

Share this post


Link to post
cteno4

Cool, glad it worked. Might be best to mock up with the current across 5 or 6 smd leds as it’s like the final. Also the smd glow is a bit different than the epoxy bulb guys. I would looks at the reflected glow off a white sheet of paper rather than looking at the naked intense glow of the smd leds as they are so point source intense they will make our eyes react. Reflected will be how it’s seen in the cars and may give a better idea of how the glow drops off.you can also try just dropping the connection for a short bit to see if you notice the break. Also a circuit without the storage caps to see how it’s different.

 

cheers

 

jeff

Share this post


Link to post
chadbag

The actual circuit can have up to 14 LEDs if you use the full length.   (Based on some commercial ones that have more closer together for more even coberage).  Since they are in parallel I am not sure I need to mock up the complete set of LEDs.   I can add a few more in though.  Once I get the sample boards we can play around with actual values for things.  Easier to take a board and solder stuff on to it then mess around with the wires, which are a PITA with the smd stuff (I realize the smd stuff is not meant for attaching to wires but it is what I have).

 

Here is an updated PCB layout.  I added in spots for 3 more capacitors and removed a double wire I discovered (two spots connected by two traces instead of one).  I also switched the SOT-223 regulator pins around since I found a cheap voltage regulator in 3.3V and 5V versions in the SOT-223 package so I switched the pins to match (and I may have screwed it up originally when I planned the SOT-223 regulator pads anyway).

 

PCB-v0.1.5-R4.pdf

  • Thanks 1

Share this post


Link to post
cteno4

The current is shared by all the leds so the resulting brightness will be basically related to the current supplied. The the length of time the leds remain lit will be proportional to the capacitance of the capacitor(s) to store charge. Fewer leds will glow brighter with the same current and dissipate about the same, but I think it’s more on the perceived dimming that may be seen to the eye in a flicker situation. I. The end is just trying to trick the eye that there is no flicker.

 

jeff

Share this post


Link to post
chadbag
3 minutes ago, cteno4 said:

The current is shared by all the leds so the resulting brightness will be basically related to the current supplied. The the length of time the leds remain lit will be proportional to the capacitance of the capacitor(s) to store charge. Fewer leds will glow brighter with the same current and dissipate about the same, but I think it’s more on the perceived dimming that may be seen to the eye in a flicker situation. I. The end is just trying to trick the eye that there is no flicker.

 

I suspect that playing with different component values is what we need to do to worry about flicker and tricking the eye.  The basic circuit path would not change.

  • Like 1

Share this post


Link to post
cteno4

Yes, I was just thinking on this as you responded! You are spot on the circuit looks to work and the perception of flicker can then be tested with number of leds and capacitance I the circuit!

 

might hook it to 12v and leave it on  for a few days to torture test.

 

good work

 

jeff

  • Like 1

Share this post


Link to post
gavino200
8 hours ago, chadbag said:

@gavino200

 

 What do you mean exactly "how do you connect the voltage regulator)?

 

Schematic-v0.1.5.pdf

 

Yes. That's all I meant. The schematic answers the question. Thanks.

  • Like 1

Share this post


Link to post
chadbag
13 hours ago, cteno4 said:

Yes, I was just thinking on this as you responded! You are spot on the circuit looks to work and the perception of flicker can then be tested with number of leds and capacitance I the circuit!

 

might hook it to 12v and leave it on  for a few days to torture test.

 

OK, my previous test was manually touching it to my DCC programming track (and pushing the DCC track signal through it).  Taking this suggestion, I soldered some wires to the rectifier bridge and hooked up a barrel jack female adapter and plugged in one of my variable voltage power supply bricks (some $9-12 on Banggood -- 9-24V).   I am leaving it on.  This is with 300 uF in caps and 2K in resistors.   Turning off the power it does last a good time -- should be enough to easily mitigate short loss of power that causes flicker.

 

This is a 5V regulator so the LEDs are running in a 5V system.    The current across an LED seems to be about 2.3-2.5ma if I did it right (put it on the 20m setting on the Ammeter side).  I assume an SMD LED will be in the same ballpark.  So even with up to 14 LEDs we'll have 35 or 40 ma so even lightweight simple voltage regulators should work fine.

 

IMG_0807.thumb.jpg.b97ebbfc5af61c9bf0f3650c99e9121e.jpg

 

 

 

 

Share this post


Link to post
chadbag
Posted (edited)

So I ordered 100 boards.   We'll try these (whoever wants some they are 57 cents each plus shipping).  I shipped them DHL which was about $7 more than registered mail (but 2-4 days instead of 2 weeks or more) which is why they are slightly more than the 40-50 cents I had mentioned earlier.  

 

If these work, 3000 of them come to about 21 cents each delivered to the US (UPS delivery, which is only a day or so slower than DHL).  If we like these I'll put the Gerber files up somewhere so that anyone can have their own made if they don't want to go in on group purchases.  (1000 is only about 24 cents each so we don't need that many takers to make them really cheap -- the 3000 price is not much less per unit than the 1000 -- just FYI -- 10000 is about 19 cents a piece, so once you get into the 1000s of units, the price does not change that much -- some of the costs are fixed and some are based on quantity so the fixed costs really becoming nothing per board when you get to the 1000s, but the 10s or a 100 it is more significant.

 

Since most trains are 4-10 cars, I'll be wanting several hundred of them myself (it may take me a million years to get them all made).  I suspect a few others here will want some.

 

I got these ones in blue since the board color did not change the price.   

 

 

Edited by chadbag

Share this post


Link to post
Martijn Meerts

I'd definitely be interested in trying some. Optimally I'd like the various components with it as well, they're often a pain to find in the Netherlands. There's an online shop that has a LOT of components, but their descriptions are pretty poor, so it's rather easy to order the wrong components, and they can be quite expensive unless you order huge numbers.

 

 

Share this post


Link to post
gavino200

Regarding the question about running multiple LEDs in parallel with a single resistor. I've used the product below for a few years with a single resistor using bot 12V and 5V DC power supplies. No problems. No blown LEDs. Come to think of it I don't thing I've ever had a single case of LED failure over time. Just sayin'.

 

https://www.aliexpress.com/item/DD85W0850-1-Strip-50-LED-Pre-soldered-micro-Copper-Wired-WHITE-SMD-LED-0805/32801413908.html?spm=a2g0s.9042311.0.0.27424c4dahFYNZ

Share this post


Link to post
gavino200
55 minutes ago, chadbag said:

So I ordered 100 boards.   We'll try these (whoever wants some they are 57 cents each plus shipping).  

 

I'll take as many of those as you want to spare. If they work well, I'm in for a lifetime supply.

Share this post


Link to post
chadbag
15 minutes ago, Martijn Meerts said:

I'd definitely be interested in trying some. Optimally I'd like the various components with it as well, they're often a pain to find in the Netherlands. There's an online shop that has a LOT of components, but their descriptions are pretty poor, so it's rather easy to order the wrong components, and they can be quite expensive unless you order huge numbers.

 

I ordered a large number of LEDs, resistors, and caps and voltage regulators.   I'd be happy to throw a set together with the board for you (in whatever quantity) once we arrive at optimal values for each.  I think, based on some experimentation already, I know what those are or close to what they may be, but we need to make sure.  The LEDs, caps, and voltage regulatros and rectifiers don't really change so those are the things I ordered in large numbers already.

 

 

Share this post


Link to post
chadbag
9 minutes ago, gavino200 said:

 

I'll take as many of those as you want to spare. If they work well, I'm in for a lifetime supply.

 

Of the first 100, depending on how many other people want some, you can have a bunch.  But once it has been tested in real life and we think it works great, we'll get a larger order in to reduce the cost per board and you can have as many as you want.   For the 20-50 US cents they cost (closer to 20 at larger qty), you can stock up for not a lot of money.

Share this post


Link to post
chadbag

I first placed the order for the 100 last night, but they audited it and rejected it.   I had not created the gerber files correctly and was missing the drill files.  They refunded the payment.  I re-built the gerber files, being more careful this time, and re-ordered.  This one passed the audit and is "in production".  They should ship sometime this week and be here DHL fast so hopefully in a week I can start some tests and if they work send them out to folks who want them.

 

I am also going to re-layout the board to make a new version that has the LEDs in a straight line.  Same circuit everything, just laid out a bit differently to try and make it thinner.

 

Also, I was looking at it and if you are hooking up a DCC decoder to the board (and it has a blue common or you are fine with the half wave rectification of using a track wire as a neg), you can leave the rectifier off, and solder the decoder track wires to where the track wires are attached to the board, use the 2.54mm pins  to hook up the track wire, and put the decoder where the rectifier is, more or less (if it is small enough).  We'll see how it works.  The nice thing is you can always use the DCC decoder with the rectifier on the board so you can use it either way without change.

 

Share this post


Link to post
Martijn Meerts
38 minutes ago, chadbag said:

 

I ordered a large number of LEDs, resistors, and caps and voltage regulators.   I'd be happy to throw a set together with the board for you (in whatever quantity) once we arrive at optimal values for each.  I think, based on some experimentation already, I know what those are or close to what they may be, but we need to make sure.  The LEDs, caps, and voltage regulatros and rectifiers don't really change so those are the things I ordered in large numbers already.

 

 

 

Sounds great. I need to find some suitable coaches to install them in, and I can try various manufacturers and from various time periods. My oldest coaches are probably older than I am.

 

Share this post


Link to post
cteno4

Moved the power pickup and power coupler discussion into its own thread as picking up some steam there.

 

jeff

Share this post


Link to post
chadbag
On 3/16/2019 at 1:23 AM, cteno4 said:

 

might hook it to 12v and leave it on  for a few days to torture test.

 

 

I've hooked it to 12-15V (I vary it as the power supply is variable) and leave it on whenever I am in the area (and it is in my day job home office so is on most of the time during the day / evening).  No problem being left on, and feeling the rectifier chip and voltage regulator chip, no warmth at all with the current 2 LEDs pull.  I suspect 14 LEDs won't show any heat at all as well.

 

Share this post


Link to post
cteno4

Cool. Always good to check! 

 

It will be interesting to see how much current is needed as you increase the number of leds. Theoretically you are just spreading the light out over more area, but I suspect it will need a bit more overall current, but always hard to tell until you try it to see how it will look to the eye. Light does not scale literally and thus it’s effect in models is something to just keep trying and playing with until you get the right result. I learned this big time way back when I worked with a couple of high end model/product shooters. Lighting was the total art for them and when I tried to get rules from them to work from there were not many, more of a process to quickly try things to start zooming in on what looked the best for each setup! Sometimes we would just move the camera a foot and a small angle change on the huge 3/4” scale model and the lighting would get totally redone a different way. But the results were always amazing and each shot thru the model felt like they were in the same place but required different things to get there!

 

it looks like the main dropping resistor has big enough pads to pop on a 3x3mm smd pot to play easily if desired.

 

cheers,

 

jeff

Share this post


Link to post
chadbag
7 minutes ago, cteno4 said:

it looks like the main dropping resistor has big enough pads to pop on a 3x3mm smd pot to play easily if desired.

 

 I have some (not SMD but breadboard) variable resistance pots coming if they ever get here (ordered Feb 4 -- last track like 2 weeks ago).  For testing.

 

 

Share this post


Link to post
cteno4

The little 3x3 smd are nice. You can’t reset them hundreds of times but are good for a couple of dozen tweaking. Usually once set that’s good.

 

the 7x7 pinned guys are a bit heartier for more playing.

 

jeff

Share this post


Link to post
chadbag
16 minutes ago, cteno4 said:

The little 3x3 smd are nice. You can’t reset them hundreds of times but are good for a couple of dozen tweaking. Usually once set that’s good.

 

 

I ordered a set pf 20 2k ones to try out.

 

I am trying to find something similar that is basically a 2 position switch that will choose between two paths.  Ie, 2 inputs and two outputs, and the switch will choose between the left and right paths.   (ie left in and out are connnected and right in and out are connected).  If such a thing exists, my Ali Express and eBay search-foo is failing.

 

In the straight-LED version of the PCB, I'd like to add in a switch that allows two different dimming resistors to be used (like some of the commercial light boards).  But need a versy small switch.  I have some push button ordered but would like to try some small rotary

Share this post


Link to post
cteno4

You want a DPDT switch. Double Pole Double throw. Means there are two poles you can throw to two different end positions

 

SPDT  is single pole that can be thrown to two positions

 

SPST. Plain old on off for a single pole.

 

Different styles for DPDT

 

toggle on/on

 

https://www.aliexpress.com/item/5PCS-Lot-High-Quality-6Pin-DPDT-ON-ON-Mini-Toggle-Switch-6A-125VAC-Mini-Switches/32810283048.html?spm=2114.search0104.3.204.9eff605d7A4vZC&ws_ab_test=searchweb0_0,searchweb201602_5_10065_10130_10068_10890_10547_319_10546_317_10548_10545_10696_453_10084_454_10083_10618_10307_537_536_10902_10059_10884_10887_321_322_10103,searchweb201603_70,ppcSwitch_0&algo_expid=d25b1185-a2a8-482f-b053-aec75b7b4386-29&algo_pvid=d25b1185-a2a8-482f-b053-aec75b7b4386&transAbTest=ae803_4

 

Toggle center off  on-off-on

 

https://www.aliexpress.com/item/Promotion-5pcs-3-Position-2P2T-DPDT-ON-OFF-ON-Miniature-Mini-Toggle-Switch-6A-125V/32815651213.html?spm=2114.search0104.3.116.8a04172atdcxrj&ws_ab_test=searchweb0_0,searchweb201602_5_10065_10130_10068_10890_10547_319_10546_317_10548_10545_10696_453_10084_454_10083_10618_10307_537_536_10902_10059_10884_10887_321_322_10103,searchweb201603_70,ppcSwitch_0&algo_expid=832aa650-ee26-464b-ae2c-5a8770d8dfce-16&algo_pvid=832aa650-ee26-464b-ae2c-5a8770d8dfce&transAbTest=ae803_4

 

Little slide ones for pcb on/on

 

https://www.aliexpress.com/item/20PCS-SS22D07-SS-22D07-6PIN-2P2T-DPDT-toggle-switch-side-slide-switches-handle-4mm-ROHS/32795075542.html?spm=2114.search0104.3.114.9eff605d7A4vZC&ws_ab_test=searchweb0_0,searchweb201602_5_10065_10130_10068_10890_10547_319_10546_317_10548_10545_10696_453_10084_454_10083_10618_10307_537_536_10902_10059_10884_10887_321_322_10103,searchweb201603_70,ppcSwitch_0&algo_expid=d25b1185-a2a8-482f-b053-aec75b7b4386-16&algo_pvid=d25b1185-a2a8-482f-b053-aec75b7b4386&transAbTest=ae803_4

 

For push button you need to specify latching so it clicks into each posisiton or its usually only momentary contact while pushed. On/on

 

https://www.aliexpress.com/item/30pcs-lot-Square-7x7x12mm-6-Pin-DPDT-Mini-Push-Button-Self-locking-Switch-G64-Multimeter-Switch/32874883200.html?spm=2114.search0104.3.44.9eff605d7A4vZC&ws_ab_test=searchweb0_0,searchweb201602_5_10065_10130_10068_10890_10547_319_10546_317_10548_10545_10696_453_10084_454_10083_10618_10307_537_536_10902_10059_10884_10887_321_322_10103,searchweb201603_70,ppcSwitch_0&algo_expid=d25b1185-a2a8-482f-b053-aec75b7b4386-6&algo_pvid=d25b1185-a2a8-482f-b053-aec75b7b4386&transAbTest=ae803_4

 

Cheers

 

jeff

Share this post


Link to post

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×