Managing TTL signals with BS2P
Javi
Posts: 8
Hello I´m working in a Project with DC motors and I need accurate control two DC motors. Looking in the Parallax DC motor control web i found Solutions cubed, Now I´m runing MMC from solutions cubed buyed at parallax, it´s working fine, but i need to make a closed loop to accurate control the speed of the dc motors and the position, to make a PID.
My question is : it´s possible to conect a Solutions Cubed quadrature encoder, supply a TTL square wave, it generate 200 pulses per motor revolution do you thinks the BS2p is capable and enough faster to read two encoders ???? Considering dc motor speed about 4000 to 6000Rpm thats generate 80.000 to 120.000 Pulses minute aprox 1300 Pulses second. And get time to do another calculation?
Any ideas or comments will be apreciated
thanks in advance
My question is : it´s possible to conect a Solutions Cubed quadrature encoder, supply a TTL square wave, it generate 200 pulses per motor revolution do you thinks the BS2p is capable and enough faster to read two encoders ???? Considering dc motor speed about 4000 to 6000Rpm thats generate 80.000 to 120.000 Pulses minute aprox 1300 Pulses second. And get time to do another calculation?
Any ideas or comments will be apreciated
thanks in advance
Comments
What it can do is read a 'sample' pulse from the encoder using PULSIN. From the sample, it can decide (using a PID algorithm) to send a command to the MMC to speed up or slow down the motor.
A quadrature encoder sounds like overkill in this instance (you'll get more pulses than you need) -- but looking at the Solutions-cubed website, it is what they use on their PID controller. Of course, they probably use PIC assembly for their control, not PBasic.
http://www.solutions-cubed.com/solutions cubed/Products Page/Downloads/ENC1_DS_1.pdf
It´s possible to polll the input line, or another idea is the useo of the PWMPAL did they owrk???
Please make your suggestiosn any hel will be appreciated
thanks.
One, the stamp being single tasked and two, the pulses counted will be too large for the limitations of the stamp. I personally have gone to motor controllers that do all the speed and position calculations by themselves, and get the stamp to read that data for program input. That way the stamp is free to run the motor controller through serial commands of what you want it to do, rather than being tied up trying to figure out what the motor/encoder is doing. Possibly the UPID that solutions cubed sells would be a better go, it does all the speed, ramping and positional stuff by itself ( has a positional counter that goes to the billions ) and the encoder feeds it. And they have user software that you can make your own custom adjusments for pwm, etc., that makes it easier for program code. And if you want to control 2 motors, then you will have to double that, as i think that board will only handle one motor.
I am by no means an expert on basic component building for motor controllers, so maybe someone else here could shed some light on that, as far as making your own, if it is possible.
Just my opinion here, think it will save you a lot of grief and wasted time. Possibly someone else has an easier solution.
kelvin