Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.

Get Started
Asked — Edited
Resolved Resolved by Dave Schulpius!

5V Inline Regulators For Sensors And?

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...


AI Support Bot
Related Content
Based on your post activity, we found some content that may be interesting to you. Explore these other tutorials and community conversations.
United Kingdom
If you learnt from it then it's not a bad thing. We learn by making mistakes:)
Don't feel stupid. Heck, I hooked the 5vdc port pin into that same "output" connector on the Sabertooth the first time I wired them both together. Thank goodness nothing bad happened when I powered it all up. *eek* I caught it later when nothing was working like expected and I reread the manual. *blush*
Good work , just a tip , keep a bag of heatshrink handy. It makes insulating custom wiring easier and safer than tape. It gives your wire a professional look too.:)
I was making an inline 5v sensor cables when I had noticed my sabertooth still connected to 5v pin on the ezb .... Thanks Rich
Not finished the cable yet... but I did forget the heatshrink... will definitely insulate the connections... I have lots more to make so I will be sure not to forget the heatshrink... Thanks
@Richard, What is that transistor your using in your picture? Have you tested it yet to see if you get a stable 5vdc from 3.3?
Hey Dave... it is a standard LM7805.... it gives a steady 5v... I think they are rated at 1.5amp as well... Overkill for basic sensors, but I had a bunch so I spliced a handful into some servo wire extenders...
Figured I'd mention that the ultrasonics that come with our Dev. Kits have an inline 5V regulator attached to them, I'm pretty sure we'll be offering them separately on the website but I'm not certain. I'll look into it.

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.
Thanks to both of you.

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. ;)
Hi @Dave,

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.
Thanks Skater, I was thinking the same thing. I also thought lowering the resistor value may work. Thanks for confirming this. Here's my circuit I designed and built. I think I'll start lowering R2. What do you think? Maybe by 1/2 the value?

User-inserted image
United Kingdom
Jeremy beat me to it there but since I want to chime in and have a few minutes, and for the benefit of everyone who isn't clued up on ohms law...

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;

User-inserted image

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.
United Kingdom
In fact, it looks like that may be useful straight away.

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
Thanks @Rich, great explanation!

@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.
Lol, thanks @Rich. I'm glad we arrived at similar values:) I guess 1.5kohm would probably be the closest standard value then.
United Kingdom
That was for Q3 which I then realised wasn't connected to the signal and was 24v (I've edited that bit out now since it's irrelevant)

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.
Wow thanks Rich for doing the math for me. I guess I was getting lazy by just guessing the value based on percentages between the 5v and 3.3v drop. I think I should have a 15k Ohm resistor.

BTW, don't you sleep? Isn't it well after midnight over where you live in the "Old Country"?
United Kingdom
I was just looking for the minimum current needed for a TIP120 to operate but I think the sun we have had today has shrivelled my brain... I think it's 1mA but don't quote me on that.

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.
Well, I did insert a 12k resistor at the base of Q1 and the circuit switches fine now. Looks like you guys are saying I can go down as far as 1.5K. I do have that value but I think I'll keep it at 12k for now. I always say if it isn't broke, don't fix it. Also the math work. ;)

Thanks for the help on this one!
United Kingdom
Yeah I'm the same with the whole if it isn't broke way of thinking to be honest. I know I didn't work out the resistor size for my TIP120/122 circuits, I just threw a 1k in and it worked so it was all good.

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:)