Arduino based Auto-Reverse loop circuit (like AR1?)

Ravindra Dec 27, 2020

  1. Ravindra

    Ravindra TrainBoard Member

    56
    76
    5
    Just completed my own version of short circuit based auto reversing loop circuit using Arduino for DCC - let me know your thoughts


     
    papahnash, Atani and Sumner like this.
  2. french_guy

    french_guy TrainBoard Member

    327
    88
    18
    Interesting.....have you tried it with sound decoders?
    Where is the code?
     
    Ravindra likes this.
  3. french_guy

    french_guy TrainBoard Member

    327
    88
    18
    Found the info on your Youtube channel
    What is the yellow jumper on the current sensor though?
    Thanks
     
    Ravindra likes this.
  4. Ravindra

    Ravindra TrainBoard Member

    56
    76
    5
    I tried to remove the pins on the sensor so that I can mount them from back to make it breadboard friendly but while removing the pins I damaged the pads for VCC. yellow wire makes that connection for VCC by connecting to the IC VCC pin.
     
  5. Ravindra

    Ravindra TrainBoard Member

    56
    76
    5
    If you watch at the end I have shown DCC Sound loco running. and it runs very smoothly. i am now trying this circuit with proper setup so I will be updating it on my channel.
     
  6. wvgca

    wvgca TrainBoard Member

    306
    124
    16
    how do you set short time and current limits on your version ??
     
    Ravindra likes this.
  7. Atani

    Atani TrainBoard Member

    1,280
    921
    26
    @Ravindra I'd suggest put a copy of your schematic into the repo where you have the code. The code comments are a great start but leave out a few details which can only be found in the video by pausing at the right point.

    I'd also love to see this in an integrated PCB form that doesn't use the ACS712 module and other parts on breadboard, any plans for that?
     
    Ravindra likes this.
  8. Ravindra

    Ravindra TrainBoard Member

    56
    76
    5
    time and current has been set in Arduino program.
     
  9. Ravindra

    Ravindra TrainBoard Member

    56
    76
    5

    Thanks! I will put copy of the schematic to my github page. also I will be making PCB in my next videos but ACS712 will need to be there as its the best and easy current sensor to work with for arduino. I don't want to make it complicated so using IC's on PCB will be more complicated. I will make very simple PCB that anyone can make and program.
     
  10. Stephane Savard

    Stephane Savard TrainBoard Member

    263
    531
    11
    Awesome project, though wish you had posted this about a year ago :D

    Though I've not been entirely happy with my two commercial reversers on my layout, so I might very well try this out! Thank you for sharing your Arduino project!
     
    Ravindra likes this.
  11. papahnash

    papahnash TrainBoard Member

    324
    36
    14
    Great project, thanks for sharing.
     
    Ravindra likes this.
  12. Ravindra

    Ravindra TrainBoard Member

    56
    76
    5
    just did this 1.5 minute demo to show how it works.

     
    Sumner and papahnash like this.
  13. french_guy

    french_guy TrainBoard Member

    327
    88
    18
    @ Ravindra: sorry for my questions, but I'm not an expert with Arduino
    -) Where do you measure the voltage exactly (the voltage to be divided by 1024)?
    -) Where the sensitivity comes from (0.185)
    -) what is the "+5" for in this line: int counts = analogRead(acs712)+5
    -) what is the -= 2,5 (remove offset?)

    Thanks
     
  14. Ravindra

    Ravindra TrainBoard Member

    56
    76
    5
    please see reply to your questions down below -

    -) Where do you measure the voltage exactly (the voltage to be divided by 1024)?
    - hall effect current sensor creates the voltage difference based on the amount of current flowing through it and we measure this voltage to see how much current is flowing (arduino analog read resolution is 10 bit ADC so it creates 1024 different values of 5 volts)
    -) Where the sensitivity comes from (0.185)
    - this sensitivity number is set by manufacturer of the 5Amp current sensor you can see this from the datasheet of the sensor just google ACS712 and see the pdf.
    -) what is the "+5" for in this line: int counts = analogRead(acs712)+5
    - +5 is the calibration of the voltage that you read on your voltage source. when there is nothing connected on sensor it outputs half of the supply voltage and if we don't gate exactly that then we add this number to make it look like half of the 1024.
    -) what is the -= 2,5 (remove offset?)
    because module measures half of the supply voltage we subtract that from the output

    hope this clears you doubts! thanks
     

Share This Page