|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
I think you will need to power the IR board via the 12V distribution panel. I believe the PWM outputs are 5V. The IR board needs at least 7 Volts in order to work properly, hence wiring to the 12V panel. I would recommend a very small fuse, like 1 amp.
|
|
#2
|
|||||
|
|||||
|
Re: How to wire the IR on the RC?
The PWM outputs are at unregulated backup battery voltage, nominally 7.2v and dropping
![]() |
|
#3
|
||||
|
||||
|
Re: How to wire the IR on the RC?
Thanks Mark for the PWM output information (tied to backup battery voltage)
|
|
#4
|
||||
|
||||
|
Not sure what you are seeing on your Vex but here's some code from out testing unit. The check for rc_dig_14 is just a way to run this code only if a jumper is in 14.
My printf is returning all zeros, unless an IR cmd button is pressed. printf("c1: %d c2: %d c3: %d c4: %d\r", (int)rc_dig_in03,(int)rc_dig_in04,(int)rc_dig_in05 ,(int)rc_dig_in06); if (rc_dig_in14) //no jumper { if (rc_dig_in03) ir_cmd = CMD0; else if (rc_dig_in04) ir_cmd = CMD1; else if (rc_dig_in05) ir_cmd = CMD2; else if (rc_dig_in06) ir_cmd = CMD3; switch (ir_cmd) { case CMD0: //Forward pwm02 = (unsigned char) 254; pwm03 = (unsigned char) 50; //Adjusted for Faster Motor break; case CMD1: //Turn Right pwm02 = 0 + RT_SPEED_ADJ - 20; //Adjusted for slower motor pwm03 = 0 + RT_SPEED_ADJ; break; case CMD2: //Turn Left pwm02 = 254 - LT_SPEED_ADJ; pwm03 = 254 - LT_SPEED_ADJ; break; case CMD3: //Stop pwm02 = 127; pwm03 = 127; break; } } I have each of the appropriate rainbow cable wires going to the signal pin (white) and I daisy chained the grounds (black) with pins 3 and 4 from the rainbow cable. I have a toggle sw to control the power to the IR unit, so if the Vex Power in on, then I switch on the IR unit, I get initial 1's then zeroes. If I already have the IR power on, then power on the Vex, I get zeroes from the beginning. |
|
#5
|
|||||
|
|||||
|
Re: How to wire the IR on the RC?
Problem solved: IR gone nuts and wiring was wrong.
Next IR will come in next week but we'll be able to work with it by then. Currently we're alterning switches as IRs (seeing how the code reacts with switches on and off etc.) |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How do you wire the gear tooth sensor? | 1594code | Electrical | 5 | 12-01-2008 16:24 |
| How do you wire the wheel encoders? | Demothesis | Electrical | 2 | 17-07-2007 16:59 |
| how do you wire the team light | coolguybigt | Robot Showcase | 2 | 21-02-2007 22:18 |
| how to wire the pneumatic diagram | yara92 | Pneumatics | 0 | 17-02-2007 16:28 |
| how to wire the new two motor gearbox | Vince lau | Electrical | 10 | 14-02-2005 07:30 |