Inexpensive Digital Current Sensor Build

ajkochev Jan 26, 2023

  1. ajkochev

    ajkochev TrainBoard Member

    193
    486
    20
    Totally stoked right now. I made a digital current sensor for Arduino that works.
    First, a big thank you to a Facebook user for electronic information on and making me take a closer look at what I was trying to do from my post on 1-16-2023.
    The sensor is based off of the website linked below. I was able to buy everything off Amazon. While I did have to buy some parts in bulk, I estimate the sensor pro-rated cost, cost me $2.50 to $3, in parts with $2 of the cost going to the circuit transformer itself.
    The best part about this sensor is it is digital. Since most pins on the Arduino Mega and Sensor Shield, I’m using are digital, or can be made digital, I can easily accommodate many of these on my layout.
    I tested the sensor on a DCC wired track and it indeed worked as expected. The LED lights up when the sensor is active and my test sketch reported the state of the sensor accurately in the serial monitor. It went active when a loco was on the track and inactive when off. I tried a 2K resistor on the track to see if that would trip the sensor for resistor wheelsets on rail cars. While the LED did glow dimly it did not get the sensor to report an active state on the Arduino. I used a 1K resistor and that did the trick. Below are photos of my sensor and a fully labeled schematic of the circuit as well as the site I got it from.

    The website that started this project is below.
    http://www.trainelectronics.com/.../Current_Sense/index.htm

    My GitHub containing sketches for servos and sensors is here:
    ajkochev (Anthony Kochevar) (github.com)

    Sensor01.jpg Sensor02.jpg Current Sensor.png
     
    Last edited: Jan 26, 2023
  2. CSX Robert

    CSX Robert TrainBoard Member

    1,503
    640
    41
    Nice. FYI - Have you ever seen the Perma-Proto boards from Adafruit? I started using them several years ago and have never used regular prototyping boards since. They have their holes connected in the same pattern as breadboards do, so if you prototype something on a breadboard you can transfer it directly to the Perma-Proto boards. Even if you don't start with a breadboard, these make neater, easier to duplicate circuits because you don't have to make connections using the component pins.
    [​IMG]

    [​IMG]
    [​IMG]
     
    BigJake likes this.

Share This Page