Correct me if i am wrong - Sclextrics current source controller - Page 1
Forum section: electronics / projects

author: Simon
author_rank: Unknown
timestamp: October 04, 2014, 10:22:30 am
content: I've been toying with the idea of producing my own electronic scalextrics controller. I'm thinking of doing a full SMPS version for better efficiency but I'll leave that for the moment. My car batteries i use for this in the middle of a field need some use now and then.So for now I have come up with a basic analogue current source design, the schematic is attached, power is applied across C4. R2 is my sense resistor of course, this is 1R. i want to supply at most 400mA to each car so maximum drop is 400mV. U1.1 naturally is the brains i hope i got the inputs round the right way, I have an NE5532, will that be ok ?Now I'm using the original controller to control this which is just a rheostat: R4 with a top resistance of 60R, the car i have worked out is 30R so I think you can see now what i am trying to do. I am using Q2 along with R6 and R7 (R5 an option to think about) to produce 0.4V, this is because I'm using my original controller and a "dummy car resistor" to replicate the original setup so that my original controller can run it. In this way initially R4 is open circuit, as soon as the trigger is pulled it is 60R, my dummy care resistor is 30R just like the car (12V/400mA) so knowing that R2 will have 0.4V across it for 400mA which is flat out also on my control side as the trigger is pulled the resistance of R4 will drop to 0R leaving the full 400mV from Q2 to drive the input of the op-amp and therefor allow 400mA to be sourced by the mosfet.Does this all sound like a plan ? have i missed anything obvious.I'n case you are asking, why oh why am i doing this the answer is simple: because the track is often a bit dirty, with a constant current source I can deliver all of the voltage i want to overcome the track resistance to keep the constant current to the motor and make controlling the car much smoother for the player (nice ride better donations in the pot for charity). I plan to expand the idea and latter add a voltage doubling stage so that I'm running off of 24V as the track can be a right pain and being able to increase the guarantee of supplying the correct current is nice, this all runs off a car battery for for a few hours use the battery is a virtually limitless supply of power providing I don't do anything stupid.Of course this also makes the controller short circuit protected which given the rough outside use is desirable

author: penfold
author_rank: Frequent Contributor
timestamp: October 04, 2014, 10:37:05 am
content: Controlling with constant current will shift your control action to be more towards an acceleration than velocity, so the car will respond differently to your trigger angle than before with a rheostat.

author: Simon
author_rank: Unknown
timestamp: October 04, 2014, 10:41:27 am
content: Well previously the cars ran from 12V, the car has a rough resistance of 30 ohms and the controller puts 0-60 ohms in series, The idea is that the circuit takes over the job of the controller and creates the same amount of current in the car that the controller would if in series. This will mean that it does not take into account the fact that the motors effective running resistance probably varies slightly but is as close as i can get without using a microcontroller to "map" input to output.How much different will the car respond ?

author: Andy Watson
author_rank: Super Contributor
timestamp: October 04, 2014, 11:04:06 am
content: For permanent field DC motors, current translates to torque and voltage to speed. I guess that using a reostat puts the control somewhere in between speed and torque (not unlike a real car).

author: penfold
author_rank: Frequent Contributor
timestamp: October 04, 2014, 11:05:02 am
content: Rig up a prototype and see how it responds, I'm not sure on the friction and (mechanical) resistance on a scalextrics car so I don't really know just how different the car will respond and how far the tendency for acceleration control over speed control will be.Whilst you're at it, you could construct a control signal using a combination of proportional and derivative controls and compensate for changes in control (note: not the same as PID compensated control, there'll be no feedback)If you want to be analytical about it then you can could try and plot a V/I curve for the car running on the simplest track you can imagine, if behaves like a resistance then you're set (direct proportionality between voltage and current at constant speed)... but building a circuit is more fun.

author: Simon
author_rank: Unknown
timestamp: October 04, 2014, 11:07:05 am
content: Quote from: penfold on October 04, 2014, 11:05:02 amNow you have really lost me

author: Simon
author_rank: Unknown
timestamp: October 04, 2014, 11:35:07 am
content: resistance of the motor is 15-20 ohms when "cold". I'm assuming that motors work like a speaker in that the cold ohmic resistance does not help deliver power and just adds to losses so the resistance will increase with the added working resistance being inductance that allows the motor to actually work. the faster the motor tries to go the higher a resistance the inductance presents as the brushes are not switching power through the coils faster so reducing current maybe ? Although I suppose if there is voltage headroom yes it just gets gobbled up as more power.I'll have to try rigging it up.

author: penfold
author_rank: Frequent Contributor
timestamp: October 04, 2014, 11:42:50 am
content: At the input: If the angular position of the trigger is proportional to the velocity of the car then the derivative of the angular position should be proportional to the acceleration of the car...At the output: The current will be proportional to the acceleration of the car, except with a few losses.So in the middle you need to construct a current demand signal that is a combination of the required acceleration plus a bit extra to compensate for mechanical resistances, it would take a bit of playing about with, but shouldn't need more than 3 opamps or so, but would be a good project...But I wouldn't jump into that before having a go with a straight forward current control without anything in the middlePS: You're semi-right about the motor behavior, if you have a google about brushed DC motors then you'll find an equivalent circuit that is basically the DC resistance in series with a voltage source that is proportional to the rotational speed (called back-EMF), that works for most circumstances. The equations relating torque and velocity will be a bit different for a motor under load in a scalextrics car, but not massively for a low performance motor

author: Simon
author_rank: Unknown
timestamp: October 04, 2014, 02:56:55 pm
content: well tried the circuit with a 15R dummy resistor and potentiometer for controller. Not working as expected, the voltages between the two opamp inputs are not matched so the circuit is not hitting a balance and seems to react randomly with varying and non repeatable current output. Maybe an IRL540 is not a good choice of power transistor.

author: Andy Watson
author_rank: Super Contributor
timestamp: October 04, 2014, 03:13:27 pm
content: Quote from: Simon on October 04, 2014, 02:56:55 pmI would take a closer look at the 5532. It's bandwidth will probably cause you stability problem in this circuit. But, I suspect the overwhelming problem at the moment is that the common mode input range of the 5532 does not include the supply rails - and you are asking it to work pretty close to ground in this configuration.

author: Simon
author_rank: Unknown
timestamp: October 04, 2014, 04:02:01 pm
content: Ah i thought I may have problems there which i why I named it in my original description. Unfortunately the datasheet even from TI's website is pitiful and worries more about packaging than part specs.So I need to go looking for a rail to rail opamp.