Create Your First Project
Start adding your projects to your portfolio. Click on "Manage Projects" to get started
Inexpensive DCC Digital Current Sensor for Arduino
This is an inexpensive current sensor you can build. The transformer detects AC current use from 12mAmps. to 5Amps. The sensor is designed to detect block occupancy on a DCC layout.
Open the photos for more details.
I was able to buy everything off Amazon. While I did have to buy some parts in bulk, I estimate the sensors, at a pro-rated cost, cost me $2.50 to $3, in parts with $2 of the cost going to the current transformer component 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 to simulate a resistor wheelset on regular rail cars. While the LED did glow dimly it did not get the sensor to report an active state on the Arduino. I had to use a 1K resistor and that did the trick.
The link takes you to my GitHub repository where you can find Arduino sketches for using these sensors. They integrate with CMRI and JMRI.
![Sensor Components](https://static.wixstatic.com/media/5923dc_57733fe771d24a25aa77fac8142d5f8c~mv2.jpg/v1/fill/w_1,h_1,q_90/5923dc_57733fe771d24a25aa77fac8142d5f8c~mv2.jpg)
![Sensor Components](https://static.wixstatic.com/media/5923dc_57733fe771d24a25aa77fac8142d5f8c~mv2.jpg/v1/fit/w_470,h_353,q_90/5923dc_57733fe771d24a25aa77fac8142d5f8c~mv2.jpg)
![Bottom of Sensor](https://static.wixstatic.com/media/5923dc_c314c6f161f747238cefaef64a9be6aa~mv2.jpg/v1/fill/w_1,h_1,q_90/5923dc_c314c6f161f747238cefaef64a9be6aa~mv2.jpg)
![Bottom of Sensor](https://static.wixstatic.com/media/5923dc_c314c6f161f747238cefaef64a9be6aa~mv2.jpg/v1/fit/w_470,h_352,q_90/5923dc_c314c6f161f747238cefaef64a9be6aa~mv2.jpg)
![Electrical Schematic](https://static.wixstatic.com/media/5923dc_4df4c601f6bb42a1a0f8d518cc4f94d1~mv2.png/v1/fill/w_1,h_1,q_90/5923dc_4df4c601f6bb42a1a0f8d518cc4f94d1~mv2.png)
![Electrical Schematic](https://static.wixstatic.com/media/5923dc_4df4c601f6bb42a1a0f8d518cc4f94d1~mv2.png/v1/fit/w_470,h_300,q_90/5923dc_4df4c601f6bb42a1a0f8d518cc4f94d1~mv2.png)
![Layout Installation](https://static.wixstatic.com/media/5923dc_10529acb2a7c4daf8a28a4343ab4a1c7~mv2.jpg/v1/fill/w_1,h_1,q_90/5923dc_10529acb2a7c4daf8a28a4343ab4a1c7~mv2.jpg)
![Layout Installation](https://static.wixstatic.com/media/5923dc_10529acb2a7c4daf8a28a4343ab4a1c7~mv2.jpg/v1/fit/w_470,h_187,q_90/5923dc_10529acb2a7c4daf8a28a4343ab4a1c7~mv2.jpg)