Author Topic: current sense chip: will it work?  (Read 1015 times)

0 Members and 1 Guest are viewing this topic.

Offline skeeterweazelTopic starter

  • Newbie
  • Posts: 4
  • Country: us
current sense chip: will it work?
« on: September 18, 2024, 02:07:44 am »
Hello. Newbie here. Have some questions i'm hoping you can help me with.
And feel free to suggest better ways to do this.
I'm helping some retired guys who are building a big outdoor railroad. My current project is figuring out how to sense when a train is in a certain section of track or "block". These are large trains. We expect them to draw about 10 amps and 32 volts. I'm hoping i can sense the first amp as my "trigger."
I want to try and go the route of using a shunt and a comparator ( or 2 or 3). I've come across mentions of a Texas Instruments chip that sounded good, then stumbled across another that sounds better.
I'm looking at the ina250. Biggest plus i'm seeing is that it has a built-in shunt. But i don't understand the datasheet enough to know if it will work for me; things like offset voltage.
https://www.ti.com/product/INA250
I've never played with a comparator or op-amp. I'm of the understanding that the output is either high or low, that it can be used as a trigger, in this case i want to connect it to an arduino to trigger signal lights.
The INA303 has more functions, like alerts, but i don't know if i need those. And it doesn't have a built-in shunt.
So, that's where i'm at. Hoping someone that is knowledgeable can check out the data sheet and let me know if it will/will not work.
Thanks for any info you can send my way.
Marty
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11729
  • Country: us
    • Personal site
Re: current sense chip: will it work?
« Reply #1 on: September 18, 2024, 03:18:57 am »
If you just need to sense the presence of the current / train, then you don't need to worry about offset voltages, it will be fine. You need to worry about them if you plan to digitize that voltage and need an accurate absolute current measurement.

 Those INAxxx current sense amplifiers are great. I have not used the integrated ones, but just the amplifiers are hard to beat.
Alex
 

Offline PGPG

  • Regular Contributor
  • *
  • Posts: 216
  • Country: pl
Re: current sense chip: will it work?
« Reply #2 on: September 18, 2024, 11:56:33 am »
Your solution has no isolation. You in theory have voltage not exceeding INA250 range. But it is outdoor.
When lightning strikes few km (or closer) from your installation you should expect up to 50V voltage difference between several grounding points inside the same building and several kV difference between grounding system of different buildings (or anything being outdoor).
Because of this I would certainly opt for isolation.

I would start from trying if Hall-effect sensor touched to 10A wire will give me enough signal.
There are lot of them (in TO-92). Probably some are linear and some have a field threshold set.
This with field threshold can have this threshold too high to notice 10A wire, but there are probably lot with different thresholds.
Linear are probably classified by sensitivity and I would expect that such with high sensitivity would give me enough signal. May be the wire isolation need be taken off (but we still have isolation) to allow for smaller distance between wire and sensor.

There are also sensors (like SO8 with piece of metal seen) that have sensor internally touched to high current wire. It still gives you isolation.

There are also sensors with ferrite round core integrated so you just pass your wire through the hole in the core. This are certainly more sensitive.

If I would fail with Hall-effect sensors (or found that very expensive one is needed) I would then check how many 10A wire coils on reed switch is needed to activate it (I expect 2..4 coils). This solution will also give me isolation not inserting in wire extra resistance.
 

Online MarkF

  • Super Contributor
  • ***
  • Posts: 2648
  • Country: us
Re: current sense chip: will it work?
« Reply #3 on: September 18, 2024, 01:04:28 pm »
I'll offer you my solution for block-detection on my HO model railroad.  It works with a combination of either PWM or constant DC power depending on slow or fast speeds.  PWM for slow speed responsiveness.  I used a diode to detect the current instead of a shunt because of the lower (and reduced variation) voltage drop for a diode.

If your track power is AC (has a negative component) this is NOT going to work for you.

2375375-0
 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3249
  • Country: us
Re: current sense chip: will it work?
« Reply #4 on: September 18, 2024, 01:06:47 pm »
This video starting at 15:29 discusses some Hall-effect current sensors that are frequently used by hobbyists:

460 Seven Sensors tested: Measuring Current with Microcontrollers (Arduino, ESP32, ESP8266) -- Andreas Spiess
https://youtu.be/Cg-4GjLeeAI?t=15m29s

 


Offline skeeterweazelTopic starter

  • Newbie
  • Posts: 4
  • Country: us
Re: current sense chip: will it work?
« Reply #6 on: September 18, 2024, 06:10:39 pm »
I looked through the data sheets on a couple of the isolated current sensors via the link. I didn't see, or missed, the capability to set the "trigger" amperage, and if they output a High/low logic voltage.
Thx for your replies.
Marty
 

Online BeBuLamar

  • Super Contributor
  • ***
  • Posts: 1357
  • Country: us
Re: current sense chip: will it work?
« Reply #7 on: September 18, 2024, 10:29:20 pm »
Hello. Newbie here. Have some questions i'm hoping you can help me with.
And feel free to suggest better ways to do this.
I'm helping some retired guys who are building a big outdoor railroad. My current project is figuring out how to sense when a train is in a certain section of track or "block". These are large trains. We expect them to draw about 10 amps and 32 volts. I'm hoping i can sense the first amp as my "trigger."
I want to try and go the route of using a shunt and a comparator ( or 2 or 3). I've come across mentions of a Texas Instruments chip that sounded good, then stumbled across another that sounds better.
I'm looking at the ina250. Biggest plus i'm seeing is that it has a built-in shunt. But i don't understand the datasheet enough to know if it will work for me; things like offset voltage.
https://www.ti.com/product/INA250
I've never played with a comparator or op-amp. I'm of the understanding that the output is either high or low, that it can be used as a trigger, in this case i want to connect it to an arduino to trigger signal lights.
The INA303 has more functions, like alerts, but i don't know if i need those. And it doesn't have a built-in shunt.
So, that's where i'm at. Hoping someone that is knowledgeable can check out the data sheet and let me know if it will/will not work.
Thanks for any info you can send my way.
Marty

I am not sure what you want to do. You want to measure current in the rail at different section?
 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3249
  • Country: us
Re: current sense chip: will it work?
« Reply #8 on: September 18, 2024, 11:28:20 pm »
I looked through the data sheets on a couple of the isolated current sensors via the link. I didn't see, or missed, the capability to set the "trigger" amperage, and if they output a High/low logic voltage.

Most output a voltage representing the current. You would have to add a comparator or sample the voltage with an ADC (like with a microcontroller).

This is not a bad intro to comparators (or op-amps used as a comparator):

Comparator tutorial & clapper circuit -- Afrotechmods
https://youtu.be/y0Q0ERSP24A
« Last Edit: September 19, 2024, 04:53:19 pm by ledtester »
 

Online langwadt

  • Super Contributor
  • ***
  • Posts: 4716
  • Country: dk
Re: current sense chip: will it work?
« Reply #9 on: September 18, 2024, 11:46:44 pm »
I looked through the data sheets on a couple of the isolated current sensors via the link. I didn't see, or missed, the capability to set the "trigger" amperage, and if they output a High/low logic voltage.

Most output a voltage representing the current. You would have to add a comparator or sample the voltage with an ADC (like with a microcontroller).

This is not a bad intro to comparators (or op-amps used as a comparator):

Comparator tutorial & clapper circuit -- Afrotechmods
https://youtu.bey0Q0ERSP24A

not very breadboard friendly but, .. https://www.lcsc.com/product-detail/Current-Sense-Amplifiers_Texas-Instruments-INA381A2IDSGR_C2155688.html

 

Offline skeeterweazelTopic starter

  • Newbie
  • Posts: 4
  • Country: us
Re: current sense chip: will it work?
« Reply #10 on: September 18, 2024, 11:58:17 pm »
BeBuLamar : basically, i guess that's what i'm doing. When a train comes into a block it will draw current. I need a way to sense when current is used so i can turn on/off signal lights.
ledTester: that link doesn't work.
Thx.
Marty
« Last Edit: September 19, 2024, 01:30:47 am by skeeterweazel »
 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3249
  • Country: us
Re: current sense chip: will it work?
« Reply #11 on: September 19, 2024, 01:41:33 am »
Hello. Newbie here. Have some questions i'm hoping you can help me with.
And feel free to suggest better ways to do this.
I'm helping some retired guys who are building a big outdoor railroad. My current project is figuring out how to sense when a train is in a certain section of track or "block". These are large trains. ...

How big are your trains?

Have you considered other detection mechanisms, such as optical proximity sensors or inductive sensors?

For instance, here is an idea for sensing a model train:

https://www.iascaled.com/store/CKT-IRSENSE

For instance, a current sensor will detect if the train is on a particular section of track AND it is moving. Another thing to consider is that proximity sensors can be placed anywhere on the track without regard to how the track is divided into circuits.

« Last Edit: September 19, 2024, 04:06:15 am by ledtester »
 

Online BeBuLamar

  • Super Contributor
  • ***
  • Posts: 1357
  • Country: us
Re: current sense chip: will it work?
« Reply #12 on: September 19, 2024, 10:43:00 am »
BeBuLamar : basically, i guess that's what i'm doing. When a train comes into a block it will draw current. I need a way to sense when current is used so i can turn on/off signal lights.
ledTester: that link doesn't work.
Thx.
Marty

So you mean each section of the track is electrically isolated from eachother? You mean you have to have wires to each section separately and not just to the whole rails? I am asking because I am not familiar with model train.Any way the chip is an ampifier designed to amplify the very small voltage produced by the current shunt.
« Last Edit: September 19, 2024, 12:48:14 pm by BeBuLamar »
 

Online MarkF

  • Super Contributor
  • ***
  • Posts: 2648
  • Country: us
Re: current sense chip: will it work?
« Reply #13 on: September 19, 2024, 12:47:21 pm »
BeBuLamar : basically, i guess that's what i'm doing. When a train comes into a block it will draw current. I need a way to sense when current is used so i can turn on/off signal lights.
ledTester: that link doesn't work.
Thx.
Marty

So you mean each section of the track is electrically isolated from each other? You mean you have to have wires to each section separately and not just to the whole rails? I am asking because I am not familiar with model train.

It depends...

Most new layouts use some version of DCC.  In which each locomotive has a decoder inside and is individually selected from the hand throttle.  In a DCC layout the whole track is connected together (as in one big data bus) where power and data is transmitted down the rails.  People have multiple connects to the track in order to reduce power loss.  Locomotive speed is determined by a command from the hand controller and not its position on the track.  More realistic operation.  Locomotive can also be combined into a consist and operate together (ie two, three or more locomotives at the from of the train).

'Old school' layouts divide the track into blocks and each block is powered independently.  There is no decoder in the locomotives and the speed of each locomotive depends on its location on the track and the voltage in that block.  If you want to operate multiple locomotives, you must keep each locomotive separated into a different block.  If two locomotives are in the same block, you don't have independent control of each one.   This is how I operate my layout.  The layout is currently divided into 15 isolated blocks/track sections.
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6289
  • Country: 00
Re: current sense chip: will it work?
« Reply #14 on: September 19, 2024, 04:00:25 pm »
Here is a circuit idea. The current sensor is not pass through so you don't need to deal with the high currents through your PCB. Insteead attach it to a high current wire in the proper orientation with cables ties or something similar. The board has three wires, two for supply (3.3V or 5V) and one for digital output (high when active). I didn't not include bypass capacitors on the power rails.

The operation of a comparator is very simple. Its output is VDD when the positive input is higher than the negative (even a little bit) and GND otherwise.  The circuit includes a low pass filter that is recommended in the datasheet and a feedback resistor for some hysteresis.

 
The following users thanked this post: skeeterweazel

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3249
  • Country: us
Re: current sense chip: will it work?
« Reply #15 on: September 19, 2024, 04:54:56 pm »
Just saw this...


ledTester: that link doesn't work.


Here is a fixed link:

Comparator tutorial & clapper circuit -- Afrotechmods
https://youtu.be/y0Q0ERSP24A
 

Offline skeeterweazelTopic starter

  • Newbie
  • Posts: 4
  • Country: us
Re: current sense chip: will it work?
« Reply #16 on: September 23, 2024, 06:17:24 am »
Here is a circuit idea. The current sensor is not pass through so you don't need to deal with the high currents through your PCB. Insteead attach it to a high current wire in the proper orientation with cables ties or something similar. The board has three wires, two for supply (3.3V or 5V) and one for digital output (high when active). I didn't not include bypass capacitors on the power rails.

The operation of a comparator is very simple. Its output is VDD when the positive input is higher than the negative (even a little bit) and GND otherwise.  The circuit includes a low pass filter that is recommended in the datasheet and a feedback resistor for some hysteresis.

I'm liking this the more i look at it. Could you point me in the direction of an explanation of the circuit?
Can the sensing chips be "over powered" with too many amps? I'm looking to only sense the first amp, but wire may have more than 10 amps at times. Does that hurt the chip?
Thx.
Marty
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13085
Re: current sense chip: will it work?
« Reply #17 on: September 23, 2024, 07:11:11 am »
I cant help thinking you all are over-thinking and over-engineering this. 

What about a current sensing relay consisting of a large (38mm x 5mm body) reed switch with several turns of the track section supply wire round it?   Reed switches that pull-in roughly in the 10 to 20 Ampere Turn range are readily available, and with a ten turn coil round them that would pull in at an amp or two in either direction.  If the track supply is PWMed, it would be advisable to 'slug' the relay by having a conductive sleeve round the reed relay under the coil, to sustain the magnetic field through the PWM off time to avoid fatiguing the reed contacts.  This could be a copper or aluminum tube as a coil former or a turn of copper tape directly on the reed switch body, with the seam soldered.

For a DCC layout this simple setup is less attractive as the relatively high frequency (at least in terms of electromechanical stuff) AC supply makes it difficult to get a good sustained field round the reed switch.  It could be worked around by using a bridge rectifier to effectively feed the coil DC, but that adds two diode drops in the track feed so other methods are more appropriate, such as one of the many Hall effect current sensors others have suggested.
 

Offline PGPG

  • Regular Contributor
  • *
  • Posts: 216
  • Country: pl
Re: current sense chip: will it work?
« Reply #18 on: September 23, 2024, 08:37:31 am »
I cant help thinking you all are over-thinking and over-engineering this.

What about a current sensing relay consisting of a large (38mm x 5mm body) reed switch with several turns of the track section supply wire round it?

This solution was already mentioned in my first post:
If I would fail with Hall-effect sensors ... I would then check how many 10A wire coils on reed switch is needed to activate it (I expect 2..4 coils).
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13085
Re: current sense chip: will it work?
« Reply #19 on: September 23, 2024, 11:54:35 am »
 :-+ I missed that.   However my first preference would be reed switches (assuming no future plans for DCC) vs  it being your last resort . . .
« Last Edit: September 23, 2024, 11:58:15 am by Ian.M »
 

Offline PGPG

  • Regular Contributor
  • *
  • Posts: 216
  • Country: pl
Re: current sense chip: will it work?
« Reply #20 on: September 23, 2024, 12:36:13 pm »
vs  it being your last resort . . .

I prefer to avoid any mechanical contacts even working in such perfect conditions as reed switch has inside.
I also assumed that gluing Hall-effect sensor to the wire isolation (I hoped that for 10A it may be enough to notice this current) is simpler than making a coil on reed-switch that probably has to be made with different wire that is normally used so the wire will have to be cut and connected to coil.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf