Go to advanced search

by Sabine
Thu Feb 13, 2014 8:44 pm
Forum: Python
Topic: use both RPIO.PWM.Servo AND RPIO.PWM?
Replies: 1
Views: 633

use both RPIO.PWM.Servo AND RPIO.PWM?

Hey I was wondering if I could use both RPIO.PWM.Servo AND RPIO.PWM in the same script. I have a servo running and another PWM component, say a LED. I have RPIO.PWM up and running. Also on the servo, this uses the same. But I want to switch the servo to RPIO.PWM.Servo since I read that that would be...
by Sabine
Sun Feb 02, 2014 3:34 pm
Forum: Python
Topic: Button, first press ON / second press OFF
Replies: 3
Views: 1183

Re: Button, first press ON / second press OFF

Thanks, I think I figured it out for the most part. This is what I did with the info you gave me. Is there a cleaner way to do this (and maybe with multiple buttons) setup: laserState = False laserStateOld = False if(laserStateOld == False): if(laserState == False): if(state[buttonLaser] == True): G...
by Sabine
Sun Feb 02, 2014 12:48 pm
Forum: Python
Topic: Button, first press ON / second press OFF
Replies: 3
Views: 1183

Button, first press ON / second press OFF

Hi guys, I have, I think, a simple question. But I just can't wrap my head around it. As an introduction: I have a PS3 controller connected to the RPI from which I can read the input. This I can read like: if(state['square'] == True): similar like: if(GPIO.input(24) == True): I know how to set up th...
by Sabine
Sat Jan 04, 2014 10:01 am
Forum: Beginners
Topic: Servo goes crazy with transistor
Replies: 16
Views: 4133

Re: Servo goes crazy with transistor

Doh! Of course ! Thats, aside from the fact it's better to switch the servo on from the high side, the reason the servo was tripping! As a first test I had GPIO to optocoupler, 5V from optocoupler to N-MOSFET, switching the 5V servo on/off. (problem!) Second I had GPIO to optocoupler, 12V from optoc...
by Sabine
Fri Jan 03, 2014 4:49 pm
Forum: Beginners
Topic: Servo goes crazy with transistor
Replies: 16
Views: 4133

Re: Servo goes crazy with transistor

Ah! sweet! 12V to the optocoupler's collector did the trick! Thanks Tage! I think I'm starting to understand it all a lot better because of all the help I get here! Thank you so much! Yesterday I went to my local electronics retailer and I asked for a FET with a low gate threshold of around 3V3 whic...
by Sabine
Fri Jan 03, 2014 2:33 pm
Forum: Beginners
Topic: Servo goes crazy with transistor
Replies: 16
Views: 4133

Re: Servo goes crazy with transistor

Thanks mahjongg and Tage, I now understand why I should buy a PNP transistor! I hope I find time tomorrow! For the meanwhile I'm using the same solution as I have used for the DC motor. (although I haven't tested it with the RPI. As a test for the circuit I've used 3V3 and a push button to simulate...
by Sabine
Thu Jan 02, 2014 6:09 pm
Forum: Beginners
Topic: Servo goes crazy with transistor
Replies: 16
Views: 4133

Re: Servo goes crazy with transistor

5Vdriver.png you could try to place the power switch in the +5V line and connect the servo GND to GND. I would think that the servo electronics receives some current with the ground lead floating and the signal lead connected to a lower voltage than 5V. Do you mean exactly like the diagram? I've pl...
by Sabine
Thu Jan 02, 2014 2:44 pm
Forum: Beginners
Topic: Servo goes crazy with transistor
Replies: 16
Views: 4133

Re: Servo goes crazy with transistor

I've just swapped the transistor with an IRFZ44N mosfet. The problem is gone. Not a single hiccup... BUT When I was playing with the transistor I've noticed something else... While running the test script (only does GPIO 04 = HIGH and GPIO 24 position to 1500) I've noticed the following. With the GP...
by Sabine
Thu Jan 02, 2014 2:05 pm
Forum: Beginners
Topic: Servo goes crazy with transistor
Replies: 16
Views: 4133

Re: Servo goes crazy with transistor

It is not clear when the twitch happens. Does it twitch when you switch the Pi on. Does it twitch when you switch gpio4 high (I'm assuming high switches power to the servo). What is gpio24 set as (input/output high/low PWM)? The twitch happens when the servo starts receiving power - without the tra...
by Sabine
Thu Jan 02, 2014 12:25 pm
Forum: Beginners
Topic: Servo goes crazy with transistor
Replies: 16
Views: 4133

Servo goes crazy with transistor

Aw yeah! my very first post! I have a question about the following diagram. Screen-Shot-2014-01-02-at-13.12.37.jpg I want to switch on the servo myself so that right after I switch it on I can send a position. This way the power-on twitch is as small al possible (right?) I've noticed the power-on tw...

Go to advanced search