Maker Pro
Maker Pro

Momentary Ground - > Need to toggle sending of ground between two wires

I am hooking up a device to be able to auto roll down my windows in a project car. Actually I'm installing two of them. ONe will do the roll down, the other will do the roll up.

The problem is, the remote FOB and associated controller system has only one button available, the trunk button (I do not have an electronic trunk opener).

So, a couple options I am considering:

  • Have a way to toggle it. That is, have the resulting ground output from the press of the button go to one wire the first time, then the other wire on next press.
  • Maybe a better option: Have a single press go to one wire, have two presses (within a certain amount of time) go to the other wire.
As I imagine you suspect, I have not idea how to accomplish that. This idea seems a bit complicated to do a general Google search for.

Anyone have any thoughts on how to accomplish this?
 
Just a bit more info:

The ideal situation would be to have the one second ground go to one wire as a one second ground, then to the other wire as a one second ground.
 
How does your trunk button control the 'trunk' output?
If you hold the trunk button, does the trunk wire remain active until you let go, or does it simply send a pulse?

Something you may want to work with is a flip-flop, but depending on the amount of control you want, you can/should also look into a microcontroller.

Using a flip-flop will give you basic control. The output will toggle each time you send a signal.
Using a microcontroller will allow you to do more complex actions much easier, and will also allow you to make functional adjustments at a later date with a simple 'firmware update' . (ie, you write a different program for the microcontroller and flash it..)

Advanced features would be things like easily detecting a double-tap (or triple, quadruple... etc.) or performing very specific outputs and timings. The downside with a microcontroller is that it is usually more costly to get started and learn... but depending on the microcontroller you choose, it can still be very affordable and easy to use.

A PIC, or AVR is a more bare-bones microcontroller, but requires a separate programmer. Because it presents the more basic level to you, you have greater control over the program size and speed... but considering the project, you should look into Arduino. They don't offer the same efficiency, and the programs are a little bloated, but unless you are doing something that requires millisecond precision, it's good enough. The big advantage here is that it's easier to program, and has a built-in usb connection you can use for programming.

So... homework for you:
- Build a list of 'basic' requirements.
- Build a list of 'dream' requirements that you would 'like' to have, but don't necessarily need.
- Take a quick google look at 'Flip-Flops'
- Take a quick google look at 'Arduino'
- Share your lists with us, and tell us your experience / confidence with computers/electronics.

We can help you with the basics quite easily I'm sure, but we could just as well help you build all your 'dream' features in as well. Let us know!
 
How does your trunk button control the 'trunk' output?
If you hold the trunk button, does the trunk wire remain active until you let go, or does it simply send a pulse?
...

The trunk button sends a 1 second -(negative) pulse when the button is pressed for 2 seconds.

I will do some reading over the next couple days and bone up on my homework assignment. As well, I'll present the scenarios, best case, minimum case, as you outline.

Thanks for the prompt response, and initial pointers. By the way, I am computer literate. My programming skills are dated, and it's been a while. I'll elaborate more when I reply after the research.

Will be back soon.
 
How does your trunk button control the 'trunk' output?
If you hold the trunk button, does the trunk wire remain active until you let go, or does it simply send a pulse?

Something you may want to work with is a flip-flop, but depending on the amount of control you want, you can/should also look into a microcontroller.

Using a flip-flop will give you basic control. The output will toggle each time you send a signal.
Using a microcontroller will allow you to do more complex actions much easier, and will also allow you to make functional adjustments at a later date with a simple 'firmware update' . (ie, you write a different program for the microcontroller and flash it..)

Advanced features would be things like easily detecting a double-tap (or triple, quadruple... etc.) or performing very specific outputs and timings. The downside with a microcontroller is that it is usually more costly to get started and learn... but depending on the microcontroller you choose, it can still be very affordable and easy to use.

A PIC, or AVR is a more bare-bones microcontroller, but requires a separate programmer. Because it presents the more basic level to you, you have greater control over the program size and speed... but considering the project, you should look into Arduino. They don't offer the same efficiency, and the programs are a little bloated, but unless you are doing something that requires millisecond precision, it's good enough. The big advantage here is that it's easier to program, and has a built-in usb connection you can use for programming.

So... homework for you:
- Build a list of 'basic' requirements.
- Build a list of 'dream' requirements that you would 'like' to have, but don't necessarily need.
- Take a quick google look at 'Flip-Flops'
- Take a quick google look at 'Arduino'
- Share your lists with us, and tell us your experience / confidence with computers/electronics.

We can help you with the basics quite easily I'm sure, but we could just as well help you build all your 'dream' features in as well. Let us know!


So I have been giving this some thought.

Given the function of the trunk button, ie. 2 second push with result of 1 negative pulse for 1 second, it may be difficult to have 2 presses recognized. Your thoughts?

That leaves me thinking this to be the minimum scenario: Press the trunk button for 2 seconds, and a signal to the rolldown relay gets sent. Then the next time I press the button for 2 seconds, a signal to the rollup get sent.

However, I suppose that can leave a situation where I don't know what state the button is in, rollup or rolldown. But I suspect the worst case for that is if I want to roll down (when the state of the button is already roll down), when the next press is going to send roll up, the worst case scenario would be I have to hit the button a second time.

The best case scenario would be one press to roll down, two presses to roll up. I'm not sure, but I presume that would mean for the two press it would go like this: press for two seconds, wait 1 second, press for two seconds again. This one seems complicated to me, given the timing it would need to follow, and respond to.

I've done some research on Aduino, and Flip-Flops. In fact, had seen a bit on those before I posted. The code for the Aduinos appears to be C+. I was able to understand the coding I looked at. I have done some C+ coding...but many years ago, and would be quite rusty. Most of my coding in later years in IT was with Clipper, which shows how dated I am on that.

One thing I had run across while researching was to possibly use mechanical relay and SPDT relay comgination. The diagram of that is here, titled Single Pulse to Lock and Unlock. Looks like that requires a positive pulse, so I'd have to use another relay to invert to negative.

Appreciate your input and thoughts.
 
So I have been giving this some thought.

Given the function of the trunk button, ie. 2 second push with result of 1 negative pulse for 1 second, it may be difficult to have 2 presses recognized. Your thoughts?

That leaves me thinking this to be the minimum scenario: Press the trunk button for 2 seconds, and a signal to the rolldown relay gets sent. Then the next time I press the button for 2 seconds, a signal to the rollup get sent.

However, I suppose that can leave a situation where I don't know what state the button is in, rollup or rolldown. But I suspect the worst case for that is if I want to roll down (when the state of the button is already roll down), when the next press is going to send roll up, the worst case scenario would be I have to hit the button a second time.

The best case scenario would be one press to roll down, two presses to roll up. I'm not sure, but I presume that would mean for the two press it would go like this: press for two seconds, wait 1 second, press for two seconds again. This one seems complicated to me, given the timing it would need to follow, and respond to.

I've done some research on Aduino, and Flip-Flops. In fact, had seen a bit on those before I posted. The code for the Aduinos appears to be C+. I was able to understand the coding I looked at. I have done some C+ coding...but many years ago, and would be quite rusty. Most of my coding in later years in IT was with Clipper, which shows how dated I am on that.

One thing I had run across while researching was to possibly use mechanical relay and SPDT relay comgination. The diagram of that is here, titled Single Pulse to Lock and Unlock. Looks like that requires a positive pulse, so I'd have to use another relay to invert to negative.

Appreciate your input and thoughts.
Well. The option you found is a 'latching' relay which is daisy chained to a regular relay that provides the dedicated output A and output B.
Considering you need to press and hold for 2 seconds.. detecting a 'double' or more tap would require that the program on the Arduino sits and waits for 2-3 seconds after the most recent pulse before actually doing anything. This is easily done, but you may grow tired of having to press&hold, release press&hold each time you want the windows rolled down or up.
If we keep is simple it can be built with ICs or Relays pretty easily.

As far as requiring a negative or positive pulse is concerned.. the coils on relays don't know or care..
You can connect the coil to ground if you want to work with a positive pulse, or you can connect the coil to +12V if you want to work with a negative pulse.
The link you shared, actually works with a negative pulse by the way... The coil is connected to +12V, and the remaining contact on the coil goes down to what appears to be a push-button which connects it to ground.
Simply replace the button with your 'trunk' output will toggle the latching relay, and the second relay will provide a 1s negative pulse on either output A or output B.
(if this is good enough to trigger your window circuit, then you've made a good find.)
 
Well. The option you found is a 'latching' relay which is daisy chained to a regular relay that provides the dedicated output A and output B.
Considering you need to press and hold for 2 seconds.. detecting a 'double' or more tap would require that the program on the Arduino sits and waits for 2-3 seconds after the most recent pulse before actually doing anything. This is easily done, but you may grow tired of having to press&hold, release press&hold each time you want the windows rolled down or up.
If we keep is simple it can be built with ICs or Relays pretty easily.

As far as requiring a negative or positive pulse is concerned.. the coils on relays don't know or care..
You can connect the coil to ground if you want to work with a positive pulse, or you can connect the coil to +12V if you want to work with a negative pulse.
The link you shared, actually works with a negative pulse by the way... The coil is connected to +12V, and the remaining contact on the coil goes down to what appears to be a push-button which connects it to ground.
Simply replace the button with your 'trunk' output will toggle the latching relay, and the second relay will provide a 1s negative pulse on either output A or output B.
(if this is good enough to trigger your window circuit, then you've made a good find.)

If I interpret your reply correctly, using the linked two relay system would work for me.

So, my problem now shouldn't be a problem. But, not being educated on relays that much (even though I have wired them in my previous car in several places), I'm not sure what product to purchase. The text on the diagram indicates to use a mechanical PCB latching relay. I did a Google search on that term, and find all kinds of relays, none laid out like the 4 pin relay on the diagram.

If you could point me to the product I need, it wouldn't be difficult to follow the diagram. Of course, if it's not that specific relay, I'd need to know what wires go to what pins. That's obvious on the regular relay. Although I'd have to think through the change in wiring to use negative rather than positive trigger (assuming it would be more difficult than just supplying negative in place of positive on the diagram).

Really appreciate your help.
 
If I interpret your reply correctly, using the linked two relay system would work for me.

So, my problem now shouldn't be a problem. But, not being educated on relays that much (even though I have wired them in my previous car in several places), I'm not sure what product to purchase. The text on the diagram indicates to use a mechanical PCB latching relay. I did a Google search on that term, and find all kinds of relays, none laid out like the 4 pin relay on the diagram.

If you could point me to the product I need, it wouldn't be difficult to follow the diagram. Of course, if it's not that specific relay, I'd need to know what wires go to what pins. That's obvious on the regular relay. Although I'd have to think through the change in wiring to use negative rather than positive trigger (assuming it would be more difficult than just supplying negative in place of positive on the diagram).

Really appreciate your help.
You're right. This should work for you.
As far as finding the part is concerned. I need to admit to never actually buying a latching relay before xD

That said, their behavior is well known, although the pinout may vary.

Your relay 'coil' should be rated at 12V, the switching current should be pretty low and won't be a limitation.
The business side of the relay in the drawing you found is a 'SPST' type... Single Pole, Single Throw.
That is, those remaining two pins are either connected or they aren't.
The 'Pole' is how many things can be switched at once. The 'Throw' is if it simply provides a connected/disconnected or if it toggles being connected between two pins.
The *second* relay in that diagram is a 'SPDT' Single Pole, Double Throw Relay.
Technically speaking... you could use ANY type of Pole/Throw combination for the mechanical relay. Simply ignore one or more extra pins.
That said... it's possible to do this with a single latching relay if you buy a 'DPDT' relay... but buying latching relays with a double pole or double throw can be more expensive.

If you're unsure if a product will work for you, send us a link or share the part number and we'll confirm.
 
You're right. This should work for you.
As far as finding the part is concerned. I need to admit to never actually buying a latching relay before xD

That said, their behavior is well known, although the pinout may vary.

Your relay 'coil' should be rated at 12V, the switching current should be pretty low and won't be a limitation.
The business side of the relay in the drawing you found is a 'SPST' type... Single Pole, Single Throw.
That is, those remaining two pins are either connected or they aren't.
The 'Pole' is how many things can be switched at once. The 'Throw' is if it simply provides a connected/disconnected or if it toggles being connected between two pins.
The *second* relay in that diagram is a 'SPDT' Single Pole, Double Throw Relay.
Technically speaking... you could use ANY type of Pole/Throw combination for the mechanical relay. Simply ignore one or more extra pins.
That said... it's possible to do this with a single latching relay if you buy a 'DPDT' relay... but buying latching relays with a double pole or double throw can be more expensive.

If you're unsure if a product will work for you, send us a link or share the part number and we'll confirm.

Gryd3...I really appreciate your input.

Guess, what, I just now finished some research, and found something that I think will work out. The first thing I looked at was a PAC TR-7, which will serve as a channel expander. But the problem with the TR-7 is that it would expect 2 negative pulses within 3 seconds for the 2nd channel. My trunk button has a 2 second delay, then a 1 second pulse. So I can't get 2 pulses within 3 seconds.

So they have a PAC TR-12, which is programmable with a downloadable program. Looks quite versatile. Will be a bit more expensive than purchasing the relays, but having the program-ability will be valuable, I believe.

I'm going to call PAC tech and discuss tomorrow, but I;m pretty sure it will work. I'll post back if I find differently.

Again, many thanks.
 
Gryd3...I really appreciate your input.

Guess, what, I just now finished some research, and found something that I think will work out. The first thing I looked at was a PAC TR-7, which will serve as a channel expander. But the problem with the TR-7 is that it would expect 2 negative pulses within 3 seconds for the 2nd channel. My trunk button has a 2 second delay, then a 1 second pulse. So I can't get 2 pulses within 3 seconds.

So they have a PAC TR-12, which is programmable with a downloadable program. Looks quite versatile. Will be a bit more expensive than purchasing the relays, but having the program-ability will be valuable, I believe.

I'm going to call PAC tech and discuss tomorrow, but I;m pretty sure it will work. I'll post back if I find differently.

Again, many thanks.
haha. That TR-12 looks kind of nice to be honest.
Limits to what you can do to program it though... if you chose an Arduino, and either bought some Relays, or FETs you could customise it to 100%... but it's trickier to build something from scratch when something good enough already exists unless you enjoy the trip more than the destination.

Just throwing this out there... Have you thought of a combination of inputs to control the windows?
Doors Locked + TrunkLatch = Windows Up
Doors Unlocked + TrunkLatch = Windows Down

I'm not sure what kind of device you are using for the latch, but there are other inputs you can use at the same time to fine-tune the control of the windows or other devices. The alarm system I have in my vehicle has a generic output that is active if the system is armed. (Arming the system *always* locks the doors... so I could personally use this 'armed' output)
Additional outputs *could* be a limit switch in the window that gets pressed when the window is all the way down... I'm not sure the device you are using to control the windows either... but is there an output you could monitor to determine window state?

The TR-12 has 8 inputs, and 4 outputs... you have TONS of options.
 
haha. That TR-12 looks kind of nice to be honest.
Limits to what you can do to program it though... if you chose an Arduino, and either bought some Relays, or FETs you could customise it to 100%... but it's trickier to build something from scratch when something good enough already exists unless you enjoy the trip more than the destination.

Just throwing this out there... Have you thought of a combination of inputs to control the windows?
Doors Locked + TrunkLatch = Windows Up
Doors Unlocked + TrunkLatch = Windows Down

I'm not sure what kind of device you are using for the latch, but there are other inputs you can use at the same time to fine-tune the control of the windows or other devices. The alarm system I have in my vehicle has a generic output that is active if the system is armed. (Arming the system *always* locks the doors... so I could personally use this 'armed' output)
Additional outputs *could* be a limit switch in the window that gets pressed when the window is all the way down... I'm not sure the device you are using to control the windows either... but is there an output you could monitor to determine window state?

The TR-12 has 8 inputs, and 4 outputs... you have TONS of options.

Hi...

Actually, I had thought about your suggestion, but I'm not sure I can get those signal combinations from my unit.

I would actually interest in building my own, but am wanting something quicker than I can go through the learning curve. However I may be forced to do that. I cannot find any retailer that has aTR-12.

Sonic Electronic has it listed as in backorder. I called them and they said it's been on backorder since the first of June. I sent email to Pac, and they wouldn't provide any helpful info on finding one. I'm beginning to think they are having production problems with it.

If I were to try the Adrino route, would I need to get some kind of compiler for the code?

I looked at their site, and didn't feel like I would quickly identify what product of theirs I needed, let alone quickly figure out the parh to make it operational.

I will go check out their stuff again.
 
What is the device that rolls up and down the window? Why would you need 2? I don't know much about car windows but I would think there's just one motor that jacks the window up or down, without the need for 2 mechanisms.
 
What is the device that rolls up and down the window? Why would you need 2? I don't know much about car windows but I would think there's just one motor that jacks the window up or down, without the need for 2 mechanisms.

I need to use 2 of these. One for rollup and one for rolldown. Power windows have one wire from the window switch for rolling up and another for rolling down. This unit gets wired, for example, in the middle of the rolldown wire (cut the wire, hook motor side of write to one wire of the AU unit, and hook the switch side to another wire of the unit. Then doi that for each of 4 windows). It will then roll down all 4 windows, 1 after the other.

Do the same on the rollup window wire with the second AU unit.

I've browsed through the libraries for the language for the Aduino units. I didn't recognize which library I would even use. Let alone know what hardware to purchase and program.

I finally got a reply from Pac saying their units may be available by the end of July.

I'll do some more research on the Aduino stuff. Been doing all of this on my phone and the battery is about to give out.
 
As far as Arduino (or even a PIC or AVR is concerned) your first priority should be the number of input and outputs. The program you will write for this will most likely be incredibly small.
As long as it has the required number of pins, you should be fine.

Forget about the libraries for now as well... your program code is going to be pretty straight forward. Wake up if a pin is toggled, check another pin then do something is pretty much it...

You will however need a voltage regulator to drop the 12V from the car to either 5V or 3.3V depending on the arduino, and you will need something to 'buffer' the output from the arduino... It's can't provide 12V to anything... let along enough current to make it do anything... so a transistor at a bare minimim for any 'output' is required. For heavier outputs... ei triggering lights, motors, or actuators, you should daisy chain a relay to the transistor.
No worries here either. We can help with that.

I do have a concern with your window units though...
How do you propose to connect two of them to the car at the same time?
If they connect in parallel to existing window controls, I have a major concern that if manual or the second unit window control is used, you'll damage a unit or blow a fuse.
If they are connected in-line, then you can daisy chain them together... One other question... the unit claims to be 'universal' to allow for reverse polarity... I would love to see an install manual. You may be able to use a single unit instead of two.
 
I guess it's more complicated than I would think it needs to be. I think if it's meant to be one wire interrupted, you could install some circuitry that switches which one it's affecting so as to only need one of these for both roll-up and roll-down. Doing this with an Arduino would be very customizable, I would venture to think that you shouldn't even need to purchase that unit, but do things with just the Arduino and a few small components. Sounds like all it's really doing is spinning a motor one way or reverse. But I am much better at Arduino than I am at cars.
 
This is a link to the Omega AU-93-4 rollup module instructions.

It took me a bit to figure out the simple instruction manual. You will notice where it says 'cut', in the diagram. What you are cutting, as I mentioned earlier, is either the wire from the regular window switch to the rollup, or to the rolldown.

This is a link to a wiring diagram of the power windows that I am using. So, based on that diagram, one of the AUs will be inserted between each blue wire, and the other in between each brown wire. ONe of those is hot when rolling up, and the other hot when rolling down.

The way the unit works is that when you send a pulse to the trigger wire of the AU unit, it then starts at driver window, and sends power to perform the roll. When normal the switches are used, it just all passes through the AU unit.
 
Top