Page 1 of 1

Current Dilemma - Help Pleaseeee

Posted: Mon Mar 24, 2014 7:08 pm
by Cmcdaid
Ok back again with another hurdle to jump in getting my project completed. So all is going well with the ultrasonic sensors, both are calculating distance and I managed to get an area of the two dimensions showing also… awesome!!!

However my next step is getting these values onto a LCD. The screen pictured is a parallax LCD 3 pin setup, I haven't managed to get the screen working yet however the main problem I am going to face is that the screen needs 5V to power up and my two range sensors are already connected to the only two 5V pins on the GPIO.

So I am wondering can anyone give me some advice as to how I might solve this? Is the GPIO board out if the two 5V are in use? could it work via the usb port etc

Any info would be much appreciated :)

(p.s sorry for the shitty phone pic)


Image

Re: Current Dilemma - Help Pleaseeee

Posted: Mon Mar 24, 2014 7:18 pm
by pluggy
Conect the 5v from the GPIO to the breadboard and then take the 5v for everything from there ?

Re: Current Dilemma - Help Pleaseeee

Posted: Mon Mar 24, 2014 7:25 pm
by FLYFISH TECHNOLOGIES
Hi,
Cmcdaid wrote:Is the GPIO board out if the two 5V are in use?
Number of connected 5V devices is not important (you can connect 5 or more of them to the same 5V GPIO supply pin). What matters is the current they require and voltage levels on data pins...

Therefore:
- check what is a supply current sum (I'd guess that you can connect two distance sensors and on LED without overloading the RasPi; hopefully your power supply can also handle this) and
- check if you need 3.3V <> 5V logic level converters for data pins.

When the RasPi reads data from a 5V board (eg. distance sensor), you should not connect pins together directly (search here for discussions about "voltage divider").
If you write from RasPi to a device (eg. LCD) then you can try to connect GPIO output pins directly to LCD data inputs. If the data is not displayed (or you see a garbage), then you should consider using mentioned level converter.


Best wishes, Ivan Zilic.

Re: Current Dilemma - Help Pleaseeee

Posted: Mon Mar 24, 2014 7:50 pm
by Douglas6
"Current" dilemma....get it? :)

Re: Current Dilemma - Help Pleaseeee

Posted: Mon Mar 24, 2014 8:18 pm
by Cmcdaid
FLYFISH TECHNOLOGIES wrote:Hi,
Cmcdaid wrote:Is the GPIO board out if the two 5V are in use?
Number of connected 5V devices is not important (you can connect 5 or more of them to the same 5V GPIO supply pin). What matters is the current they require and voltage levels on data pins...

Therefore:
- check what is a supply current sum (I'd guess that you can connect two distance sensors and on LED without overloading the RasPi; hopefully your power supply can also handle this) and
- check if you need 3.3V <> 5V logic level converters for data pins.

When the RasPi reads data from a 5V board (eg. distance sensor), you should not connect pins together directly (search here for discussions about "voltage divider").
If you write from RasPi to a device (eg. LCD) then you can try to connect GPIO output pins directly to LCD data inputs. If the data is not displayed (or you see a garbage), then you should consider using mentioned level converter.


Best wishes, Ivan Zilic.
can you explain "check what is a supply current sum" a little more I'm not sure how to go about this, I'm fairly new to this stuff… noob alert


Douglas6 wrote:"Current" dilemma....get it? :)
I thought someone may appreciate that haha

Re: Current Dilemma - Help Pleaseeee

Posted: Mon Mar 24, 2014 8:31 pm
by FLYFISH TECHNOLOGIES
Hi,
Cmcdaid wrote:can you explain "check what is a supply current sum" a little more
For each board/circuit you (plan to) connect to the GPIO, take a look to the specification - how much current it consumes. Then summarize all these values and check if RasPi can provide this amount of the current.


Best wishes, Ivan Zilic.

Re: Current Dilemma - Help Pleaseeee

Posted: Mon Mar 24, 2014 8:40 pm
by Cmcdaid
Thanks for the quick reply. I think I'm following, so I'm assuming if its too high it could damage the pin and if its too low it will not work?

Re: Current Dilemma - Help Pleaseeee

Posted: Mon Mar 24, 2014 8:51 pm
by Cmcdaid
According to parallax website the screen with the backlight off uses 20ma & 80ma when the backlight is on and the ultrasonic sensor uses 2mA does that sound about right?

Re: Current Dilemma - Help Pleaseeee

Posted: Mon Mar 24, 2014 9:55 pm
by Douglas6
@Bertwert: That's a serial display, so you can just hook up power, ground and TX. There's a discussion and some code on this thread: http://www.raspberrypi.org/phpBB3/viewtopic.php?t=20092.
There are cheaper alternatives, on EBay et. al., but they might require more wiring and coding. Adafruit makes a 'pi plate' ('shield') I2C kit version, with buttons and a python library.

Re: Current Dilemma - Help Pleaseeee

Posted: Mon Mar 24, 2014 10:01 pm
by Cmcdaid
Yipp I started using the thread linked above :)

Re: Current Dilemma - Help Pleaseeee

Posted: Mon Mar 24, 2014 10:02 pm
by FLYFISH TECHNOLOGIES
Hi,
Cmcdaid wrote:According to parallax website the screen with the backlight off uses 20ma & 80ma when the backlight is on and the ultrasonic sensor uses 2mA does that sound about right?
This is ok... Even if you have also ordinary USB keyboard & mouse attached, the consumption is within RasPi's capabilities.


Best wishes, Ivan Zilic.

Re: Current Dilemma - Help Pleaseeee

Posted: Mon Mar 24, 2014 10:57 pm
by Douglas6
@Bertwert, I didn't mean to hijack cmcdaid's thread. Why don't you start a new thread with as much information as you can about your 16x2 display (these come in several flavors; serial interface, I2C or SPI expander, or bare HD44780 chip ) and I or someone can get you going, I'm sure.