|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
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 WMthe 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 Last edited by RandomStyuff : 12-09-2009 at 04:04 PM. Reason: New info |
|
#2
|
|||
|
|||
|
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.
|
|
#3
|
|||||
|
|||||
|
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. |
|
#4
|
||||
|
||||
|
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. Last edited by Tristan Lall : 12-09-2009 at 05:02 PM. |
|
#5
|
|||
|
|||
|
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. |
|
#6
|
|||
|
|||
|
Re: Controlling PWMs through hardware
Quote:
|
|
#7
|
|||||
|
|||||
|
Re: Controlling PWMs through hardware
If all you're doing is throttle control, you really don't want a whole control system on there.
|
|
#8
|
|||||
|
|||||
|
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. |
|
#9
|
||||
|
||||
|
Re: Controlling PWMs through hardware
Quote:
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. |
|
#10
|
|||||
|
|||||
|
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.
|
|
#11
|
||||
|
||||
|
Re: Controlling PWMs through hardware
[quote=Tristan Lall;887100]A Vex starter kit will have compatible outputs—though you may have to splice wires to get the proper connector gender. /QUOTE]
A lesson we've learned the hard way - before you splice all your PWM cables, simply put some header pins into the female side - instant male-male PWM! I'm still scratching my head as to why nobody makes Male-Male PWM cables. With the amount of teams who use VEX controllers at least for prototyping, if not special projects like yours, there should be some sort of market out there. |
|
#12
|
||||
|
||||
|
Re: Controlling PWMs through hardware
Just use a FRC Y Cable, it has male ends on both sides.
|
|
#13
|
||||
|
||||
|
Re: Controlling PWMs through hardware
Adam,
Can you post your vision code in a thread? I've looked all over the WPI site and can't find it! |
|
#14
|
|||
|
|||
|
Re: Controlling PWMs through hardware
hey guys, I myself have been thinking about this for the last year on and off and with a bit of research found the answer.
Like someone from 111 i believe had posted, use a 555. They are exactly right. After some testing and troubleshooting i got it down. you need 1 555 that outputs a steady 50Hz signal. That should go to the trigger pin on a second 555. Use the second one to create the pulse 1-2ms with a pot (50-100K) and around a .2 uF cap. I used a 556 IC, its got 2 555 built into it, this made it smaller and a bit simpler to wire. Or.... like someone said you could probably use a vex controller although iv heard there's sometimes problems with that. I guess if your not very comfortable around breadboards, go with the vex controller. |
|
#15
|
||||
|
||||
|
Re: Controlling PWMs through hardware
Or you could look into an Arduino. It's a controller that's pretty cheap ($30 or so) and can be programmed through a USB cable. It has an IDE which uses a language which is basically C. It can also output PWM signals, so it could be useful for your case.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Controlling Arduino through Labview | eitang | NI LabVIEW | 10 | 12-06-2010 01:20 AM |
| PWMs Cap thing | Brandon_L | Electrical | 1 | 02-02-2009 06:03 PM |
| cmu cam pwms | seanl | Programming | 3 | 01-29-2007 11:49 AM |
| pwms | fauxnominal | Programming | 8 | 01-12-2007 04:38 AM |
| pwms for relays | reilly | Motors | 3 | 02-18-2005 03:02 PM |