detecting the voltage change from a single 5V AC input - Raspberry Pi General

what I have:
A single wire from my apart wall, that connects to the door button, when I use multimeter, it reads 0V - 0.5V AC, when someone press the door button, it raises to 5V AC
I have no access to the door buzzer transformer, and I don't konw when it's isolated or floating or even has a ground
a RPi 2B, some resistor, some capacitors, some sharp817 optoisolators, a breadboard, some jumper wires
What I want to do:
I want to connect this wire through an optoisolators and resistors to the RPi's GPIO, so I can call something like
GPIO.add_event_detect(channel, GPIO.RISING, callback=my_callback) to detect the door button push event
What's my problem:
I have no idea how to exactly make the cirecuit work, especially there is only one AC wire (positive live wire may be?, where's the ground wire?)
please help
and wish everyone merry christmas

I think it would be easier, when you use a schmitt-trigger and control a digital input of the Rpi. Did i understand right, that you only want to detect 0V or 5V ? You are not interestet in voltage levels between ?

Related

[Nexus 7] Externalize/Extend Power Button?

There are many of us in the Nexus 7 community who are looking to build our tablets in to our cars and other places where the power button will not be practically accessible. I am one of those people. I was wondering if anybody had any ideas on how to extend the power button?
The ribbon cable for the power and volume buttons can be seen here: http://www.ifixit.com/Guide/Installing+Nexus+7+Power+&+Volume+Button+Cable/9926/2
The header/connector on the board for the cable looks way too small to solder to and so my latest idea is finding a replacement ribbon cable that I could extend in to a tiny gauge wire and externalize from the case. From what I've been able to find so far, I think this is a ZIF FPC/FFC type ribbon cable and connector? I was thinking of something like this: http://www.mouser.com/ProductDetail...GAEpiMZZMvyL%2b65tEJ/L29YMZjxdjhiuZuU4IfHbXs= But I truly have no idea if this cable will fit? Anybody who's great with PCBs who would like to chime in?
If it helps I found a Molex catalog that has a couple connectors that look similar:
http://www.molex.com/catalog/web_catalog/pdfs/F.pdf
Subscribed!!
Ive been considering the nexus for my car pc aswell. Once i pick mine up i will tear it down and see if a ribbon cable could be either extended or possibly simply cut and have wires soldered to it for external power and volume. I have already designed a power supply for the nexus in the car that would also power a DAC and a HDD. I can provide the part number for the TI power chip that i used if anyone is interested. Its capable of producing 6 amps of current at 5 volts.
physical buttons suck. make all phone with only capacitive buttons,.
Interesting
jllbenson said:
physical buttons suck. make all phone with only capacitive buttons,.
Click to expand...
Click to collapse
How would that make externalizing the buttons as needed in this application any easier..?
irishboym4 said:
Ive been considering the nexus for my car pc aswell. Once i pick mine up i will tear it down and see if a ribbon cable could be either extended or possibly simply cut and have wires soldered to it for external power and volume. I have already designed a power supply for the nexus in the car that would also power a DAC and a HDD. I can provide the part number for the TI power chip that i used if anyone is interested. Its capable of producing 6 amps of current at 5 volts.
Click to expand...
Click to collapse
This is what I ended up doing. I got some good advice from another XDA'er who suggested I just pop the bubble button off the ribbon and solder to the contacts directly. In reality the bubble buttons are on a laminated sticker that I could just peel back. Then I soldered to the pads and pushed the cables out through where the rubber for the power button used to be. So far things seem to be working well, I'm a little weary of how this soldering will survive the swings in temperature being left in the car, but I guess there's only one way to find out. Observe:
dmexs said:
How would that make externalizing the buttons as needed in this application any easier..?
This is what I ended up doing. I got some good advice from another XDA'er who suggested I just pop the bubble button off the ribbon and solder to the contacts directly. In reality the bubble buttons are on a laminated sticker that I could just peel back. Then I soldered to the pads and pushed the cables out through where the rubber for the power button used to be. So far things seem to be working well, I'm a little weary of how this soldering will survive the swings in temperature being left in the car, but I guess there's only one way to find out. Observe:
Click to expand...
Click to collapse
Thats very nicely done. I want to do power and volume for my setup. Did the wire size you use work well or would you recommend smaller? otherwise i will need a separate volume control solution for the system. what do you have your tablet connected to for your amp and speakers?
Thanks. I used a 22 gauge wire, the smaller the better I think, as long as it's not bare. As far as amp, I'm using an aftermarket CD deck with a 3.5mm audio in. So I don't really plan on changing the volume on the tablet itself. I'll probably just keep it at 90% to avoid clipping and then adjust the gain with the CD deck. I haven't put it in my car yet though.
Steering Wheel Controls for Car PC
Has anyone tried the Joycon steering wheel control system with an android yet? It supports HID and no drivers are required for windows. It says that it cannot be programed from a linux or mac computer but just windows. Though once its programed it can be used with linux. Im thinking USB OTG plus this guy and you could control the tablet right from the steering wheel.
The solder will last fine on that job. The only thing I would be concerned about is getting false "presses" from the one lead that's soldered to the middle touching the outside ring. Perhaps just place a piece of electrical tape under it. Your other option might be to go straight from the connector the the flex plugs into. Just use a multimeter to test which pins you need to tap.
Thank you so much.
dmexs said:
How would that make externalizing the buttons as needed in this application any easier..?
This is what I ended up doing. I got some good advice from another XDA'er who suggested I just pop the bubble button off the ribbon and solder to the contacts directly. In reality the bubble buttons are on a laminated sticker that I could just peel back. Then I soldered to the pads and pushed the cables out through where the rubber for the power button used to be. So far things seem to be working well, I'm a little weary of how this soldering will survive the swings in temperature being left in the car, but I guess there's only one way to find out. Observe:
Click to expand...
Click to collapse
I just wanna thank the hell out of you. I have been searching and measuring that tiny little cable for about 2 hours now trying to find a connector and cable the right pitch/pins. Somehow the magical world of google brought me here. A site, despite my post numbers, I frequent very often. I'm installing the tablet in my car as well and I too needed a solution to the power button. Cant believe I didnt think to check here. You posted this just a few days ago. Crazy. Once again thank you. I should be able to pull this off no problem.
---------- Post added at 07:55 AM ---------- Previous post was at 07:49 AM ----------
Oh and by the way any issues with this so far? I dont imagine you have seeing as a switch on the to ends of the wire are doing exactly what the little foil button does. Just wanted to ask though before I commit to this in a couple of days.
I recommend if you are going to put it in a car, it needs some sort of quick release. If any stress is put on that cable, the contacts would either lift or the flex would rip pretty easily. I did my nook soldered straight to the main board and a quick release in the cable between the board and the button. I also did as much as I could to keep the cable from the back housing to board from moving by putting tape and locking the cable down when I put the back housing on.
The first picture shows the main board of the Nook. I just took off the old button and replaced it with my wiring. I used hot glue to keep it from wiggling.You can see the quick releases I used in the second picture. I just pulled them from a donor PC I had laying around.
Being a USB fan, I'd try to see if a custom USB device could do the job.
Just recently I made a USB volume control for Windows.
It works on my Nook Touch too.
Omyn said:
I recommend if you are going to put it in a car, it needs some sort of quick release. If any stress is put on that cable, the contacts would either lift or the flex would rip pretty easily. I did my nook soldered straight to the main board and a quick release in the cable between the board and the button. I also did as much as I could to keep the cable from the back housing to board from moving by putting tape and locking the cable down when I put the back housing on.
The first picture shows the main board of the Nook. I just took off the old button and replaced it with my wiring. I used hot glue to keep it from wiggling.You can see the quick releases I used in the second picture. I just pulled them from a donor PC I had laying around.
Click to expand...
Click to collapse
Exactly. I'm planning on using a male and female molex connector I found at radioshack. Currently I'm trying to figure out some intricacies involving Google Music and external storage but soon I'll have more pictures up here.
dmexs said:
Exactly. I'm planning on using a male and female molex connector I found at radioshack. Currently I'm trying to figure out some intricacies involving Google Music and external storage but soon I'll have more pictures up here.
Click to expand...
Click to collapse
keep us posted on the google music + external storage because i will be doing that soon aswell.
Have you tried connecting a faux USB HID device (like the Arduino Leonardo) and sending arbitrary keycodes while it's "off" to see whether any might be capable of waking it up? I don't know whether that could power it up from a "cold off" state, but I'm 99% sure you could wake it up from "screen off, asleep" that way.
Sent from my SAMSUNG-SGH-I747 using Tapatalk 2
bitbang3r said:
Have you tried connecting a faux USB HID device (like the Arduino Leonardo) and sending arbitrary keycodes while it's "off" to see whether any might be capable of waking it up? I don't know whether that could power it up from a "cold off" state, but I'm 99% sure you could wake it up from "screen off, asleep" that way.
Sent from my SAMSUNG-SGH-I747 using Tapatalk 2
Click to expand...
Click to collapse
I haven't tried this. I've just been using my externalized power button to wake the device from both warm and cold off states. I have a CNX-2140 power supply from my old car PC setup that has an ACPI pulse. I use this to wake the device from a warm sleep.
Thanks you XDA for being here. Just solved half of the problem my friend was having for his tablet . Mounting it in a 2006 Mustang. Now, Gotta see if he can use the POGO for charging and a USB OTG for the external camera
its help!! thanks!
What do you terminate the raw wire ends to now? I'd by looking at mounting some kind of button inside the cab of my vehicle to turn it on/off. What kind of button would a person look for? Thanks
---------- Post added at 09:44 AM ---------- Previous post was at 09:39 AM ----------
dmexs said:
How would that make externalizing the buttons as needed in this application any easier..?
This is what I ended up doing. I got some good advice from another XDA'er who suggested I just pop the bubble button off the ribbon and solder to the contacts directly. In reality the bubble buttons are on a laminated sticker that I could just peel back. Then I soldered to the pads and pushed the cables out through where the rubber for the power button used to be. So far things seem to be working well, I'm a little weary of how this soldering will survive the swings in temperature being left in the car, but I guess there's only one way to find out. Observe:
Click to expand...
Click to collapse
What do you terminate the raw wire ends to now? I'd by looking at mounting some kind of button inside the cab of my vehicle to turn it on/off. What kind of button would a person look for? Thanks

No Backup Camera on SWM 8802?

[SOLVED] TL: DR: Diagram show pink wire is for backup camera when the correct wire is brown as indicated by the tag on the wire itself.
I've had my SWM 8802 for about 8 months. I've always used a separate dashcam/backup cam combo, but also purchased a separate backup cam with an RCA output jack, and now I want to use it with my SWM 8802.
My head unit has a dedicated app from the home screen named AV In. Without anything connected (or connected but not powered, it just remains at the boot screen. Now my backup camera is tested and working. It has a power jack and an RCA jack. I tested this by hooking up a 12v 1A power adapter to it and an RCA cable from it to a TV, and it works. So with my vehicle I have the same power adapter connected to an extension cord. and it lights up.
The rear of my head unit has AV1, and AV2 (which I found out are video outputs), but it also has CAMIN and CVBSIN. Whne I have the camera going to CAMIN, and the AV In app activated, nothing shows up except the AV IN boot screen. However when I have the same RCA cable from the camera to the CVBSIN my head unit displays a red warning triangle with, "Viewing while driving strictly prohibited. Parking Break must be engaged to view." I don't know what the CVBS IN does, but if that's the only video port that works I'd like to find a way to disable that parking break sensor. Otherwise, why is the CAMIN not working the way it should? I can't have a backup camera if I have to have the parking brake enabled.
Attached is a photo of the wiring diagram that was advertised with the head unit. What steps should I take? The original RCA video cable has a red wire at both ends. What should those get attached to?
CAMIN is the input for the backup camera (CVBS camera - RCA plug).
CVBSIN is the input for the AUX AV IN camera (CVBS camera - RCA plug).
The backup camera will only display when triggered by the reverse gear signal... The pink wire in your image (PARKING SENSOR CONTROL) needs 12VDC when the vehicle is in reverse gear. This is usually connected to one of the reverse lamps at the rear of the vehicle (as is the power connector for the camera) so that the camera is powered up and the head unit switches tyo the camera input at the same time. The red wire in the video cable makes this easy... Attach the red wire to the pink wire at the head unit and connect the red wire to the power wire at the camera.
On almost all android head units, the backup (reverse) camera input is not available to the android operating system, so no android app can display the rear camera. The backup camera output is connected directly to the screen via the MCU so that the image is available even before the android operating system has booted.
The CVBSIN is the auxiliary in. Most unit require the brake wire (brown wire in your image) to be connected to ground before the image is displayed, for safety reasons. You can usually bypass it by connecting the brown wire directly to ground, or by selecting the bypass option that is available in the advanced car settings of most android head units.
That is excellent information! I wish that was included with the manual for all Android head units. I will try your suggestions and follow up. Thank you for this!
At first I tried the red wire to the stereo and no luck, only to come back and re-read the message and see that it should be a pink wire. I tried that = same.
Prior to this and after my first post. I had taken a terminal block and ran ring terminals to it. I hooked up my existing backup camera to it and it works fine, so I know those terminals are good. I ran new ones from the power connector + and - to the same terminals = still no video and no power to the camera. I made sure the car was on and the gear was in reverse. Perhaps I have to solder these ones on. Seems like the wires are a very small gauge for some reason. My alternative was to use an extension cord and plug that into the power of the camera, then test the video the Android head unit.
I just went ahead and bought a fuse tap, going to try that for the backup camera. I bought two, so if needed I can use another one to supply power to the camera itself.
I got it! It turns out that while the diagram showed the pink wire for the backup camera, the wire was labeled (or colored) wrong. I was out at my car this morning going to attempt it again when I traced the brown wire from the harness and it read "BACK". After some fiddling, I routed everything correctly including the powered RCA cable to a positive for the backup light, and the positive on the other end to the brown wire terminal. I started it up, hit the AV app, put it in reverse, and it displayed! So, it appears that when it down, use pink or brown to determine which one works.
I have a similar issue. My vehicle harness plugs straight in but its missing the cables for the brake. Is there a way of finding this easily? The cam works when plugged into the additional AV socket but so far can get it to work off the reverse.
Thanks.

gps wifi backlight and other problems fix

It seems that on older headunits soldering job is done very bad and much of mentioned and not mentioned problems are solved by resoldering android board.
Symptoms can be :
- not working backlight,
- not working gps or no satelites found,
- not working wifi,
- device not powering off or tuning screen of when you take key out from ignition, instead staying powered on for few or more minutes,
- switching to reversing camera by itself,
- not powering on,
- and many other....
Device should power off in very little time when you take key out if it is connected properly and by properly I think on supplied connectors and all wires connected, usually there are 3 wires black, yellow and red, black should be ground, yellow positive and red positive but switched on when you start your car and off when you take key out of ignition.
To fix most of the problems in all my cases you simply need to resolder all pins on android board which is soldered on top of main board, here are some photos and one very important video:
On photo you can see what you need to resolder, and yes you need to do it all and need to use leaded soldering wire and bunch of soldering flux.
Video: you should look whole but pay special atention on the part starting from 1:53 that is technique you need to use to do a good resolder job:
And last you should loose top cover of your head unit and replace it with big quiet fan which you can connect on mentioned black and red wire which will power the fan when you start the car and make things work better.
Atached is photo of my 5min job of zip tie mounted and not protected fan, but you should use grill taken from pc power supply or some other whey of preventing wires go into fan and making very nice sound and smell of shreded wires.

Atoto S8 cold booting each time

So I've had absolutely no help from Atoto support on this, but the problem I'm facing is that each time I turn the key or flick right on to ignition my unit boots from scratch each time. I really had hoped for a 2s boot up not complete power on cycles.
If it's a case of my wiring, the harness goes into a steering wheel loom (Connect2) and then on to the car plug. There isn't any visible option of running the yellow wire to a permanent 12v source. It's possible all is wired up correctly and my vehicle (Nissan nv200) has a switched feed. Any thoughts?
invertgoat said:
So I've had absolutely no help from Atoto support on this, but the problem I'm facing is that each time I turn the key or flick right on to ignition my unit boots from scratch each time. I really had hoped for a 2s boot up not complete power on cycles.
If it's a case of my wiring, the harness goes into a steering wheel loom (Connect2) and then on to the car plug. There isn't any visible option of running the yellow wire to a permanent 12v source. It's possible all is wired up correctly and my vehicle (Nissan nv200) has a switched feed. Any thoughts?
Click to expand...
Click to collapse
You'll need to get a multimeter and check to see if the 12v constant wire is truly getting a constant 12v. Test it as soon as you turn the key off and if it does have 12v then wait a couple hours and test it before turning the ignition on to ensure it's not something in the vehicle that is turning it off after a period of time.
If at any time that wire does not have a constant 12v then it's an issue/'feature' with your vehicle. If it always has 12v then potentially an issue with the HU.
kramttocs said:
You'll need to get a multimeter and check to see if the 12v constant wire is truly getting a constant 12v. Test it as soon as you turn the key off and if it does have 12v then wait a couple hours and test it before turning the ignition on to ensure it's not something in the vehicle that is turning it off after a period of time.
If at any time that wire does not have a constant 12v then it's an issue/'feature' with your vehicle. If it always has 12v then potentially an issue with the HU.
Click to expand...
Click to collapse
Since my OP I actually cut and fused the yellow wire on my harness out of the unit to a permanent 12v source on my fusebox. I then cut the red accessory wire on the head unit and connected it to the yellow wire on the harness. Kind od screwy and in reverse but I guess it makes sense as my old radio didn't need a permanent 12v. It was a simple on off thing.
Fingers crossed I haven't flattened my battery...

head unit not power on

Hello friends,
Today I received the multimedia system that I ordered from AliExpress and of course the frame did not arrive compatible with the car (as I was promised),
But I improvised and managed to overcome it,
The problem is that I connect all the cables properly and turn on the car but the unit just doesnt turn on,
Maybe I'm missing something and I don't know? I even tried replacing the fuse, but nothing.
In the video you can see everything, although in the video I only connect the power cable, but before that I tried with everything...
the system should turn on even when nothing is connected except the power cable, right?
I would appreciate your help because I am at a loss and the seller is not really helpful..
seat ibiza 2016
yanivos89 said:
Hello friends,
Today I received the multimedia system that I ordered from AliExpress and of course the frame did not arrive compatible with the car (as I was promised),
But I improvised and managed to overcome it,
The problem is that I connect all the cables properly and turn on the car but the unit just doesnt turn on,
Maybe I'm missing something and I don't know? I even tried replacing the fuse, but nothing.
In the video you can see everything, although in the video I only connect the power cable, but before that I tried with everything...
the system should turn on even when nothing is connected except the power cable, right?
I would appreciate your help because I am at a loss and the seller is not really helpful..
seat ibiza 2016
Click to expand...
Click to collapse
You should read the installation guide.
There are 2 power lines necessary to get it booting, and a ground to the car body.
There is a red one (mostly) which has BAT power at all time, and most probably a yellow one marked with ACC. This line switches the radio on when you turn the ignition key to on, so this line needs 12V from the ignition.
rigattoni said:
You should read the installation guide.
There are 2 power lines necessary to get it booting, and a ground to the car body.
There is a red one (mostly) which has BAT power at all time, and most probably a yellow one marked with ACC. This line switches the radio on when you turn the ignition key to on, so this line needs 12V from the ignition.
Click to expand...
Click to collapse
this are the cables that i have
yanivos89 said:
this are the cables that i have
Click to expand...
Click to collapse
Use a voltmeter or test light and measure the lines Battery, ACC and Ground.
Battery should have constant power and ACC should be powered if the ignition is on.
What is about the missing connection here?
yanivos89
To add the may be missing information:
You don´t feed the unit with any power. There is a connector with yellow and red line from both connectors, but you need to connect the one from the Quadlock to the head unit cable tree with the same colors. In the second picture I think there is an open connector for that.
thanks, you mean these orange and red wires? i connected them but still nothing
yanivos89 said:
thanks, you mean these orange and red wires? i connected them but still nothing
Click to expand...
Click to collapse
I think that this connector does not fit your car
Connectors in green area are used for speakers. And metal connectors in plug (from vehicle) are present.
Connectors in red area are used to supply power [battery+, ground, ACC], buttons illumination etc. and metal connectors are NOT present.
Look at blue arrows for reference
What is cars brand, model and production year?
wotii098 said:
I think that this connector does not fit your car
View attachment 5799475
Connectors in green area are used for speakers. And metal connectors in plug (from vehicle) are present.
Connectors in red area are used to supply power [battery+, ground, ACC], buttons illumination etc. and metal connectors are NOT present.
Look at blue arrows for reference
What is cars brand, model and production year?
Click to expand...
Click to collapse
seat ibiza 2016
wotii098 said:
I think that this connector does not fit your car
View attachment 5799475
Connectors in green area are used for speakers. And metal connectors in plug (from vehicle) are present.
Connectors in red area are used to supply power [battery+, ground, ACC], buttons illumination etc. and metal connectors are NOT present.
Look at blue arrows for reference
What is cars brand, model and production year?
Click to expand...
Click to collapse
Do you have the same unit and cable tree?
I can´t see the counterpart of the Quadlock connector coming from the unit.
To get a proper answer, we should see both connectors from the front and the back.
rigattoni said:
Do you have the same unit and cable tree?
I can´t see the counterpart of the Quadlock connector coming from the unit.
To get a proper answer, we should see both connectors from the front and the back.
Click to expand...
Click to collapse
No, those connectors are taken from yanivos89 photos - left is harness from his SEAT, right is from his android head unit.
There is no way to connect 52pin quadlock to 40 pin quadlock, even if plug physically it can be connected, the pins inside simply dont match.
yanivos89 said:
seat ibiza 2016
Click to expand...
Click to collapse
Best you can do is contact seller and ask for new harness. You need 52 quadlock connector, similiar to rest of modern VW group cars
Volkswagen (2015-2020) WG8 Sensor-Screen Bluetooth Head Unit pinout diagram @ pinoutguide.com
Additionaly you need to know that in your case everything is highly dependable on CANBUS decoder - harness from your car doesn't provide ACC signal to wake radio or signal for buttons illumination. It is solved via CAN signals.
Maybe CANBUS decoder also has to be replaced if wrong harness was sent.
Ahhh... didn´t see that.
You are right. In this case he has a wrong cable tree from Ali.
thanks very much to you both! i will check this,
what about the canbus? also need to replace or it fit?
yanivos89 said:
thanks very much to you both! i will check this,
what about the canbus? also need to replace or it fit?
Click to expand...
Click to collapse
...but you told us, that you was aware that the unit does not fit your car, right?
Wasn´t that good your decision to buy a not matching unit, right? Makes it complicated to reconfigure that stuff.
In this case: I think you will have to pay for a harness and may be also for a new CAN box. Try to buy one from the seller, or:
You also can buy a harness for VW/Skoda/Seat and crimp it to the current harness.
In this case you need to follow the connection graph on the unit and compare this with a picture of the OEM connector. Should be found on Google. May be the CAN connector works, may be not. There are a lot of CAN boxes available for your car in combination with Chinese aftermarket radios.
Good luck!
I think your car is MQB platform and the radio is for PQ platform. 52pin qadlock to 40pin. Maybe a reduction will help you
https://a.aliexpress.com/_mN4W48q
the harness of the 52 pins did solve my problem, thanks everyone for the help!

Categories

Resources