Model Railway Forum

Go Back   Model Railway Forum > Model Railway Construction > Wiring & Electronics


Reply
 
Thread Tools Display Modes
Old 16-10-2017, 03:48 PM   #11
Pjlons83
Member
 

Join Date: Sep 2017
Posts: 66
Pjlons83 is on a distinguished road
Default

Thanks Chris. I managed to get it running at the full 12v this weekend. I’ve powered the arduino with 12v through the jack plug and connected VIN to the breadboard. It’s working well.

For the reversing I have ordered a polarity reversing relay. This will be connected outside of the arduino. You basically have input terminals where a feed from the arduino output power will be connected and output terminals for the track. Left alone, the output polarity is as wired and the voltage you out in is the voltage you get out. There is a 3rd pair of terminals that requires 12v to operate. When this is powered, the polarity reverses.

I’m planning on connecting this between the power from the board and the track. This way it will be downstream of the diode so will hopefully work fine. The 12v switch power will come directly from the feed through a toggle switch so not affected by the pot.

Hope that makes sense.

https://www.ebay.co.uk/i/292266823835

Last edited by Pjlons83; 16-10-2017 at 03:53 PM.
Pjlons83 is offline   Reply With Quote
Old 16-10-2017, 04:05 PM   #12
brian1951
Super Moderator
 

Join Date: Dec 2012
Location: at home
Posts: 4,210
brian1951 is on a distinguished road
Default

I feel sorry for my poor locos, its bound to confuse them
brian1951 is offline   Reply With Quote
Old 16-10-2017, 04:14 PM   #13
cadman
Senior Member
 

Join Date: Mar 2016
Location: Leighton Buzzard
Posts: 313
cadman is on a distinguished road
Default

@Pjlons......for my small 'N' track I use the basic Hornby R965 controller to feed 15 volts into this motor controller which gives a much smoother motor control......it is only one direction at present until I fit a DPDT switch to the output to track..........HB
12v motor controller.jpg
cadman is offline   Reply With Quote
Old 16-10-2017, 04:31 PM   #14
Pjlons83
Member
 

Join Date: Sep 2017
Posts: 66
Pjlons83 is on a distinguished road
Default

Quote:
Originally Posted by brian1951 View Post
I feel sorry for my poor locos, its bound to confuse them
Haha. Your loco’s are confined to the test track Brian. I won’t let the loose on “the shelf”. They were chugging along happy yesterday, they looked like they were enjoying themselves. I know I was

@Cadman - I did consider a ready built controller but I wanted some automatic stop/start control. With my controller I can link sensors to the control circuit and stop/start sections of track.

It’s kind of simple but with some complicated twists.
Pjlons83 is offline   Reply With Quote
Old 16-10-2017, 04:39 PM   #15
chris_db4
Senior Member
 

Join Date: Nov 2014
Posts: 469
chris_db4 is on a distinguished road
Default

Pj,
the 12V will certainly give you a better range of speed even if top speed is a bit too much.
nice simple little relay unit, why not have it switched by the Arduino too?
given that the pot input will be going into an 8bit variable giving 256 discrete steps you could use the middle of the pot as stopped, 0-125 as reverse and 126-130 stop 131 -256 as ahead.
even if you keep a switch for direction control by inputting it through the processor means you can use a software to interlock the direction change at low speed only. either by ignoring the switch until speed is reduced or by ignoring speed and doing a controlled slowdown throw reversing relay and speed back to set point.
chris_db4 is offline   Reply With Quote
Old 16-10-2017, 04:41 PM   #16
chris_db4
Senior Member
 

Join Date: Nov 2014
Posts: 469
chris_db4 is on a distinguished road
Default

Quote:
Originally Posted by brian1951 View Post
I feel sorry for my poor locos, its bound to confuse them

maybe we should only reverse loco's using turntables
chris_db4 is offline   Reply With Quote
Old 16-10-2017, 04:50 PM   #17
Pjlons83
Member
 

Join Date: Sep 2017
Posts: 66
Pjlons83 is on a distinguished road
Default

That’s a good idea Chris. Thank you. I’ll consider that.
Pjlons83 is offline   Reply With Quote
Old 16-10-2017, 05:00 PM   #18
chris_db4
Senior Member
 

Join Date: Nov 2014
Posts: 469
chris_db4 is on a distinguished road
Default

It all will depend on how much coding you want to do.
As a further thought I would go with the slowdown reverse speed up, but change the direction switch to a push button with an LED to show which direction the software has selected, this could then be made to flash as the direction is changing

Anyway gives you some more thoughts on the matter, I shall stick to my Hornby control for now.
chris_db4 is offline   Reply With Quote
Old 16-10-2017, 05:12 PM   #19
Pjlons83
Member
 

Join Date: Sep 2017
Posts: 66
Pjlons83 is on a distinguished road
Default

Thanks Chris,

It’s like anything I do. Starts off with - “I’ll make a simple controller myself” and then goes through various stages of - “oh wait, what if did this........ oh but now I need to.........”

And so the never ending project continues. All good fun!
Pjlons83 is offline   Reply With Quote
Reply

Bookmarks



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +1. The time now is 07:22 AM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.