BBC BASIC
« GPIO pins »

Welcome Guest. Please Login or Register.
Jan 23rd, 2018, 4:51pm


Cross-platform BBC BASIC (Win32, Linux x86, Android, Mac OS-X, Raspberry Pi)

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: GPIO pins  (Read 308 times)
michael
Full Member
ImageImageImage


member is offline

Avatar




PM


Posts: 141
xx Re: GPIO pins
« Reply #5 on: Nov 27th, 2017, 7:42pm »

Quote:
ADC for that, presumably. The GPIO pins are all 'digital' aren't they?


I have set up all of these systems before on the Arduino and it was measured on the analog pins. Essentially, it should be a matter of wiring on the bread board in this order:

GND to 10k resistor,analog sensor(digital read wire), photo resistor, to positive to 3.3v positive.

The Ultrasonic distance sensor and temperature sensor have similar set up method. I have made videos for those. I also have made videos for relay controls.

I believe if the GPIO pins can return a voltage sense (3v) then they can be used to track the voltage levels returned by the devices.

In that example it is just a button detection..

I would probably get this ADC or maybe a cheaper one from a different supplier:

https://www.bc-robotics.com/shop/16-channel-analog-input-hat-for-raspberry-pi/

The GPIO pin 24 I believe is also an analog pin.

The Pi3 is by far a simpler system to program and I have looked over the automation training docs.. Its essentially the same..

I am doing research on how people do it on Pi3.. I seen one example where they used a capacitor..

« Last Edit: Nov 27th, 2017, 11:18pm by michael » User IP Logged

I like reinventing the wheel, but for now I will work on tools for D3D
Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 692
xx Re: GPIO pins
« Reply #6 on: Nov 27th, 2017, 9:20pm »

on Nov 27th, 2017, 7:42pm, michael wrote:
I believe if the GIPO pins can return a voltage sense (5v) then they can be used to track the voltage levels returned by the devices.

The electrical specification of the I/O pins on the relevant chip is here. As is typical of 'TTL-compatible' devices, a logic '0' must be <0.4 V and a logic '1' >2.4 V. You must not apply a voltage between these two thresholds for more than a few microseconds at most; if you do it can result in the input gate drawing excessive current from the supply or oscillating - or both! This may damage the device.

It seems from that specification that it is possible to configure the input gate as a Schmitt-trigger under software control, but I don't know whether the RPi software normally does this or not. If it does it may provide some protection from applying intermediate voltage levels, but it would make it useless as a 'pseudo-analogue' input because of the hysteresis.

Digital means digital! If you want to measure or detect an analogue signal you need to use a separate ADC. I have more than 30 years experience as a hardware design engineer, so I know what I am talking about.

Quote:
The GPIO pin 3 I believe is also an analog pin.

It is an I2C pin according to all the references I have seen.

Richard.
(M.A. C.Eng. M.I.E.T.)
User IP Logged

michael
Full Member
ImageImageImage


member is offline

Avatar




PM


Posts: 141
xx Re: GPIO pins
« Reply #7 on: Nov 27th, 2017, 10:20pm »

Ah yes. I looked in the manual and for Input lesson it has the power wire on the 3.3 v and the GPIO pin they are using for input is 24. It does require a 10k resistor in the construct .

Page 164 and 165 of your Pi manual.

Quote:
Digital means digital! If you want to measure or detect an analogue signal you need to use a separate ADC. I have more than 30 years experience as a hardware design engineer, so I know what I am talking about.


Here is the Pi ADC you speak of:

https://www.bc-robotics.com/shop/16-channel-analog-input-hat-for-raspberry-pi/

I wish I had your skill set.

Ill end up needing to order that part and other relevant parts to get things set up proper. Ill research this in depth

Ill fix the last post to prevent confusion.

I guess I took for granted the Pi would have the same basic voltage for electronic connections as the Arduino..

I was surprised that even the LCD example was all 3.3v..

Good thing you corrected me before I pulled out my parts and wired up 5v!! You are awesome Richard!

The 7 inch touch screen wires to 5v according to specs.

( I really looked carefully before I did any operations. I, like anybody, don't want to ruin over $300 worth of stuff.)



« Last Edit: Nov 27th, 2017, 11:21pm by michael » User IP Logged

I like reinventing the wheel, but for now I will work on tools for D3D
Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Donate $6.99 for 50,000 Ad-Free Pageviews!


This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls