JonL
Elder Statesman
WWSME (Wiltshire)
Posts: 2,988
|
Post by JonL on Sept 6, 2019 18:30:24 GMT
|
|
JonL
Elder Statesman
WWSME (Wiltshire)
Posts: 2,988
|
Post by JonL on Sept 16, 2019 21:20:28 GMT
Cashflow has stopped play for the moment, but I have managed to spare a few quid for the main top plate. I've also sketched up the plans to 1:1 scale (I don't have a CAD suitable computer so its pencils and paper!) so I can use them as a template when it comes to cutting out the profiles.
I'm currently writing the program that will convert the rotary motion of a switch into a PWM servo output to my speed controller; this should keep things relatively simple I hope.
|
|
|
Post by rwilliams on Sept 17, 2019 11:16:14 GMT
Hurrah, and boo respectively! Hope you get something rolling again soon.
What voltage are you running at?
|
|
JonL
Elder Statesman
WWSME (Wiltshire)
Posts: 2,988
|
Post by JonL on Sept 17, 2019 16:32:32 GMT
It will be 12v almost certainly. I will be using at least two batteries but if I put them in series I will double the speed, and thats the last thing I need...
|
|
|
Post by rwilliams on Sept 19, 2019 9:35:16 GMT
I'm currently writing the program that will convert the rotary motion of a switch into a PWM servo output to my speed controller; this should keep things relatively simple I hope. I have considered the following for a project of mine: I like the mechanical nature of a multi position rotary switch, and it's use is analogous to prototype when resistor bank and changes of the motor coupling were set on a positional basis of the regulator - which was notched. My 2.5"G battery diesel uses a 5 position switch and a resistor bank, allowing 'off', 1,2,3,4 with 4 being direct link between battery and motor. Positions 1,2 and 3 are linked via a resistor bank for varying speeds. It's a little crude, but effective and simple. Both the builder and I agree that if it were done again, something better would be installed. If you can have multiple inputs into the arduino, then say, you use something like a 180degree, 6 position switch, giving 'off', then 1,2,3,4, and 5. It's only need is for low current signalling, as the power generation is done by the ECU. But the coding to drive the ECU could be along the lines of setting position 1, to a rate such that the loco will 'creep' on power for shunting - while it has a load of an adult!, setting position 5 is Top speed, and then the intermediate ones set to be consistent. In percentage of power terms, you might find the following: - OFF - power 0%
- Setting 1 - creep mode- power 35%
- Setting 2 - Power 50%
- Setting 3 - power 66%
- Setting 4 - power 82%
- Setting 5 - full speed - power 100%
There is a YouTube Channel (XRobots) where the designer/presenter has a section on how to code pots to power settings, that might also be useful.
|
|
|
Post by Cro on Sept 20, 2019 7:11:30 GMT
IF controlling via arduino then a simpler option would he this, which I used on my dissertation to control motors when trying to create a wheel slip detection setup. www.sparkfun.com/products/15083Really easy to implement and gives you full 0-100% control of the power output plus a push button feature that could be used for various functions (on/off being a simple example, if you really want it has and RGB fitted so can then give a status indication, mine changed colour as power increased......) The problem with setting power output in a linear fashion is its less controllable and in tern less efficient. Arduino do a motor controller board but it is limited on its current, you can buy the same chip with a slightly higher current rating and performs exactly the same on a small veroboard. I have this all at home somewhere as I plan to use all the parts to motorise a turn table for a display at an exhibition next year with a loco on for the kids to rotate! This will be power output limited for speed so we don't get locos spinning at 100mph!!! Adam
|
|
JonL
Elder Statesman
WWSME (Wiltshire)
Posts: 2,988
|
Post by JonL on Sept 20, 2019 14:22:16 GMT
Thank you both for the tips, however I think more information might give a bit more context for you!
The motor is brushless AC, with a matched speed controller. This speed controller is controlled by a servo input as you would get from an RC receiver. I'm using this as its what I have!
If we consider a servo goes 0-180 degrees (for example) the speed controller uses 0-90 as forward speed, and 90-180 as reverse. By using an arduino I can program a few things cheaply and easily;
* I can program things so Forward and reverse can be selected on a switch, with a separate throttle pot. I can inhibit direction changes with open throttle so people can't accidentally put it in full reverse whilst going forwards or whatever. * I can scale the throttle curve, and cap it. So if it turns out full throttle for that motor/speed controller is 20 mph I can just rescale it so full throttle on the potentiometer is output at 6mph or whatever. Also I can scale the throttle so a movement of the potentiometer is logarithmic in its control of the motor. This gives better finesse at low speeds as you are aware. * If I later decide to add another smaller motor for realistic vibration ("chugging" at idle, smoothing out with acceleration or whatever) it will literally be a few lines of code and another wire. * Should I chose to I can controller the cooling system through the arduino.
|
|
|
Post by rwilliams on Sept 25, 2019 12:08:26 GMT
No problem! As I said at Westbury I'm very interested to see how this turns out as I'm considering similar issues with a proposed build I want to do. I was looking at the 'input' side to the arduino, you're looking at the output.
As we discussed, the biggest issue initially is going to be getting the power down without 'cogging', throttle scaling for top speed and control-ability is a bonus, but given it's standard on a lot of the Tx's out there it's an easy thing to have, and potentially very useful.
What motor are you running, and have you an idea of the gearing ratio?
|
|
JonL
Elder Statesman
WWSME (Wiltshire)
Posts: 2,988
|
Post by JonL on Sept 25, 2019 16:13:48 GMT
Off the top of my head its 12:1, and the motor is a turnigy aquastar 4084-1050 with 160A brushless speed controller.
|
|