Legacy Forum: Preserving Nearly 20 Years of Community History - A Time Capsule of Discussions, Memories, and Shared Experiences.

On/Off switch power in pwm if possible ???

Hitec robotics including ROBONOVA humanoid, HSR-8498HB servos, MR C-3024 Controllers and RoboBasic
13 postsPage 1 of 1
13 postsPage 1 of 1

On/Off switch power in pwm if possible ???

Post by kif » Fri Oct 26, 2007 10:05 am

Post by kif
Fri Oct 26, 2007 10:05 am

hello guys

i want make on /off for two possibilities :

- 1 for powered & swith on/off led white standard in PWM0
- 2 For powered & switch on/off card in 6V max in PWM1

If possible or not ??? if yes what the code please ???

Or not do you have other solutions

than's for advance

Best regards
hello guys

i want make on /off for two possibilities :

- 1 for powered & swith on/off led white standard in PWM0
- 2 For powered & switch on/off card in 6V max in PWM1

If possible or not ??? if yes what the code please ???

Or not do you have other solutions

than's for advance

Best regards
kif
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 81
Joined: Mon Jun 26, 2006 1:00 am
Location: Paris

Re: On/Off switch power in pwm if possible ???

Post by quickster47 » Fri Oct 26, 2007 12:00 pm

Post by quickster47
Fri Oct 26, 2007 12:00 pm

kif wrote:hello guys

i want make on /off for two possibilities :

- 1 for powered & swith on/off led white standard in PWM0
- 2 For powered & switch on/off card in 6V max in PWM1

If possible or not ??? if yes what the code please ???

Or not do you have other solutions

than's for advance

Best regards


Hmm, not quite sure that your request is clear. But then I may not be reading it correctly. Perhaps a better explanation of what you really are trying to accomplish would help get you an answer.

Carl
kif wrote:hello guys

i want make on /off for two possibilities :

- 1 for powered & swith on/off led white standard in PWM0
- 2 For powered & switch on/off card in 6V max in PWM1

If possible or not ??? if yes what the code please ???

Or not do you have other solutions

than's for advance

Best regards


Hmm, not quite sure that your request is clear. But then I may not be reading it correctly. Perhaps a better explanation of what you really are trying to accomplish would help get you an answer.

Carl
quickster47
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 29
Joined: Sat Sep 22, 2007 5:57 pm

Post by DirtyRoboto » Fri Oct 26, 2007 12:20 pm

Post by DirtyRoboto
Fri Oct 26, 2007 12:20 pm

I take it you want to use the PMWs for more then 1 application.
I take it you want to use the PMWs for more then 1 application.
In servo's we trust!
DirtyRoboto
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 412
Joined: Tue Sep 19, 2006 1:00 am
Location: London

Post by kif » Fri Oct 26, 2007 12:25 pm

Post by kif
Fri Oct 26, 2007 12:25 pm

excuse me am french


I want to be able to switch On or switch Off

- 1 a one led ( usually 2V, but 4V for white) connected in Pin PWM 0
- 2 a component in 6V) connected in Pin PWM 1

I wanted to know if possible or not in Pin PWM ???

If Yes : how to make code in Robobasic ( ex : key 10)

If No : what the solution for switch On or Off the component


Thank's for advance
excuse me am french


I want to be able to switch On or switch Off

- 1 a one led ( usually 2V, but 4V for white) connected in Pin PWM 0
- 2 a component in 6V) connected in Pin PWM 1

I wanted to know if possible or not in Pin PWM ???

If Yes : how to make code in Robobasic ( ex : key 10)

If No : what the solution for switch On or Off the component


Thank's for advance
kif
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 81
Joined: Mon Jun 26, 2006 1:00 am
Location: Paris

Post by i-Bot » Fri Oct 26, 2007 12:51 pm

Post by i-Bot
Fri Oct 26, 2007 12:51 pm

I asume you mean the PWM ports at the top of the C3024, not servo ports. These can be changed from 0 to 100% duty cycle with the PWM command.

If you just want on or off, then you can address them as ports with the IN and OUT instruction. I think they are ports 46 and 47.

To drive a low current LED then use a resistor on the output to limit the current. For a higher current LED, you will need to drive an N MOSFET, transistor, or low side driver.

The maximum voltage on the C3024 pins is 5V, so you cannot pull up to 6V directly. If you want to switch power it depends if you need to switch the 6v, or can switch the ground. If you switch the ground the above low side drive will work OK. If you must switch the 6V, you need a high side driver or a P MOSFET. The P MOSFET will need to be driven by a transistor or N MOSFET to drive the gate of the P MOSFET.
I asume you mean the PWM ports at the top of the C3024, not servo ports. These can be changed from 0 to 100% duty cycle with the PWM command.

If you just want on or off, then you can address them as ports with the IN and OUT instruction. I think they are ports 46 and 47.

To drive a low current LED then use a resistor on the output to limit the current. For a higher current LED, you will need to drive an N MOSFET, transistor, or low side driver.

The maximum voltage on the C3024 pins is 5V, so you cannot pull up to 6V directly. If you want to switch power it depends if you need to switch the 6v, or can switch the ground. If you switch the ground the above low side drive will work OK. If you must switch the 6V, you need a high side driver or a P MOSFET. The P MOSFET will need to be driven by a transistor or N MOSFET to drive the gate of the P MOSFET.
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by kif » Fri Oct 26, 2007 1:33 pm

Post by kif
Fri Oct 26, 2007 1:33 pm

[quote="i-Bot"]I asume you mean the PWM ports at the top of the C3024, not servo ports. These can be changed from 0 to 100% duty cycle with the PWM command.

If you just want on or off, then you can address them as ports with the IN and OUT instruction. I think they are ports 46 and 47.


thank's for reply

yes this one

Do you have some exemple code for address IN & OUT instruction .

Where is the port 46 & 47 ( ad5 & ad6 ???) where is plug ???


Thank's
[quote="i-Bot"]I asume you mean the PWM ports at the top of the C3024, not servo ports. These can be changed from 0 to 100% duty cycle with the PWM command.

If you just want on or off, then you can address them as ports with the IN and OUT instruction. I think they are ports 46 and 47.


thank's for reply

yes this one

Do you have some exemple code for address IN & OUT instruction .

Where is the port 46 & 47 ( ad5 & ad6 ???) where is plug ???


Thank's
kif
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 81
Joined: Mon Jun 26, 2006 1:00 am
Location: Paris

Post by kif » Fri Oct 26, 2007 1:34 pm

Post by kif
Fri Oct 26, 2007 1:34 pm

[quote="i-Bot"]I asume you mean the PWM ports at the top of the C3024, not servo ports. These can be changed from 0 to 100% duty cycle with the PWM command.

If you just want on or off, then you can address them as ports with the IN and OUT instruction. I think they are ports 46 and 47.


thank's for reply

yes this one

Do you have some example code for address IN & OUT instruction .

Where is the port 46 & 47 ( ad5 & ad6 ???) where is plug ???


Thank's
[quote="i-Bot"]I asume you mean the PWM ports at the top of the C3024, not servo ports. These can be changed from 0 to 100% duty cycle with the PWM command.

If you just want on or off, then you can address them as ports with the IN and OUT instruction. I think they are ports 46 and 47.


thank's for reply

yes this one

Do you have some example code for address IN & OUT instruction .

Where is the port 46 & 47 ( ad5 & ad6 ???) where is plug ???


Thank's
kif
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 81
Joined: Mon Jun 26, 2006 1:00 am
Location: Paris

Post by kif » Tue Oct 30, 2007 9:05 am

Post by kif
Tue Oct 30, 2007 9:05 am

UP

Do you have please some example for code to switch On/OFF
one LED in Pin AD6 or other Pin ???

Thank's for advance
UP

Do you have please some example for code to switch On/OFF
one LED in Pin AD6 or other Pin ???

Thank's for advance
kif
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 81
Joined: Mon Jun 26, 2006 1:00 am
Location: Paris

Post by i-Bot » Tue Oct 30, 2007 11:50 am

Post by i-Bot
Tue Oct 30, 2007 11:50 am

For pin AD6 which is I/O number 38, this will flash an LED on the port where the LED is connected with a resistor to + 5V. I used a 680R resistor
and a green LED

loop:
OUT 38,0 ' turn LED on
DELAY 500 ' delay half sec
OUT 38,1
DELAY 500 ' turn LED off
GOTO loop ' delay half sec

See RoboBasic command instaruction manual for more information on IN and OUT
For pin AD6 which is I/O number 38, this will flash an LED on the port where the LED is connected with a resistor to + 5V. I used a 680R resistor
and a green LED

loop:
OUT 38,0 ' turn LED on
DELAY 500 ' delay half sec
OUT 38,1
DELAY 500 ' turn LED off
GOTO loop ' delay half sec

See RoboBasic command instaruction manual for more information on IN and OUT
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by kif » Tue Oct 30, 2007 8:22 pm

Post by kif
Tue Oct 30, 2007 8:22 pm

Thank's i-bot for reply & help

But y have 2 final questions (I am not to make a fatal error):

- 1 ok if understand i plug the - led in Pin - Ad6, and i plug the + led with resitor in Pin + Ad6 (the pin signal AD6 not connected) This is OK ???

- 2 do you have for me please the diagram connection correspondance MR C3024 Port AD == I/O number ???

AD6 = 38
AD5 =
AD4 =
AD3 =
AD2 =
AD1=
AD0 =



Thank's for advance
Thank's i-bot for reply & help

But y have 2 final questions (I am not to make a fatal error):

- 1 ok if understand i plug the - led in Pin - Ad6, and i plug the + led with resitor in Pin + Ad6 (the pin signal AD6 not connected) This is OK ???

- 2 do you have for me please the diagram connection correspondance MR C3024 Port AD == I/O number ???

AD6 = 38
AD5 =
AD4 =
AD3 =
AD2 =
AD1=
AD0 =



Thank's for advance
kif
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 81
Joined: Mon Jun 26, 2006 1:00 am
Location: Paris

Post by kif » Wed Oct 31, 2007 11:18 am

Post by kif
Wed Oct 31, 2007 11:18 am

Up
Up
kif
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 81
Joined: Mon Jun 26, 2006 1:00 am
Location: Paris

Post by i-Bot » Wed Oct 31, 2007 1:32 pm

Post by i-Bot
Wed Oct 31, 2007 1:32 pm

The + lead (long lead) of the LED should go to the middle pin (+V) of the 3 pin connector. The - lead of the LED should connect through the resistor to the control pin, which is the bin closest to the centre of the C3024. The outside pin (Gnd) is not used in this case.

The OUT and IN ports should be as follows:

http://robosavvy.com/Builders/i-Bot/C3024%20ports.pdf
The + lead (long lead) of the LED should go to the middle pin (+V) of the 3 pin connector. The - lead of the LED should connect through the resistor to the control pin, which is the bin closest to the centre of the C3024. The outside pin (Gnd) is not used in this case.

The OUT and IN ports should be as follows:

http://robosavvy.com/Builders/i-Bot/C3024%20ports.pdf
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by kif » Wed Oct 31, 2007 1:38 pm

Post by kif
Wed Oct 31, 2007 1:38 pm

Yes ok

Very very thank i-bot for you help

Best regards :wink:
Yes ok

Very very thank i-bot for you help

Best regards :wink:
kif
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 81
Joined: Mon Jun 26, 2006 1:00 am
Location: Paris


13 postsPage 1 of 1
13 postsPage 1 of 1