protecting a Raspberry Pi GPIO pin from being fried - Raspberry Pi General

What is the recommended way of protecting a Raspberry Pi GPIO pin from being fried as a result of unintentionally setting the pin to output mode while it is indirectly connected to the opposite polarity (ground or 3.3V) through a sensor (because it is intended to be used as an input pin connected to the sensor instead of an output pin)? I've read that there are different protection circuits for the GPIO pins that can be implemented, but I don't know which one that is sufficient for this particular situation.

Related

Ext... ExtUSB?

Does anybody know of the "new" schematics of ExtUSB on TouchPro that includes the TV-out functionality? (or even for that matter the USB-Host ability of 7500?)
It would be interesting to know how they fit those things on the 6 extra pins...
Try this
http://forum.xda-developers.com/showpost.php?p=2515344&postcount=7
ah thanks
strange though...
Pin 1 was the Mic line.
Pin 5 was the Mic ground but also the antenna.
Hands-free accessories still work, don't they? So how did they make it?
I see they probably use USB ground (11) for the audio, although they used to use pin 4.
Strange...
I tried to put the info together here: http://forum.xda-developers.com/showpost.php?p=2610305&postcount=19
Pin A (or 11, digital ground) is used as ground, pins 3 and 5 are connected to detect the video cable. In a headset, pins 4 and 5 are connected, with pin 3 being connected to them only when pressing the switch.
nice, makes sense

Docking Station (ADT-002) Teardown

This is my first post with links and info and stuff so please don't mind the bad formatting or other errors.
I bought a docking station a bit back and tore it down; I'm not very impressed but I'm sure we can make something of it.
Dock:
Connector and IR:
Connector - Top:
Connector - Bottom:
Mainboard - Top:
Mainboard - Bottom:
As you can see on this unit there isn't any HDMI however the board was made for it. Also of note is the HDMI pins on the ribbon cable.
I've checked and the nuvoTon (W78E052DFG) is an 8052 with 8KB flash and 256 bytes ram.
The audio portion seems to have a filter set on it however I don't believe it's amplified.
I have not been able to determine if there is or isn't USB on the ribbon cable or connector though there's no sign of it on the board.
Another point is I've switched to a custom rom and it no longer detects the dock. I noticed before switching that there is a service that watches for the dock and I'm guessing sends a signal to android to start the media app on dock. Virtuous XooM does not in any way detect connection.
Communication with the 8052 is through serial and the kernel source shows info about it. I haven't been able to find any reference to USB. if USB is present I'd expect it to be the pair near pin 30.
(All images taken with the A500 camera)
------- New info: (copied from later post)
This is the dock pinout as seen by the tablet (other devices may have different pins connected)
1-10 no connection
11 - unknown - traced to Q9 near IR connector on dock but unable to find past there (2v from tablet)
12 no connection
13 - audio connect of some sort - appears to be connected to left channel (after capacitor) through a 1k resistor
14 - Right audio - decoupled with 100uF
15 - Left audio - decoupled with 100uF like right channel
16 - Audio ground - not connected to main ground
17 no connection
18-20 +12V
21-30 HDMI - NO signals connected except GND at 21,24,27,30
31 - unknown - 3.3v from tablet
32 - TXD pin on 8052 through a level converter
33 - RXD pin on 8052 through a level converter
34 - unknown - 0v - 3.3v when dock unpowered but tablet connected so this may be a dock detection
35 - connected to 33 on tablet side
36 - connected to 32 on tablet side
37-40 no connection
These are all assumptions based on zebra cable layout so are quite probably wrong. They are also numbered based on the ribbon cable and I haven't made a conversion between ribbon cable and connector.
A voltage readings were done with an uncalibrated DMM on an oscilloscope (which seems to be .2v off or more). If i mark "from tablet" it's because it's not live when tablet not present and live even if power is disconnected from base.
1 case ground 0v
2-7 serial port(0v across)
8-20 HDMI
21unknown 3.3v from tablet
22 unknown 2v from tablet
23 unknown 2v from tablet
24-25 audio - audio even when nothing plugged in 0v
26 audio ground 0v
27 unknown 2v from tablet
28 unknown 0v (3.3v when dock unpowered but tablet docked)
30-35 12.0V
37 unknown 0v
38-40 gnd
Audio pins are correct but I can't tell which channel is which without finding a mp3 with audio only on one side. I would also trust the HDMI pins as ballanced pairs with shield between running directly to the HDMI portion of the board does seem rather proving.
None of the pins really look like USB as they should remain at 0v until a device is plugged in. I'll test connecting a 1500 ohm resister to 3.3v while monitoring the pin under test and see if I can find a USB connection attempt that way. If that doesn't work, finding pins with 15k ohm to GND would also indicate USB and I can try connecting a device to those.
Just recieved mine today from Amazon (they went on sale, so I figured I'd bite). No HDMI is disappointing, but not a dealbreaker for me.
Oddly enough, my biggest complaint is that it doesn't come with it's own power cable. I was hoping to leave the dock hooked up at home, and be able to pack the (INCREDIBLY SHORT) A500 power adapter in my bag for when I go out. Looks like it's back to eBay for another...
Excuse my off-topic mini rant. The teardown is appreciated. Curious if you ever did find anything with the USB pins.
I've read there are 2 versions of this docking station, one with HDMI and another without. It seems a lot of sellers are advertising the HDMI version but when people receive it, they get the non-HDMI version instead. Seems it's a hit or miss if you buy it online, probably safer to buy it from a brick & motar store so you can verify which version you're actually getting.
Sorry for off-topic too, just wanted to warn those that are thinking of getting this docking station
Nice tear-down btw.
Any idea what the part number for the connector itself is ? I am interested in a custom dock setup and all I am concerned about its power, however I need to find the mating connector to integrate into it.
Any info is appreciated!
Jeff
Quality of the photo surprised me !
So, any more info on this? I am putting an a100 in my dash, and I would like to use the dock connector at some point. For now I'll just run the power and audio through their ports I guess, but I would like to simplify the install at some point.
If these things suck so much, hopefully the price will drop soon, and I'll feel comfortable buying one to take apart for experimenting myself.
Thanks!
endoracing said:
Any idea what the part number for the connector itself is ? I am interested in a custom dock setup and all I am concerned about its power, however I need to find the mating connector to integrate into it.
Any info is appreciated!
Jeff
Click to expand...
Click to collapse
There aren't any identifiable markings however I think I found the right connector by checking some of the vendors who make 'em. I'm almost positive the connector is: JAE - DD2 Series
This means that there's also a cable variant of the dock side connector, cool eh?
I have not measured the connector to see if the dimensions are correct but the pitch, count, offset appearance and overall appearance are perfect matches. Even the slits cut into the top of the tablet-side connector match what's in the drawings. Still not a guarantee, but good enough for me to buy a couple to see if they match.
Here are the digikey parts:
PCB connector - $7.67 in singles
Cable connector - $10.67 in singles
Acer make two docking station models:
LC.DCK0A.001 without hdmi http://www.aceronline.es/shop/docking-station-para-acer-iconia-tab-a500a100-lcdck0a001-p-3786.html
LC.DCK0A.002 with hdmi http://www.aceronline.es/shop/docking-station-para-acer-iconia-tab-a500a100-lcdck0a002-p-3787.html
HDJ80 said:
Acer make two docking station models:
LC.DCK0A.001 without hdmi
LC.DCK0A.002 with hdmi
Click to expand...
Click to collapse
Perfect information. It seems that the 002 (HDMI) version has not been released in the US. It is not available on Acer's US site, nor do any of the US based online or B&M stores have it.
I'm definitely eager to see how this turns out. I'd love to know what each of the pins definitely is.
One assumes that the HDMI version is only required for the A100 series as the A500 already has full HDMI built in. Would the HDMI circuitry even work with an A500 in the dock? In fact, can you actually use the docks at all mismatched to the Iconia for which they were intended?
zardoz99 said:
One assumes that the HDMI version is only required for the A100 series as the A500 already has full HDMI built in. Would the HDMI circuitry even work with an A500 in the dock? In fact, can you actually use the docks at all mismatched to the Iconia for which they were intended?
Click to expand...
Click to collapse
I wouldn't assume that at all... docs are designed to be left in place... so the purpose for the hdmi on the doc is so that you can keep it connected to your display all the time and not have to worry about plugging in the cable and the power... etc. where the doc satisfies both those needs. And I believe.. the hdmi doc for the a500 was available some time before the a100 was even released. (chk)
loialotter said:
Here are the digikey parts:
PCB connector - $7.67 in singles
Cable connector - $10.67 in singles
Click to expand...
Click to collapse
Thanks loialotter.
What's your confidence that pin 30-35 is actually 12V? Is is obvious (direct connection to the power port on the docking station)?
I will be buying one of those connectors (making a car dock) and want to be sure I won't be frying anything.
I will confirm if the connector fits and works in the A500 once I get the connector.
outsider787 said:
Thanks loialotter.
What's your confidence that pin 30-35 is actually 12V? Is is obvious (direct connection to the power port on the docking station)?
I will be buying one of those connectors (making a car dock) and want to be sure I won't be frying anything.
I will confirm if the connector fits and works in the A500 once I get the connector.
Click to expand...
Click to collapse
It's direct connectivity between +12v on the power jack and pins 30-35 on the zebra cable. These are not the same numbers on the connector itself.
If you look on SJ100278.pdf (digikey has link to drawing) the pin numbers are there. Note that the connector is wider at the top (notches near 21 and 40 on the side guides if that makes sence).
Pin 18,19 and 20 are +12V. There's no block of GND pins like I was expecting, instead GND is connected to 3, 6, 21, 24, 27, 30, and the connector shield. Due to the pattern of the gnd contacts, i'm guessing they're the shielding ones for HDMI. The connector is rated for 1A power per pin which means you need to use at minimum 2 of them.
I still haven't seen anything resembling USB and noticed that the tablet only uses a 20 pin zebra cable to the connector board (power included though they may pass GND through the case).
Now that I have my proper electronics desk at least partly set up, I can look further into the connector.
outsider787 said:
Thanks loialotter.
What's your confidence that pin 30-35 is actually 12V? Is is obvious (direct connection to the power port on the docking station)?
I will be buying one of those connectors (making a car dock) and want to be sure I won't be frying anything.
I will confirm if the connector fits and works in the A500 once I get the connector.
Click to expand...
Click to collapse
It's direct connectivity between +12v on the power jack and pins 30-35 on the zebra cable. These are not the same numbers on the connector itself.
If you look on SJ100278.pdf (digikey has link to drawing) the pin numbers are there. Note that the connector is wider at the top (notches near 21 and 40 on the side guides if that makes sence).
Pin 18,19 and 20 are +12V. There's no block of GND pins like I was expecting, instead GND is connected to 3, 6, 21, 24, 27, 30, and the connector shield. Due to the pattern of the gnd contacts, i'm guessing they're the shielding ones for HDMI. The connector is rated for 1A power per pin which means you need to use at minimum 2 of them.
I still haven't seen anything resembling USB and noticed that the tablet only uses a 20 pin zebra cable to the connector board (power included though they may pass GND through the case).
Now that I have my proper electronics desk at least partly set up, I can look further into the connector.
Every now and then you find things that make you just exclaim WTF at the top of your lungs.
The dock connector board located in the tablet does not appear to have HDMI signals on it. The zebra cable between it and the mainboard has 20 pins. 17-20 are +12V, 12-15 are GND. I'm having troubles doing continuity tests between any of the HDMI signal pairs and the other pins on the internal connector.
Bad news on the USB front, there is no 5V and all the USB pins internal to the tablet float at 0.067V disconnected and I don't see similar levels on any of the pins.
It's looking more and more like the dock was designed for a completely different product. Can someone over where the HDMI capable docks are available check their tablet internals and see if the connector board is any different. Alternatively can someone test one of the HDMI docks to see if it even works with their tablets.
I'm working through the tablet side right now, I'll take some pictures and document my findings in a little bit here.
------- New info:
This is the dock pinout as seen by the tablet (other devices may have different pins connected)
1-10 no connection
11 - unknown - traced to Q9 near IR connector on dock but unable to find past there (2v from tablet)
12 no connection
13 - audio connect of some sort - appears to be connected to left channel (after capacitor) through a 1k resistor
14 - Right audio - decoupled with 100uF
15 - Left audio - decoupled with 100uF like right channel
16 - Audio ground - not connected to main ground
17 no connection
18-20 +12V
21-30 HDMI - NO signals connected except GND at 21,24,27,30
31 - unknown - 3.3v from tablet
32 - TXD pin on 8052 through a level converter
33 - RXD pin on 8052 through a level converter
34 - unknown - 0v - 3.3v when dock unpowered but tablet connected so this may be a dock detection
35 - connected to 33 on tablet side
36 - connected to 32 on tablet side
37-40 no connection
That being said - anyone wana mod their tablets? I was thinking adding a tiny USB hub in where the USB cable runs and make a new dock connector that has USB on it (taking over for the stupid serial pins maybe). Would need a new series of docks (or mod boards for the docks)... maybe a silly idea though
----
Oh, also, is there anyone even interested in me reverse-engineering the serial protocol used for the IR control? I can probably do so with some time but it'll require me to reformat my tablet to factory as none of the other ones seem to support the dock.
:facepalm:. I bet they designed this port, initially, for their own proprietary means in a lab/repair environment, and said "Ya know, if we're gonna have this ugly port on the thing, may as well find something that the consumers would be able to use this for", thus coming up with the dock and only for syncing...
Acer UK store( http://store.acer.com/store/aceremea/en_GB/list/parentCategoryID.55934900/categoryID.56077100 ) claims that the HDMI version of the dock is only for the A100/A101 while the non-HDMI is only for A500/A501.
Power up tablet throught dock port
Anyone knows if it's possible to send a signal to power up (as if you push the power button) to power up the tablet?
I know that they have a powerbutton on the remote but i don't know how to do it to start it.
Thanks!

[Q] How to hack a single micro usb for charging and data transfer at same time

Hello guys, I'm trying to interface android tab with peripherals. Problem is, it is having only one micro USB port which is used for charging and otg/host, only one function is possible at a time .But I need to charge the tab and simultaneously transfer data to peripherals, say for example I need to use external mouse and charge the tab at same time.
So, is there any way to do it?
I know usb has 4 pins 5v,d+,d-,gnd. I thought to wire charging input power to tab pin 5v and gnd and pin D+,D-of tab to mouse D+, D- and giving external power supply to 5v and gnd pin of mouse.
Is this a right method? To charge and transfer the data at the same time?
Kindly help me. Suggest a better way to do it.
(mini & micro) USB connectors have 5 pins: Vbus, D-, D+, Id, Gnd.
For OTG, the Id pin is connected to Gnd.
It's like the old adage, "You can lead a horse to water, but you can't make him drink."
You can connect a peripheral to an OTG host and have it work fine.
You can then connect an external power supply across the Vbus and Gnd.
The problem is, how does your host device know that it can "drink"?
There are basically two ways.
If the host detects power on its input before it switches into OTG host mode it may continue to charge.
If the host is in OTG host mode, device-specific commands to the charging circuits may convince it to charge.
There may also be non-standard Id resistor values for signalling host & charge for some devices.
I think your mileage would vary very much depending on what devices your using. AOS was not meant to deal with people hacking on the USB port, and probably the code to implement those features depend on your HW/FW.
If its a Samsung, you can play with some resistor values like these:
http://forum.xda-developers.com/showpost.php?p=25532839&postcount=2
I think the USB "CarKit" specifications should allow you both to charge and "connect" in some way.
A more easy solution would be to use a BlueTooth mouse and keep charging as usual.

Connecting a 24v appliance to Raspberry Pi.

Hello, I am trying to do an Internet of Things project with the help of a Raspberry Pi. While most of the project is complete, there is one small thing I am stuck at. I need to connect a solenoid valve to the Pi. The valve needs a voltage of 24v-36v to operate. I connected three 9v batteries together in series to operate it. The valve opens when the voltage is applied and closes when it not. I want to control the opening and closing of the valve by the Pi’s GPIO pins. I’m using a NPN 2N3904 transistor for that. However, it’s not working. The circuit works sometimes and doesn’t work other times when I manually pull and put in the GPIO pin. It never works with code. Is the 27v causing problems with the Pi? What can I do? Is there another way to control it apart from NPN transistors?
i suggest to use a 5v relay with an external power supply to control your solenoid.
Regards.

Compatiible PIR detector / camera with Raspberry pi?

Hi, I'm interested in setting up a motion detection system with a PIR detector and camera connected to Raspberry pi, so that an email is sent to me with photo (or video) when movement is detected.
Would I need to buy a specific PIR detector that is compatible with Raspberry pi? Or would any PIR detector work? I'd be interested in one with a detection range of around 10 metres.
Also, is it possible to connect a normal webcam to the Raspberry, or only the small module camera? And finally, could I use a 2 metre cable to connect the PIR sensor and camera?
I'm thinking of placing the Raspberry pi indoors (connected to a home 3g WIFI router by LAN cable) and just outside an exterior wall, install the sensor and camera, so I'm wondering about cable lengths, also for camera .
Thanks
Any PIR sensor should work if it has 3 pins Power Data and Ground
OK, thanks
Hi again, I bought a 12V Abus PIR detector and the company has told me that the detector needs to be connected with at least 4 cables: 2 for the "alarm", and 2 for voltage input and ground. How would I connect these to the RP 3+ ? Thanks

Categories

Resources