GPIO'4'Cars

Post Reply
User avatar
mctom
Posts: 2744
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: OGA, XU4, C2, M1, H3+, SP3, Vu8M
Location: Gdansk, Poland
Has thanked: 368 times
Been thanked: 481 times
Contact:

Re: GPIO'4'Cars

Post by mctom »

Sometimes the only way to know the component orientation is another picture from the datasheet, showing a piece of tape in which components are packed.
There they usually show which corner is pin #1, so machine operators know how to program them for automatic assembly.
That's why many component don't have pin #1 marking.. because hand soldering doesn't matter anymore :(

If you do not have a component packed on tape, you google some seller that has a photo of the same component still packed on tape :D Which usually happens on Aliexpress for any reason.
These users thanked the author mctom for the post:
zyssai (Tue Feb 21, 2023 7:02 am)
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

User avatar
zyssai
Posts: 698
Joined: Wed Jan 27, 2021 6:42 pm
languages_spoken: english, french
ODROIDs: Odroid N2+ 4Gb
VU7C
Has thanked: 306 times
Been thanked: 129 times
Contact:

Re: GPIO'4'Cars

Post by zyssai »

That's a good idea, I will check the way they are packed in the tape. But, I must take care to not let them fall off of my tweezers :lol:

User avatar
zyssai
Posts: 698
Joined: Wed Jan 27, 2021 6:42 pm
languages_spoken: english, french
ODROIDs: Odroid N2+ 4Gb
VU7C
Has thanked: 306 times
Been thanked: 129 times
Contact:

Re: GPIO'4'Cars

Post by zyssai »

So... Where to start? :lol:

First try at home worked. I not really seen any improvement at screen initialization due to my 3m ribbon cable, I think it's normal.

Once I moved it to the car, no boot, no sign of life at all. Wtf?
Removed of the car, no boot at home :lol:

After some measurements, I found 12v at an attiny85 input :shock:
This comes from the regulator, shorted from input to output :evil:
Don't know what happened. So the voltage regulator and the ATtiny85 are dead.

Removed the ATtiny85, replaced the voltage regulator, checking voltages, it's ok so I replaced the ATtiny85 and.. it works at home.

I probably made a short circuit while connecting to the car but really don't know how.

So after that... Screen initialization is worse that before :cry:
In the car I cannot have a display. I'll just throw away the N2 to the window while driving then I thought to one thing.
LTC4311 is probably dead also, because it is powered by the VR.
So I'll change it asap. And if I have no real improvement, the last thing I will try is to setup the LTC4311 at the end of the line, so directly to the screen.

Hope I'll get it working because it really drives me crazy :lol:

Edit: Can death of VR be due to LTC4311 wrongly soldered? I mean, if it's in the wrong way?
Is it possible to find the VCC pin position with multimeter diode mode?

User avatar
mctom
Posts: 2744
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: OGA, XU4, C2, M1, H3+, SP3, Vu8M
Location: Gdansk, Poland
Has thanked: 368 times
Been thanked: 481 times
Contact:

Re: GPIO'4'Cars

Post by mctom »

It's very hard to destroy a linear voltage regulator, as they are usually internally protected against overcurrent and overheating. How did you destroy it? No idea, one thing that comes to my mind is passing the current in reverse, there's no protection against that. That must have involved connecting voltage in reverse or something similar...
Or maybe the regulator is good but you tested it on board before you removed it? Check again after you desoldered the regulator, maybe something else is shorted.

Mounting LTC4311 in reverse can't destroy a voltage regulator like that, but just to be safe you can just not mount it before the next test.

It is possible to tell which pin is which, but there's no simple, universal method. Try comparing position on a tape with component documentation.

I think you can use two LTC4311 on both ends, but I'm not sure about that.
These users thanked the author mctom for the post:
zyssai (Tue Feb 21, 2023 7:45 pm)
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

User avatar
zyssai
Posts: 698
Joined: Wed Jan 27, 2021 6:42 pm
languages_spoken: english, french
ODROIDs: Odroid N2+ 4Gb
VU7C
Has thanked: 306 times
Been thanked: 129 times
Contact:

Re: GPIO'4'Cars

Post by zyssai »

Strange as you say. Reverse current, I do not think, as the wiring harness I use is this one, and the car part is already wired, so I just have to plug the ATX to the board:

Image

And I take care to always plug it at last. But no worries, at least everything is not destroyed :lol:
I directly tested VR after desoldering and it was shorted from input and output (but not to ground, strange). I tested the board for shorts before resoldering everything.

I have not found any information about tape positioning. I will try to take a shoot of the marking.

User avatar
zyssai
Posts: 698
Joined: Wed Jan 27, 2021 6:42 pm
languages_spoken: english, french
ODROIDs: Odroid N2+ 4Gb
VU7C
Has thanked: 306 times
Been thanked: 129 times
Contact:

Re: GPIO'4'Cars

Post by zyssai »

Just in case I need to mount LTC4311 at the end of the line, between the screen and the ribbon cable, here:

Image

I have quickly designed this:

Image
Image
Image

3D model part of the header is not really good, real dimensions of pins are approx. 12.2mm lenght, so it could fit correctly between the header and the ribbon cable.

Image
These users thanked the author zyssai for the post:
mctom (Thu Feb 23, 2023 6:58 am)

User avatar
mctom
Posts: 2744
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: OGA, XU4, C2, M1, H3+, SP3, Vu8M
Location: Gdansk, Poland
Has thanked: 368 times
Been thanked: 481 times
Contact:

Re: GPIO'4'Cars

Post by mctom »

I think there is a problem with the network at my new work, it doesn't load pictures from your posts. :( Got to see them when I get home.
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

User avatar
mctom
Posts: 2744
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: OGA, XU4, C2, M1, H3+, SP3, Vu8M
Location: Gdansk, Poland
Has thanked: 368 times
Been thanked: 481 times
Contact:

Re: GPIO'4'Cars

Post by mctom »

Okay now I can see, what a smart design! I like it.
These users thanked the author mctom for the post:
zyssai (Thu Feb 23, 2023 4:16 pm)
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

User avatar
zyssai
Posts: 698
Joined: Wed Jan 27, 2021 6:42 pm
languages_spoken: english, french
ODROIDs: Odroid N2+ 4Gb
VU7C
Has thanked: 306 times
Been thanked: 129 times
Contact:

Re: GPIO'4'Cars

Post by zyssai »

This is the best picture of LTC4311 I can take. For me, pin1 is at bottom left.

Image

User avatar
zyssai
Posts: 698
Joined: Wed Jan 27, 2021 6:42 pm
languages_spoken: english, french
ODROIDs: Odroid N2+ 4Gb
VU7C
Has thanked: 306 times
Been thanked: 129 times
Contact:

Re: GPIO'4'Cars

Post by zyssai »

So...

It comes again.
I have now 2 VR, 2 Attiny, and 2 LTC4311 died.

All worked at home, but died in car.
I'm not sure for the moment, but I think I have found possible problem.

I have wired LTC4311 directly to voltage regulator, so it is powered permanently, there is an enable pin, I wired it to 3.3v of N2.

Image

This way, when N2 is off, LTC enters sleep mode (5uA from datasheet).
When N2 is on, LTC starts running.

I haven't see any improvement at home with 3m ribbon cable with this wiring, always some glitches.

Today I tried to wiring LTC VCC directly to N2 3.3V, this way it is powering on only with N2.

At home, with 3m ribbon cable, I have perfect functionality, no glitches at all, like if I have no ribbon cable. So LTC chip is doing the job perfectly.

The question is, why everything is burning when I move it in the car? Strange. I'm running out of ideas, and out of stock with chips :lol:
I will try step by step while installing it.

User avatar
mctom
Posts: 2744
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: OGA, XU4, C2, M1, H3+, SP3, Vu8M
Location: Gdansk, Poland
Has thanked: 368 times
Been thanked: 481 times
Contact:

Re: GPIO'4'Cars

Post by mctom »

Have you made any other changes on the PCB? I can't remember but perhaps LTC chip is not related to the catastrophic damages.
Seems like VR_3.3V is doing something nasty.
Could you post the whole schematic, updated?

I'm glad the LTC chip is doing its job though. :)
These users thanked the author mctom for the post:
zyssai (Fri Feb 24, 2023 3:41 pm)
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

User avatar
zyssai
Posts: 698
Joined: Wed Jan 27, 2021 6:42 pm
languages_spoken: english, french
ODROIDs: Odroid N2+ 4Gb
VU7C
Has thanked: 306 times
Been thanked: 129 times
Contact:

Re: GPIO'4'Cars

Post by zyssai »

Thanks mctom, unfortunately, I don't see any update that could cause this.

Here is the last schematic. I will double check car voltages before plug all this stuff, but not sure I will have the time before next week.

User avatar
mctom
Posts: 2744
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: OGA, XU4, C2, M1, H3+, SP3, Vu8M
Location: Gdansk, Poland
Has thanked: 368 times
Been thanked: 481 times
Contact:

Re: GPIO'4'Cars

Post by mctom »

There is one scenario that maybe does the difference.
If you look at the USB receptacle, two pins are longer than the rest, so the device gets power first, and then connects data lines.
You said you connect the power last...

Also, when you plug in the 6-pin MOLEX connector, those pin connect to the board in a random order, certainly not "all at the same time". I imagine that at home you turn on the power supply instead, which ensures that GND is connected first, and then 12V shows up. I don't know if it matters in your case, just a loose idea.

Anyway, to try protecting your chips, you could add a resistor between 12V_PERM and 3.3V regulator input. I'll assume your VR_3V3 net is loaded with 20mA max, since it only powers ATtiny. Thus the resistor may have a value of around 330Ohm. Should be enough to prevent catastrophic failure and allow the regulator to work normally up to some 20mA.

Since you connected LTC chip to 3V3 directly I don't think it will fail again. That was a good decision by the way - it should have been connected to the same power supply as I2C, I missed that before you ordered the new PCB.
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

User avatar
zyssai
Posts: 698
Joined: Wed Jan 27, 2021 6:42 pm
languages_spoken: english, french
ODROIDs: Odroid N2+ 4Gb
VU7C
Has thanked: 306 times
Been thanked: 129 times
Contact:

Re: GPIO'4'Cars

Post by zyssai »

mctom wrote:
Fri Feb 24, 2023 5:30 pm
There is one scenario that maybe does the difference.
If you look at the USB receptacle, two pins are longer than the rest, so the device gets power first, and then connects data lines.
You said you connect the power last...

Also, when you plug in the 6-pin MOLEX connector, those pin connect to the board in a random order, certainly not "all at the same time". I imagine that at home you turn on the power supply instead, which ensures that GND is connected first, and then 12V shows up. I don't know if it matters in your case, just a loose idea.
I'm not sure the problem can be related to USB. But, you're right, USB power first before to connect data, due to the connector design.

Regarding molex connector, it's sure that I absolutely don't know which pin will connect first, but only 12V_PERM is present while connecting. Others are I suppose grounded.
mctom wrote:
Fri Feb 24, 2023 5:30 pm
Anyway, to try protecting your chips, you could add a resistor between 12V_PERM and 3.3V regulator input. I'll assume your VR_3V3 net is loaded with 20mA max, since it only powers ATtiny. Thus the resistor may have a value of around 330Ohm. Should be enough to prevent catastrophic failure and allow the regulator to work normally up to some 20mA.

Since you connected LTC chip to 3V3 directly I don't think it will fail again. That was a good decision by the way - it should have been connected to the same power supply as I2C, I missed that before you ordered the new PCB.
You're idea seems as always nice, this way the resistor prevent damage to the voltage regulator?
You wrote between 12V_PERM and 3.3V regulator input
But, isn't it between 12V_PERM and 3.3V regulator output?

Anyway, LTC VCC is defined like this in the datasheet:

Image

So, using another power supply probably make bad behavior.
I will try asap with new wiring.

Another thing, I asked a redittor member, he answered this:

Code: Select all

they (a) have a fairly low max input voltage (16V?), and (b) can be unstable if the output cap isn't well (too low or high capacitance, or too high ESR). Either of those out of spec can cause them to fail in-out short.
So there is probably something with the 1uF capacitor I added for LTC4311.

Thanks again for your advices my friend.

User avatar
mctom
Posts: 2744
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: OGA, XU4, C2, M1, H3+, SP3, Vu8M
Location: Gdansk, Poland
Has thanked: 368 times
Been thanked: 481 times
Contact:

Re: GPIO'4'Cars

Post by mctom »

zyssai wrote:
Sat Feb 25, 2023 4:43 am
You're idea seems as always nice, this way the resistor prevent damage to the voltage regulator?
You wrote between 12V_PERM and 3.3V regulator input
But, isn't it between 12V_PERM and 3.3V regulator output?
I meant the series resistor, that should be connected between 12V_PERM and 3.3V regulator input. That involves cutting a trace that connects these two points right now, unfortunately.. So I'll leave it as an optional safety measure.
A 330 Ohm resistor, in case of a complete short between 14V and GND, will pass only 36mA of current, as opposed to, well, infinity.
36mA is still a lot, but the resistor should burn first and save voltage regulator.

Your regulator supports up to 22uF output capacitance, and 18V absolute maximum input voltage, so I don't think that's a problem.
Also I don't believe the voltage regulator could fail because the output capacitor had a wrong value... Why would that happen? :| (Never seen that happen either)

I wonder, did you run DRC check on your board? Maybe there's one ground copper island not connected to the rest?
These users thanked the author mctom for the post:
zyssai (Sat Feb 25, 2023 10:44 pm)
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

User avatar
zyssai
Posts: 698
Joined: Wed Jan 27, 2021 6:42 pm
languages_spoken: english, french
ODROIDs: Odroid N2+ 4Gb
VU7C
Has thanked: 306 times
Been thanked: 129 times
Contact:

Re: GPIO'4'Cars

Post by zyssai »

Thanks, I will keep the resistor idea for next bench, with a cuttable trace if needed.
I thought about replacing the mcp1703 by an LM317, despite it is oversized.

I am doing DRC check all the time, with ground copper layer reconstruction, this way I'm sure everything is done correctly, and anyway, it is necessary to generate gerber file.

BUT anyway,

I took time to test this new wiring of LTC4311 chip.
I done it by steps, while checking every voltages.
It is finally working perfectly into the car, for the moment :)

N2 starts, LTC chip seems to do the job (but I can't be sure as I noticed the initialization problem is majoritary coming with low external temperatures, at frosty morning).

So for now we can tell the LTC chip needs the same VCC as the I2C bus, but why it burned in car? We will keep doubt about this :lol:

User avatar
mctom
Posts: 2744
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: OGA, XU4, C2, M1, H3+, SP3, Vu8M
Location: Gdansk, Poland
Has thanked: 368 times
Been thanked: 481 times
Contact:

Re: GPIO'4'Cars

Post by mctom »

I admit I'm not fluent in your layout design so I can't confirm it's correct. IT looks good and DRC has no problems, but..

Once, two jobs ago, I made a large PCB for an automatic circuit tester. It was 30x15cm and I spent two months, 8 hours every day, designing it.
I haven't done any GND connections at all, thinking I'll just copper pour the GND on both sides, add some vias, and it will make its way everywhere it's needed. That kept DRC happy, and sent it to production.
A factory technician took another 2 days assembling it by hand.
It didn't work, of course, that's the point of the story. I spent another week figuring out what was wrong. Until I took a digital multimeter and measured voltage at GND between two distant corners on the board - 0.7V!

What happened? The copper pour made a very thin connection between two ground planes along the edge of the board. The PCB manufacturers cut the individual boards from a bigger sheet and do it with some finite precision. And they cut off my crucial GND connection.

I had to break the news to my manager who wasn't happy with this already overdue project. We had to make another PCB, this time with extra inner layers dedicated to GND only. It was very expensive, keep in mind that was before JLC was accepted as a credible supplier.

Since then I don't trust DRC to do the job for me, sometimes I even forget to run it. I route GND just like any other signal on the board, and let copper pour just make it thicker in the end. Unless GND is a dedicated inner layer on 4-layer PCB, then that doesn't matter. :)
Another moral of this story: keep everything you care about 1mm away from the edge.

But anyway! Yes, LM317 is a good idea - I keep a lot of them because they're universal. A bigger chip shouldn't cause you any problems too. Keep in mind they come in a few package sizes, and LM317LCPK is my favorite.

I'm glad you solved the LTC chip issue, and hope it will stay solved even when the temperature drops.
zyssai wrote:
Sat Feb 25, 2023 10:44 pm
Thanks, I will keep the resistor idea for next bench, with a cuttable trace if needed.
Just add 0R resistor, you won't have to cut traces at all. :) Or 100R.
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

User avatar
zyssai
Posts: 698
Joined: Wed Jan 27, 2021 6:42 pm
languages_spoken: english, french
ODROIDs: Odroid N2+ 4Gb
VU7C
Has thanked: 306 times
Been thanked: 129 times
Contact:

Re: GPIO'4'Cars

Post by zyssai »

This is unfortunately how we learn, by make some mistakes, and sometimes it can cost a lot!
DRC helps to keep an eye to the connections, but for sure do not replace an experienced eye.
Thanks for report this peace of history, I used it by double check my copper pour and I found some spaces not perfectly arranged.

Regarding LTC chip, it is not easy as you can see, as there is some other traces in the top layer:

Image

But I will improve it with time.

I checked all auxiliary connectors and all of them are working perfectly.
I can input 12V from switches or lights or everything else and it is reported immediatly into Macrodroid app so I can use it to do extra actions. Perfect :P

I will come back here after the week to let know if everything is working as intented.

User avatar
zyssai
Posts: 698
Joined: Wed Jan 27, 2021 6:42 pm
languages_spoken: english, french
ODROIDs: Odroid N2+ 4Gb
VU7C
Has thanked: 306 times
Been thanked: 129 times
Contact:

Re: GPIO'4'Cars

Post by zyssai »

So, some days after the last update, we can tell that everything works perfectly.

Initialization problem of VU7C is solved with LTC4311 chip.
Start and stop of N2 is working more than perfectly.
PWM of Attiny85 is incredible.
Steering wheel controller port with keymatrix functionnality is amazing, all controls are working.
All auxiliary inputs are working.
BT module is working (but calls level seems to low for me, I think this is due to BT module output level too low), mixing works perfectly.

All I can tell is that we worked together with the community, and I never thought we can go so far, it's amazing.
A huge thanks to all of you for your help, especially one guy ;)

User avatar
mctom
Posts: 2744
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: OGA, XU4, C2, M1, H3+, SP3, Vu8M
Location: Gdansk, Poland
Has thanked: 368 times
Been thanked: 481 times
Contact:

Re: GPIO'4'Cars

Post by mctom »

Not true, you built that stuff yourself, there was merely a council of guys throwing random ideas at you. ;)
I'm glad you learned so much in the proces, that was the point. Now you can program microcontrollers and make good looking PCBs, how does it feel? :)
These users thanked the author mctom for the post:
zyssai (Wed Mar 01, 2023 7:22 pm)
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

DeWire
Posts: 23
Joined: Wed Dec 25, 2013 9:58 am
languages_spoken: english
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: GPIO'4'Cars

Post by DeWire »

Very impressive project. I literally just bought this on eBay and I'm very excited to get started with it :D

What car amp and DAC do you use? Is there anything in particular you would recommend?

User avatar
zyssai
Posts: 698
Joined: Wed Jan 27, 2021 6:42 pm
languages_spoken: english, french
ODROIDs: Odroid N2+ 4Gb
VU7C
Has thanked: 306 times
Been thanked: 129 times
Contact:

Re: GPIO'4'Cars

Post by zyssai »

DeWire wrote:
Wed Mar 01, 2023 6:31 pm
Very impressive project. I literally just bought this on eBay and I'm very excited to get started with it :D

What car amp and DAC do you use? Is there anything in particular you would recommend?
Hi!

I'm glad you find it useful and will be very pleased to send you one :)
Unfortunately I am missing some components (and forgot to change stock on eBay) but have ordered them and hope to receive them before the end of the week.

So with chance I can ship out this Saturday.

Regarding the car amplifier, I am personally using this one, sounds good to me and is fully manageable with DSP. Frequencies, delay, level...

User avatar
zyssai
Posts: 698
Joined: Wed Jan 27, 2021 6:42 pm
languages_spoken: english, french
ODROIDs: Odroid N2+ 4Gb
VU7C
Has thanked: 306 times
Been thanked: 129 times
Contact:

Re: GPIO'4'Cars

Post by zyssai »

mctom wrote:
Tue Feb 28, 2023 8:19 pm
Not true, you built that stuff yourself, there was merely a council of guys throwing random ideas at you. ;)
I'm glad you learned so much in the proces, that was the point. Now you can program microcontrollers and make good looking PCBs, how does it feel? :)
I'm very happy with it, for sure there was some hard steps with head scratch but now the result is here.
Just a little disappointed with BT but will search again to improve it.
All this work brought me back 25 years ago, while "working" at school :lol:

User avatar
zyssai
Posts: 698
Joined: Wed Jan 27, 2021 6:42 pm
languages_spoken: english, french
ODROIDs: Odroid N2+ 4Gb
VU7C
Has thanked: 306 times
Been thanked: 129 times
Contact:

Re: GPIO'4'Cars

Post by zyssai »

I added revision history in first post, this mostly for know what will be the future features.

@DeWire package will be shipped this Monday, sorry for the delay.

Image
Last edited by zyssai on Mon Mar 06, 2023 12:44 pm, edited 2 times in total.
These users thanked the author zyssai for the post:
DeWire (Fri Mar 10, 2023 8:37 pm)

User avatar
mctom
Posts: 2744
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: OGA, XU4, C2, M1, H3+, SP3, Vu8M
Location: Gdansk, Poland
Has thanked: 368 times
Been thanked: 481 times
Contact:

Re: GPIO'4'Cars

Post by mctom »

I looked at the first post and a few more below it, it's been fun 5 months figuring things out. We started discussing analog way to delay a relay turn-off, and you ended up programming a microcontroller for that. That's a level of self development I like to see from anyone who seeks advice online.

Surely there are things that could have been done better in this project, but it's also important to call things finished at some point. If you're interested in improving something in the future, you know where to ask. :)

Congratulations on your success!
These users thanked the author mctom for the post:
zyssai (Sun Mar 05, 2023 10:18 pm)
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

jackinho
Posts: 66
Joined: Mon May 06, 2019 12:09 am
languages_spoken: english, german
ODROIDs: XU4, N2, HC4
Has thanked: 21 times
Been thanked: 22 times
Contact:

Re: GPIO'4'Cars

Post by jackinho »

Yeah, really amazing development both in the project but also in personal skills! Congrats to you @zyssai! And also great support by @mctom. You guys are great!
These users thanked the author jackinho for the post:
zyssai (Sun Mar 05, 2023 10:18 pm)

DeWire
Posts: 23
Joined: Wed Dec 25, 2013 9:58 am
languages_spoken: english
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: GPIO'4'Cars

Post by DeWire »

Package received today, thanks @zyssai!

Very excited to get this installed. Apologies in advance for all the questions I will have for you :? :lol:
These users thanked the author DeWire for the post:
zyssai (Fri Mar 10, 2023 11:19 pm)

User avatar
zyssai
Posts: 698
Joined: Wed Jan 27, 2021 6:42 pm
languages_spoken: english, french
ODROIDs: Odroid N2+ 4Gb
VU7C
Has thanked: 306 times
Been thanked: 129 times
Contact:

Re: GPIO'4'Cars

Post by zyssai »

DeWire wrote:
Fri Mar 10, 2023 8:38 pm
Package received today, thanks @zyssai!

Very excited to get this installed. Apologies in advance for all the questions I will have for you :? :lol:
Thanks for your trust, I imagine you will have some questions ;)
This is the rules of a forum, no? :lol:

First test the board before without N2.
For this, connect ground and 12v_perm.
Then 12v to 12v_pres should enable the relay (you should hear it).

With pleasure,
Jc

User avatar
zyssai
Posts: 698
Joined: Wed Jan 27, 2021 6:42 pm
languages_spoken: english, french
ODROIDs: Odroid N2+ 4Gb
VU7C
Has thanked: 306 times
Been thanked: 129 times
Contact:

Re: GPIO'4'Cars

Post by zyssai »

I'm looking for adding an output, I mean, driving an accessory from Android.
For example, with a simple widget button, enable a light, an amplifier, or anything that can be enabled with a simple 12v trigger.

So for this, @joerg app can manage it so it is perfect.
I'm just wondering if this simple scheme is correct, because I'm not sure R2 is sufficient.

Image

User avatar
mctom
Posts: 2744
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: OGA, XU4, C2, M1, H3+, SP3, Vu8M
Location: Gdansk, Poland
Has thanked: 368 times
Been thanked: 481 times
Contact:

Re: GPIO'4'Cars

Post by mctom »

It is correct and will work in *some* cases, but!

It all depends what are you going to trigger with this signal.

If you want to power a 12V device with this output, then I think you'd be better off with MCP1416 - a similarly sized MOSFET gate driver, that can also be used as a power switch for lighter loads. This will either give 12V or 0V output, that can be used to turn on a LED lamp or something - it's safe to say it will work up to 100mA or similar.

If you want to send a logic signal that some other device will interpret, such as a GPIO of another computer, then you'll need to translate voltage levels - this output you have drawn has 12V logic level, which will probably harm a GPIO pin of the receiver.

This is very hard to make a "universal output". The closest you can get to the universal output is "open drain", meaning exactly what you did but without R2 and 12V. The receiver will have to pull up the voltage to the desired level instead, and this will always be the correct voltage it can support.
These users thanked the author mctom for the post:
zyssai (Sat Mar 18, 2023 12:20 am)
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

User avatar
zyssai
Posts: 698
Joined: Wed Jan 27, 2021 6:42 pm
languages_spoken: english, french
ODROIDs: Odroid N2+ 4Gb
VU7C
Has thanked: 306 times
Been thanked: 129 times
Contact:

Re: GPIO'4'Cars

Post by zyssai »

Mmm...
Totally forgot this :lol:
I thought about powering a coil relay, so mcp1416 could be a good choice. This way the user can connect a simple relay board of his choice.
I don't think it's a good idea to integrate a high power MOSFET to this board, to prevent electronic hazard.

Thanks for your tips. I will take some reflection time ;)

User avatar
mctom
Posts: 2744
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: OGA, XU4, C2, M1, H3+, SP3, Vu8M
Location: Gdansk, Poland
Has thanked: 368 times
Been thanked: 481 times
Contact:

Re: GPIO'4'Cars

Post by mctom »

No, for powering a relay the open drain connection that you provide will be sufficient. May also be used as a logic output if someone wishes so.
Provide two pins, one with 12V and another with open drain output. The user will do anything they want with this. :)
These users thanked the author mctom for the post:
zyssai (Sat Mar 18, 2023 3:47 am)
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

User avatar
zyssai
Posts: 698
Joined: Wed Jan 27, 2021 6:42 pm
languages_spoken: english, french
ODROIDs: Odroid N2+ 4Gb
VU7C
Has thanked: 306 times
Been thanked: 129 times
Contact:

Re: GPIO'4'Cars

Post by zyssai »

mctom wrote:
Sat Mar 18, 2023 12:36 am
Provide two pins, one with 12V and another with open drain output. The user will do anything they want with this. :)
Good idea 8-)
But, I'm afraid that user would be lost with this, because it means user needs to pull up the output itself?
In car there is majority 12v accessories. So I will probably leave only one 12v output. I think it's possible to manage at least a relay, an easy way then to enable whatever we want?

User avatar
mctom
Posts: 2744
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: OGA, XU4, C2, M1, H3+, SP3, Vu8M
Location: Gdansk, Poland
Has thanked: 368 times
Been thanked: 481 times
Contact:

Re: GPIO'4'Cars

Post by mctom »

For less experienced user just call it a "relay coil output".
For more experienced users, call it a "12V output with a low side switch (100mA max)".
For experts, include a diagram. ;)
These users thanked the author mctom for the post:
zyssai (Sat Mar 18, 2023 5:36 am)
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

Post Reply

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 1 guest