These are chat archives for nebrius/raspi-io

5th
Feb 2017
Jérôme Loï
@gorhgorh
Feb 05 2017 18:17
Hi there starting to play with raspi-io, congratulation on the project
I have a couple of question about it, when you have a minute
I need to sudo node files that uses it is that "normal" because of the GPIO usage using modprobe, or did i missed something ?
I played with led with now problem, but it seems that creating a servo does not work, nor error, and i see there are external modules for PWM does that mean that servo need to be driven by theses rather by a standard j5 servo ?
Bryan Hughes
@nebrius
Feb 05 2017 18:47
Hi Jérôme! You need to use sudo because the underlying library I use in raspi-io requires it. As far as the servo goes, you should be able to use any servo. Are you sure that the servo is connected to a pin that supports PWM, and that it has enough power?
Jérôme Loï
@gorhgorh
Feb 05 2017 19:24
@nebrius hey hey yes I'm, and i linked the ground form the servo power to the pi one
electricaly wise this should work
i need to find my oscilloscope to check that i'm listening to the right pin
Bryan Hughes
@nebrius
Feb 05 2017 19:26
Let's go back to power. What are you plugging the 5v wire on the servo to?
Jérôme Loï
@gorhgorh
Feb 05 2017 19:26
some bench power supply
Bryan Hughes
@nebrius
Feb 05 2017 19:27
Ok, that's good. Are you sure your servo responds to 3.3v logic?
Jérôme Loï
@gorhgorh
Feb 05 2017 19:28
this is a good question, let me test with an arduino on the side
Bryan Hughes
@nebrius
Feb 05 2017 19:28
Arduino’s are 5v devices though, so that wouldn’t tell you
Jérôme Loï
@gorhgorh
Feb 05 2017 19:30
voltage divider to the rescue then :)
gorhgorh @gorhgorh let the calculator out
Bryan Hughes
@nebrius
Feb 05 2017 19:30
Ah, good idea
:)
Jérôme Loï
@gorhgorh
Feb 05 2017 19:31
ok be back in a bit then, need to find fitting resistors :)
Jérôme Loï
@gorhgorh
Feb 05 2017 20:03
ok seems that you nailed it, these servos expects 5V, I'll see if i have some level converters around
5 as signal i mean
Jérôme Loï
@gorhgorh
Feb 05 2017 20:16
so you use BJT to drive servo from rPis usually ?
Bryan Hughes
@nebrius
Feb 05 2017 20:18
I don't often use the RPi to drive servos, but when I do I try to use servos that are 3.3v tolerant (some are)
Jérôme Loï
@gorhgorh
Feb 05 2017 20:20
that make sense as well
I don't really get why 3.3 can't drive them all infact
since pwm is time based
ok, so stop here for today of bjt / mosefet are my available options
thanks for the info and time @nebrius
Bryan Hughes
@nebrius
Feb 05 2017 20:31
np! The reason some servos don't work is because the latching voltage is higher than 3.3v. Basically it thinks 3.3v is still logic low, not logic high
Jérôme Loï
@gorhgorh
Feb 05 2017 20:35
yes but 3.3 on 5 v should be high isn't it ?
anyway ... looking in the carboards for npn and resistors :)
Bryan Hughes
@nebrius
Feb 05 2017 20:36
Not usually. Logic high and low is not the supply voltage divided in two
Instead they use a technique called latching
Basically, when something is logic low, it won't switch to high until it's pretty close to the supply voltage, typically 60-80% of the supply voltage
And then once it's high, it won't switch to logic low until it's under around 0.5v on most 3.3 and 5v systems
It "latches" on to the previous change
Jérôme Loï
@gorhgorh
Feb 05 2017 20:45
ahh ok, thanks for the info