Cmcdaid
Posts: 22
Joined: Wed Mar 12, 2014 2:38 pm

Current Dilemma - Help Pleaseeee

Mon Mar 24, 2014 7:08 pm

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

User avatar
pluggy
Posts: 3635
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: Current Dilemma - Help Pleaseeee

Mon Mar 24, 2014 7:18 pm

Conect the 5v from the GPIO to the breadboard and then take the 5v for everything from there ?
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

User avatar
FLYFISH TECHNOLOGIES
Posts: 1750
Joined: Thu Oct 03, 2013 7:48 am
Location: Ljubljana, Slovenia
Contact: Website

Re: Current Dilemma - Help Pleaseeee

Mon Mar 24, 2014 7:25 pm

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.
Running out of GPIO pins and/or need to read analog values?
Solution: http://www.flyfish-tech.com/FF32

User avatar
Douglas6
Posts: 4860
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Current Dilemma - Help Pleaseeee

Mon Mar 24, 2014 7:50 pm

"Current" dilemma....get it? :)

Cmcdaid
Posts: 22
Joined: Wed Mar 12, 2014 2:38 pm

Re: Current Dilemma - Help Pleaseeee

Mon Mar 24, 2014 8:18 pm

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

User avatar
FLYFISH TECHNOLOGIES
Posts: 1750
Joined: Thu Oct 03, 2013 7:48 am
Location: Ljubljana, Slovenia
Contact: Website

Re: Current Dilemma - Help Pleaseeee

Mon Mar 24, 2014 8:31 pm

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.
Running out of GPIO pins and/or need to read analog values?
Solution: http://www.flyfish-tech.com/FF32

Cmcdaid
Posts: 22
Joined: Wed Mar 12, 2014 2:38 pm

Re: Current Dilemma - Help Pleaseeee

Mon Mar 24, 2014 8:40 pm

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?

Cmcdaid
Posts: 22
Joined: Wed Mar 12, 2014 2:38 pm

Re: Current Dilemma - Help Pleaseeee

Mon Mar 24, 2014 8:51 pm

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?

User avatar
Douglas6
Posts: 4860
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Current Dilemma - Help Pleaseeee

Mon Mar 24, 2014 9:55 pm

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

Cmcdaid
Posts: 22
Joined: Wed Mar 12, 2014 2:38 pm

Re: Current Dilemma - Help Pleaseeee

Mon Mar 24, 2014 10:01 pm

Yipp I started using the thread linked above :)

User avatar
FLYFISH TECHNOLOGIES
Posts: 1750
Joined: Thu Oct 03, 2013 7:48 am
Location: Ljubljana, Slovenia
Contact: Website

Re: Current Dilemma - Help Pleaseeee

Mon Mar 24, 2014 10:02 pm

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.
Running out of GPIO pins and/or need to read analog values?
Solution: http://www.flyfish-tech.com/FF32

User avatar
Douglas6
Posts: 4860
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Current Dilemma - Help Pleaseeee

Mon Mar 24, 2014 10:57 pm

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

Return to “General discussion”