Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Electrical (http://www.chiefdelphi.com/forums/forumdisplay.php?f=53)
-   -   Controlling PWMs through hardware (http://www.chiefdelphi.com/forums/showthread.php?t=79254)

RandomStyuff 09-12-2009 15:37

Controlling PWMs through hardware
 
I tried searching for this (both here and on Google) and didn't find anything so I'm sorry if it's already been covered. If this is in the wrong section, I'm sorry too, feel free to move it (if that is possible).

My team is building (long story as to why) a scooter-like device using FRC parts, but we have one restriction: because our robot's code was wiped out when our school's IT guy 'accidentally' wiped our programming computer's hard drive (and yeah, we had backups, and my hard drive died some months ago, and the backup usb stick was lost, and ....I know, we need to be more careful) and we have an off-season soon, so we can't use the cRIO for this scooter project. We thought of using the old 2007/2008 (and earlier) system, but we can not find neither software nor anyone who remembers much about it. We came to the conclusion that the only option is to build something custom using two victors connected to some custom hardware that we are (hopefully) capable of making.

The big question is if this is possible in any way directly through some sort of lever ( we thought of using a potentiometer but the thought of the waisted electricity makes us shiver)to control the PWM signals sent to the victors?

Does anyone know where we can find what data is transmitted on which wire and the 'protocol' involved.

All we want to do is have two motors with some sort of variable speed, without having to use a control system.

(If anyone has a better idea, all ideas are accepted: keep in mind though, we are outside of the states, so ordering electronics from the USA is slightly more complicated here)

Thanks in Advance -
The Spikes 2212

EDIT:
I just managed to find the Jaguar's technical specs pdf and according to what I found there the three pins are 1)PWM 2) 5V(optional, doesn't need to be connected- can be ignored) and 3) Ground

2 can be ignored, and 3 is easy to figure out to do with (ground), but with 1:PWM
the refresh rates for the PWM format are:
-1= 0.67ms
0 = 1.5ms
+1= 2.33ms

I don't know what I can use to create signals that fast

Andrew Schreiber 09-12-2009 15:50

Re: Controlling PWMs through hardware
 
What about using some smaller micros to do it? Just buy a cheap 8bit micro that has a couple Analog to Digital pins and bit bang the signal out? Lighter than a CRIO or the old FRC control systems ever could be (plus uses less energy). You could, if you have one laying around, use a VEX brain to do it if you wanted.

AdamHeard 09-12-2009 16:24

Re: Controlling PWMs through hardware
 
So you just want a device to generate a PWM signal from a knob of some sort?

A servo tester would be a cheap way to do this, not sure if the packaging is very well suited to your purposes, but you could probably remove the POT on there and hook up your own that is the size and shape you want.

EricVanWyk 09-12-2009 16:59

Re: Controlling PWMs through hardware
 
Quote:

Originally Posted by RandomStyuff (Post 887080)
The big question is if this is possible in any way directly through some sort of lever ( we thought of using a potentiometer but the thought of the waisted electricity makes us shiver)to control the PWM signals sent to the victors?

Does anyone know where we can find what data is transmitted on which wire and the 'protocol' involved.

Don't be so quick to shiver at the power draw of a potentiometer. Typically it will be on the order of milliwatts. If you are moving a human with your device, that is nothing.

I have to run or I'd be more explicit, but google "PWM 555". A 555 is a standard chip that is useful for all sorts of timing operations. It is relatively straight forward to combine this with a few resistors/capacitors and your pot to make the PWM signal you want.

Edit: The modern way to do this is what Andrew said. Cheapy microcontrollers have gotten so easy and cheap that there are fewer and fewer reasons to do things in analog. The 555 is the old fashioned tried'n'true.

Tristan Lall 09-12-2009 17:00

Re: Controlling PWMs through hardware
 
A Vex starter kit will have compatible outputs—though you may have to splice wires to get the proper connector gender. That will let you program it (in a similar manner to the old IFI RCs—they're based on the same architecture). You could probably hack an old joystick to connect to the analogue inputs on the RC, and use a simple variation on the default code to control it.

If you're going to go to that much trouble, though, you could just as easily use the IFI RC you already have (documentation and default code are available here and here)—as long you can track down a copy of MPLAB IDE. Actually, if nobody remembers MPLAB, there is probably an easyC default code for it that will work with the trial version of easyC PRO from Intellitek.

Alternatively, most other R/C car receivers will generate the right signals, but you'll have to control it with an appropriate R/C transmitter (e.g. with thumbsticks or a wheel).

If you're dead-set on building your own system, consider the ST Micro STM8S-Discovery evaluation board. (Free samples available from ST Micro, or cheaply from major distributors.) You can configure it with one of the standard examples to generate PWMs...but I haven't tested this myself, so I don't know if there are any practical limitations. You'll need to plan ahead, because the compilers (Cosmic, for instance) need registration codes that will take a business day or so to acquire (free, via e-mail; instructions on ST's website). More information here.

gburlison 09-12-2009 18:42

Re: Controlling PWMs through hardware
 
We were planning to build this servo tester kit to help teach soldering. The bonus would be that we could control a motor without the need to have a full controller setup. Sometimes it would be helpful when prototyping to be able to run a motor to see if things work as expected. With a battery, circuit breaker, fuse panel and a speed controller, we hope that this circuit will allow us to control a motor for testing purposes. We have not actually used this yet, so I can't guarantee that it will work.


http://www.gadgetgangster.com/find-a...projectnum=206

If a servo tester works for you, let us know.

dman14 09-12-2009 20:15

Re: Controlling PWMs through hardware
 
Quote:

Originally Posted by Tristan Lall (Post 887100)
If you're going to go to that much trouble, though, you could just as easily use the IFI RC you already have (documentation and default code are available here and here)—as long you can track down a copy of MPLAB IDE. Actually, if nobody remembers MPLAB, there is probably an easyC default code for it that will work with the trial version of easyC PRO from Intellitek.

A way to get MPLAB IDE can be found here.

AdamHeard 09-12-2009 20:40

Re: Controlling PWMs through hardware
 
If all you're doing is throttle control, you really don't want a whole control system on there.

Al Skierkiewicz 10-12-2009 07:59

Re: Controlling PWMs through hardware
 
Random,
The 555 PWM generator that Erik mentioned is likely the easiest for you to build with parts you can obtain locally. Radio Shack or equivalent stores in your area should have all you need.

RyanN 10-12-2009 08:36

Re: Controlling PWMs through hardware
 
Quote:

Originally Posted by Al Skierkiewicz (Post 887240)
Random,
The 555 PWM generator that Erik mentioned is likely the easiest for you to build with parts you can obtain locally. Radio Shack or equivalent stores in your area should have all you need.

I agree with Al, like usual, on this one. A 555 timer will work just fine.

First link on Google seemed to look pretty good: http://www.dprg.org/tutorials/2005-11a/index.html

Try it out. This is a cheap and reliable solution. Probably way more reliable and safer than using a microcontroller.

Still the biggest reliability and safety problem will be the speed controller. Just with the Jaguar's reputation for failing out of the blue, I would use the trusted Victor 884. Keep it clean and away from any metal shavings and don't backfeed power into it by pushing your scooter around. You may also consider an 883 since it has a little more power handling than the 884, seeing that you're just running a simple scooter.

Al Skierkiewicz 10-12-2009 21:26

Re: Controlling PWMs through hardware
 
Just thought of something for you as well. Motor current is proportional to motor load so make sure that the wheels on your cart and the transmission you use put the motor into a range on the motor curve it likes. I wish I had a dollar for every design I have seen that operated fine until you put it on the floor and tried to drive. The weight of the robot pushes down on the axles and without proper bearings that translates to very high motor current.

DonRotolo 10-12-2009 21:31

Re: Controlling PWMs through hardware
 
See the last post in THIS THREAD

Search before you post, you'd have had the answer 18 hours ago. :)

keehun 10-12-2009 22:36

Re: Controlling PWMs through hardware
 
At my school, we have a box with a nob and PWM out. It lets us generate PWM. I don't know what's in the box, how it works, but it has come useful to us at times... Sorry I can't help you any more.. but something like that does exist..

Trent B 11-12-2009 00:38

Re: Controlling PWMs through hardware
 
Quote:

Originally Posted by keehun (Post 887430)
At my school, we have a box with a nob and PWM out. It lets us generate PWM. I don't know what's in the box, how it works, but it has come useful to us at times... Sorry I can't help you any more.. but something like that does exist..

Ill track it down one of these days and open it up to see what is inside (take some pics.)

DonRotolo 14-12-2009 02:11

Re: Controlling PWMs through hardware
 
...or you can look at the thread I referenced 2 posts above, which tells you what's going to be inside that box of yours...:confused:


All times are GMT -5. The time now is 01:06.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi