Just completed my own version of short circuit based auto reversing loop circuit using Arduino for DCC - let me know your thoughts
Found the info on your Youtube channel What is the yellow jumper on the current sensor though? Thanks
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.
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.
@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?
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.
Awesome project, though wish you had posted this about a year ago 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: 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
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
On an other thread, someone said auto-reversers based on relays were not as "safe" as the ones based on solid state relays (mosfet) Could anyone elaborate a little bit more?
They are referring to the latency of relays compared to the mosfets. A relay will take a few milliseconds to react and that could be enough time to damage, or at least heat up the driver components. A mosfet relay will switch almost instantaneously, thus limiting the current spike to a much shorter time frame.