B4J Question Raspberry Pi question for the experts

Mark Read

Well-Known Member
Licensed User
Longtime User
I know this is not really the best place to ask but many of the users can probably help. To continue my data acquisition app in b4j I need to add a serial port to my Pi to deal with 5V signals. My problem is that I have a 5" touchscreen (from Makibes) attatched to the GPIO which then blocks the pins I need for the adapter.

How can I add the adapter and still keep the screen? Is there a GPIO adapter for Pi2 B?

Many thanks.
 

Mark Read

Well-Known Member
Licensed User
Longtime User
I did think about using a Serial2USB converter but I have to be careful apparently with the voltage. The Pi uses 3.3V and my sensor uses a standard serial with 5V, so I need a chip to prevent crisping the Pi, something like this:

https://www.conrad.at/de/rs-232-erweiterungs-platine-fuer-den-raspberry-pi-1337093.html

maybe combined with this:

http://uk.rs-online.com/web/p/inter...22677633D4E4F4E45267573743D3834312D3738343426

I am new to the Pi and have been reading for the last three days, enough to confuse me anyway.

The touchscreen uses a single black connector on the GPIO. This is the screen:

http://motherboard.computertechnetw...pberry-pi-2-model-b-raspberry-pi-model-b-b-a/

I was hoping to get some kind of adapter to connect the serial port and then the screen on top but this must be very small as the screen also connects via the HDMI port.
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
I'm guessing you're best choice will be to go with a different screen or loose the touch capabilities of the existing screen....
 
Upvote 0

Mark Read

Well-Known Member
Licensed User
Longtime User
I will probably go a different way and use a serial to ttl adapter cable. That way I can keep the screen.

Still toying with the idea of using bluetooth and controlling the Pi with my tablet.
 
Upvote 0

KMatle

Expert
Licensed User
Longtime User
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
What exactly do you want to do? (I assume it is a "not enough place to wire all that stuff" thing and the display will NOT use ALL GPIO-pins)

So just change the wiring with an adapter/cable

I can understand he's problem. Almost every touch capable screens are "snap on" on the gpio connector even if they only use a couple of them. Physically it just renders almost impossible to use the free gpio pins... If you can get a grip on which pins are in fact needed by your screen, then you can cut-off the connector leaving only the used pins to connect... Just a though!
 
Upvote 0

Mark Read

Well-Known Member
Licensed User
Longtime User
I will try and explain again. My sensor communicates via a RS232 port, which works well on a PC. My problem is that I need to hold the sensor on an extension (2-3 m), a laptop, two power cables and a cable roll. This is too much even for two people.

I would like to replace the laptop AND all cables with just the sensor and the Pi. The Pi should power the sensor (5V, 10 mA) and have the touch screen attatched to allow a data logger program to run. This program I will attempt in B4J.

M main problem is, if I have read correctly, the standard 232 uses 5V and the Pi uses 3.3V. Therefore I need an adapter board like this:

upload_2015-12-20_12-22-41.jpeg

The problem is the connector on the GPIO. These pins are used by the screen which I need.

upload_2015-12-20_12-41-23.jpeg

Also the hdmi connector is used:
upload_2015-12-20_12-42-19.jpeg

That leaves me with the option of a different screen or a serial/ttl usb converter and hope that it works.

The other way I was thinking of is to do away with the screen, take the serial adapter, run my software with bluetooth active and use a coupled tablet as a display.
 
Last edited:
Upvote 0

rwblinn

Well-Known Member
Licensed User
Longtime User
Hi,

to consider is running the Raspberry Pi headless with wlan and a B4J server application serving the sensor. The server application can then be accessed via any device having a browser. The B4J server application to be developed on a PC using the B4J Bridge. When running fine install on the Raspberry Pi and ensure started at boot.
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
is the PI a must use?
You can go a little bit lower-tech and use an Arduino along with a couple of RF serial modules;
Another solution would also be to use Bluetooth communication straight from the headless pi... or duino.
 
Upvote 0

Mark Read

Well-Known Member
Licensed User
Longtime User
I will take a look at the headless version connected via bluetooth. Will probably have loads of questions though, have to learn somehow!!
 
Upvote 0
Top