| Electronics > Projects, Designs, and Technical Stuff |
| Current sense circuit customisation |
| (1/4) > >> |
| danners430:
Afternoon all, I'm working out a current sense circuit for a model railway - it's DCC, so 14-18V AC square wave at 5-8.62KHz. I found the below circuit online, from https://www.jlcenterprises.net/pages/chapter-3 but would like to simplify it a little. I would be connecting the output to an MCU in every case. The following is all based on my interpretation of the circuit - if I'm wrong, please do tell me!! Firstly, I would replace the 12V supply with a 5V supply, which I think should work just the same as the higher voltage. Secondly, I would do one of the following: 1. Remove "stage 3", the last op-amp and associated circuitry, which only serves to introduce a time delay, and the transistor. From my interpretation of the circuit, this should simply provide an output to the MCU - whether it would be a digital or analogue output I'm afraid I'm not sure - anyone know? I could use an ADC input on the MCU anyway, so it wouldn't be a problem. 2. Remove all but the first op-amp and associated circuitry, and use an analogue signal into the MCU. The idea behind this is twofold: firstly to save on unnecessary additional circuitry (the original circuit doesn't take any MCUs into account), and secondly to allow me to use two, perhaps four, current sense transformers with the one LM324N op-amp, again saving on space. Reason for this is that I'm going to have a large number of these in a small area, so it's simply convenient to save some space. Do my interpretation and alterations make sense? |
| t1d:
--- Quote from: danners430 on November 05, 2018, 02:43:17 pm ---Afternoon all, I'm working out a current sense circuit for a model railway - it's DCC, so 14-18V AC square wave at 5-8.62KHz. I found the below circuit online, from https://www.jlcenterprises.net/pages/chapter-3 but would like to simplify it a little. I would be connecting the output to an MCU in every case. The following is all based on my interpretation of the circuit - if I'm wrong, please do tell me!! Firstly, I would replace the 12V supply with a 5V supply, which I think should work just the same as the higher voltage. Secondly, I would do one of the following: 1. Remove "stage 3", the last op-amp and associated circuitry, which only serves to introduce a time delay, and the transistor. From my interpretation of the circuit, this should simply provide an output to the MCU - whether it would be a digital or analogue output I'm afraid I'm not sure - anyone know? I could use an ADC input on the MCU anyway, so it wouldn't be a problem. 2. Remove all but the first op-amp and associated circuitry, and use an analogue signal into the MCU. The idea behind this is twofold: firstly to save on unnecessary additional circuitry (the original circuit doesn't take any MCUs into account), and secondly to allow me to use two, perhaps four, current sense transformers with the one LM324N op-amp, again saving on space. Reason for this is that I'm going to have a large number of these in a small area, so it's simply convenient to save some space. Do my interpretation and alterations make sense? --- End quote --- I am n-o-o expert, but I think that you are on the right track... 5v - Should be no problem, but check the voltage needed to drive the gates of the op amps and transistor. You may need to change the value of various components, based on the new voltage. Resistor divider networks are likely to need attention. Newer MCUs are going to 3v3. You might check on a better op amp, than the old-school 324, though it is a known workhorse. Op amps are prone to oscillate. Newer ones might be less susceptible? You will also need to be careful with noise protection. I would think that you are in a very noisy environment. Using an MCU, there may be a simpler means... Maybe just use a current sense resistor circuit, read across it and have the MCU do all the heavy (math) lifting... This is where we get beyond my skill level. Maybe google for current sensing circuits, for the MCU of your choice. An interesting subject... I'll be following it. Do well. |
| danners430:
Unfortunately I can't use any form of invasive current monitoring, as the power supply to the model railway track also carries a modulated digital signal - it's the variance of the AC square wave between 5-8KHz that sends commands to the trains :-) Sent from my ONEPLUS A3003 using Tapatalk |
| rs20:
What's the goal of your project? To measure current consumption accurately, measure power consumption accurately, or just to detect for the presence of a locomotive? BTW, a current sense resistor isn't any more "invasive" than a transformer. |
| danners430:
It's simply to detect the presence of a locomotive in an electrical section. My plan is to divide my layout into block sections, and fit a detector to each one. I'm a little confused then... Ideally I don't want to have too much voltage drop to the track, and the modulated signal needs to be kept intact - how would the resistive circuit work? Sent from my ONEPLUS A3003 using Tapatalk |
| Navigation |
| Message Index |
| Next page |