
Dunning-Kruger

I know sensors like pings and IR will need a 5V regulator inline if you put more than 5V through the V4 board... Just noticed my sabertooth motor controller also uses a 5V input line in addition to the signal line and ground line... Does this mean even motor controllers will need a 5V inline reg as well? I tried removing the +5V wire from the sabertooth (in other words just leaving the signal and ground attached) and it still seem to work fine at controlling motors... Just wondering what will need 5V regulators and what won't...
Thanks
Richard
As for sharp infrared sensors, little known fact is that they can operate at 3.3V. The distances may not be to exact specifications but we have tested them and they still exhibit a linear response. Just hook them up to the analog ports like on the v3.
Here's what I need to do, I need to bump up the signal voltage on a V4 of pin D0 to 5v like the old the old V3 provided. I built a high side switching out of a couple mosfets (Driver and pre-driver) that I was using with the V3. However the 3.3 vdc that now comes from the v4's D0 signal pin wont open and close the transistor. I thought It would be eaiser to bump up the voltage with a converter rather then rebuild the switching board. Not sure it will work though. The V4 not providing 5v anymore is sure a pain when retrofitting. However it's one of the only pains I've felt so far.
I thought the same thing when we started the V4 design, but to my surprise almost all the accessories that we used with the V4 that specified 5V logic could actually be used with 3.3V logic. This is because a 5V logically high is considered a "high" down to 2.7V and since 3.3v falls in that range it all works out. Another nice this about the v4 are the 5V tolerant pins. This means the v4 can handle 5v signals coming back to it.
Something to consider when using a transistor is that they are current controlled, voltage doesn't play too much of a factor. When moving from 5v to 3.3v logic all you will have to do is lower the resistor value going to the base of the transistor and things should return to normal functionality.
Ohms law states that V = I x R, in other words, Voltage is equal to the current multiplied by the resistance. To work out the new resistance required due to the drop in voltage from 5v to 3.3v we just need to apply Ohms law.
As we will need to find out I and R too, we can use the Ohms Law Triangle;
This basically tells us that;
V = I x R
I = V / R
R = V / I
We want to find the new R to push the current back up to what it was. So first we need to find out what the current (I) was...
Assuming the original resistor is 10k ohm;
I = V/R
I = 5/10000
I = 0.0005A or 0.5mA
Now we have dropped the voltage to 3.3v the current will have changed, this calculation isn't necessary but just for completeness I'll show it;
I = 3.3/10000
I = 0.00033A or 0.33mA
The current is therefore lower, which is (as Jeremy said) what is causing the transistor not to switch.
So, now we need to work out what resistor we need to replace the 10k ohm resistor.
We know V is now 3.3v, we know I was 0.0005A
R = V/I
R = 3.3/0.0005
R = 6600 Ohms or 6k6 Ohms.
So, now it's just a case of replacing the 10k Ohm resistor for a 6k6 ohm resistor.
So in Dave's situation he has a 33k ohm resistor and 5V feeding the base of the transistor Q1.
The current it was getting to operate on the V3 would have been;
I = V / R
I = 5 / 33k
I = 0.00015151515A or 0.1515151515mA
Now the V4 uses 3.3v we can work out the resistance required to have 0.1515151515mA at the base.
R = V / I
R = 3.3/0.00015151515
R = 21780 Ohms
Since resistors don't come in such specific values we can round it up to a 22k ohm resistor which will give 0.15mA which is probably OK. Or play safe and round it down to 20k ohm for 0.165mA
@Dave the value I normally use with 3.3V signals on a transistor base is 1kohm. I would suggest maybe trying to use a potentiometer and start at 33k and dial it down until 3.3V switches the transistor on.
Q1 is 22k which to me seemed high, so I'm glad you said 1k ohm.
I use 1K ohm on my transistor switching circuits at 5v, I haven't tried one at 3.3v yet but I would imagine that it would work without issue.
BTW, don't you sleep? Isn't it well after midnight over where you live in the "Old Country"?
Basically, look at the datasheet for the transistor or fet you are using, find the minimum current needed on the base/gate for operation, take 3.3 and divide it by that number and that's your maximum resistor value.
So if I am right with 1mA it's 3.3/0.001 = 3k3 ohm maximum.
1k ohm will put; 3.3/1000 = 3.3mA at the base/gate which should be high enough to operate and below the maximum current for the base/gate.
Thanks for the help on this one!
And fyi, it's 10pm here so not quite as late as you thought but no, I don't sleep much... 5 or 6 hours a day at weekends, 4 or 5 if I'm lucky during the week. That's all I need and it gives me plenty of time to play with robots