# generating square wave signal +12v/-12v(!) - is it possible?

**URL:** <https://forum.arduino.cc/t/generating-square-wave-signal-12v-12v-is-it-possible/694755>\
**Category:** General Guidance\
**Created:** [February 5, 2021, 4:36pm UTC](https://forum.arduino.cc/t/generating-square-wave-signal-12v-12v-is-it-possible/694755 "2021-02-05T16:36:39Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tiborx8](https://avatars.discourse-cdn.com/v4/letter/t/ac91a4/32.png) [@Tiborx8](https://forum.arduino.cc/u/Tiborx8)\
**Post date:** [February 5, 2021, 4:36pm UTC](https://forum.arduino.cc/t/generating-square-wave-signal-12v-12v-is-it-possible/694755/1 "2021-02-05T16:36:39Z")

</div>

Hello,

so, the full story. I have another topic here on how to detect a square wave signal +12v/-12v. That topic is solved, I received a lot of great suggestions.

However, The full story is that once I detect that the 12v/-12v 1Khz square wave signal a car ECU generates stopped, I want another device (arduino) to take over the ask from the ECU and to generate similar +12v/-12v signal - at 1Khz, duty cycle is 50%.

As I know, it is not possible to generate negative voltage with arduino - is there anyone who knows how to make such a signal?

---

<div class="post-metadata">

**Author:** ![Railroader](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/railroader/32/274550_2.png) [@Railroader](https://forum.arduino.cc/u/Railroader)\
**Post date:** [February 5, 2021, 5:50pm UTC](https://forum.arduino.cc/t/generating-square-wave-signal-12v-12v-is-it-possible/694755/2 "2021-02-05T17:50:03Z")

</div>

For how long time will this second controller have to be generating its +/- signal?  
I think about tapping that +/-12 volt into suitable capacitors and use those stored voltages for outputting voltage, not current.

---

<div class="post-metadata">

**Author:** ![CrossRoads](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/crossroads/32/214033_2.png) [@CrossRoads](https://forum.arduino.cc/u/CrossRoads)\
**Post date:** [February 5, 2021, 6:15pm UTC](https://forum.arduino.cc/t/generating-square-wave-signal-12v-12v-is-it-possible/694755/3 "2021-02-05T18:15:44Z")

</div>

Do you have access to +12V and -12V supplies?  
You could use PVT312 opto isolators to switch the 2 supplies to the output.  
(Or PVT212, PVT412, depends on how much current is being switched)  
[https://www.mouser.com/Search/Refine?Keyword=pvt312](https://www.mouser.com/Search/Refine?Keyword=pvt312)

 ![12V plus and minus with PVT312s.JPG](https://europe1.discourse-cdn.com/arduino/original/4X/3/a/c/3ac2f76cf7a397992240e4c66b9ad60c40e6268d.jpeg)

 ![12V plus and minus with PVT312s.JPG](https://europe1.discourse-cdn.com/arduino/original/4X/3/a/c/3ac2f76cf7a397992240e4c66b9ad60c40e6268d.jpeg)

---

<div class="post-metadata">

**Author:** ![anon57585045](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@anon57585045](https://forum.arduino.cc/u/anon57585045)\
**Post date:** [February 5, 2021, 6:22pm UTC](https://forum.arduino.cc/t/generating-square-wave-signal-12v-12v-is-it-possible/694755/4 "2021-02-05T18:22:05Z")

</div>

What does the load look like?

...and... why would a car circuit generate negative signal voltages? It's sounds terribly wasteful of resources, because it's not (as you are discovering) very easy.

Do you have any links that could educate us about your ECU signals to better answer your question?

---

<div class="post-metadata">

**Author:** ![anon94801460](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@anon94801460](https://forum.arduino.cc/u/anon94801460)\
**Post date:** [February 5, 2021, 6:23pm UTC](https://forum.arduino.cc/t/generating-square-wave-signal-12v-12v-is-it-possible/694755/5 "2021-02-05T18:23:22Z")

</div>

It is easy to generate such a signal, if you have a bipolar power supply, providing +12 and -12V.

I would use an optocoupler for safety and isolation. This would be for a very light load (logic signals):  
 ![bipolar_sqw.png](https://europe1.discourse-cdn.com/arduino/original/4X/5/5/7/557cf4d27f346101e8528cd685175024f7e47479.png)

![bipolar_sqw.png](https://europe1.discourse-cdn.com/arduino/original/4X/5/5/7/557cf4d27f346101e8528cd685175024f7e47479.png)

---

<div class="post-metadata">

**Author:** ![Tiborx8](https://avatars.discourse-cdn.com/v4/letter/t/ac91a4/32.png) [@Tiborx8](https://forum.arduino.cc/u/Tiborx8)\
**Post date:** [February 5, 2021, 6:54pm UTC](https://forum.arduino.cc/t/generating-square-wave-signal-12v-12v-is-it-possible/694755/6 "2021-02-05T18:54:38Z")

</div>

> aarg:  
> What does the load look like?
> 
> ...and... why would a car circuit generate negative signal voltages? It's sounds terribly wasteful of resources, because it's not (as you are discovering) very easy.
> 
> Do you have any links that could educate us about your ECU signals to better answer your question?

it is the pilot signal every electric car needs to provide through the J1772 connector to command the charger to supply charging.

---

<div class="post-metadata">

**Author:** ![Paul\_KD7HB](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paul_kd7hb/32/1127958_2.png) [@Paul\_KD7HB](https://forum.arduino.cc/u/Paul_KD7HB)\
**Post date:** [February 5, 2021, 7:10pm UTC](https://forum.arduino.cc/t/generating-square-wave-signal-12v-12v-is-it-possible/694755/7 "2021-02-05T19:10:01Z")

</div>

IS this +- 12 volts in relation to the vehicle ground, or some other common wire?  
Paul

---

<div class="post-metadata">

**Author:** ![Tiborx8](https://avatars.discourse-cdn.com/v4/letter/t/ac91a4/32.png) [@Tiborx8](https://forum.arduino.cc/u/Tiborx8)\
**Post date:** [February 5, 2021, 8:25pm UTC](https://forum.arduino.cc/t/generating-square-wave-signal-12v-12v-is-it-possible/694755/8 "2021-02-05T20:25:50Z")

</div>

> Paul\_KD7HB:  
> IS this +- 12 volts in relation to the vehicle ground, or some other common wire?  
> Paul

the negative ground wire is also coming from the ECU, just like the positive wire.

---

<div class="post-metadata">

**Author:** ![Paul\_KD7HB](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paul_kd7hb/32/1127958_2.png) [@Paul\_KD7HB](https://forum.arduino.cc/u/Paul_KD7HB)\
**Post date:** [February 5, 2021, 9:10pm UTC](https://forum.arduino.cc/t/generating-square-wave-signal-12v-12v-is-it-possible/694755/9 "2021-02-05T21:10:59Z")

</div>

> Tiborx8:  
> the negative ground wire is also coming from the ECU, just like the positive wire.

Sorry, That make no sense, at all. Where are you measuring the voltages? Between which two points for each measurement.  
You have a signal wire and a ground wire. Or do you have two signal wires and a ground wire. Or do you have a single wire that alternates voltages when referenced to a common or ground wire.  
Paul

---

<div class="post-metadata">

**Author:** ![Idahowalker](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/idahowalker/32/238858_2.png) [@Idahowalker](https://forum.arduino.cc/u/Idahowalker)\
**Post date:** [February 5, 2021, 9:16pm UTC](https://forum.arduino.cc/t/generating-square-wave-signal-12v-12v-is-it-possible/694755/10 "2021-02-05T21:16:18Z")

</div>

I'm curious, could you, OP, provide the make, year, model of the car so I can look it up to see how they are generating the -12V signal?

---

<div class="post-metadata">

**Author:** ![anon57585045](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@anon57585045](https://forum.arduino.cc/u/anon57585045)\
**Post date:** [February 5, 2021, 11:30pm UTC](https://forum.arduino.cc/t/generating-square-wave-signal-12v-12v-is-it-possible/694755/11 "2021-02-05T23:30:43Z")

</div>

Sorry to be blunt, but I suspect a measurement error here.

---

<div class="post-metadata">

**Author:** ![Railroader](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/railroader/32/274550_2.png) [@Railroader](https://forum.arduino.cc/u/Railroader)\
**Post date:** [February 6, 2021, 2:20am UTC](https://forum.arduino.cc/t/generating-square-wave-signal-12v-12v-is-it-possible/694755/12 "2021-02-06T02:20:20Z")

</div>

> aarg:  
> Sorry to be blunt, but I suspect a measurement error here.

or a language, nomenclature error?

---

<div class="post-metadata">

**Author:** ![alto777](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/alto777/32/317385_2.png) [@alto777](https://forum.arduino.cc/u/alto777)\
**Post date:** [February 6, 2021, 3:40am UTC](https://forum.arduino.cc/t/generating-square-wave-signal-12v-12v-is-it-possible/694755/13 "2021-02-06T03:40:33Z")

</div>

This might be of interest. I followed the other thread and never did convince myself y’all were actually talking about a +12/-12 with respect to ground (0) volt signal, seemed odd.

But that it is:

> **[Arduino EV J1772 Charging Station](https://www.instructables.com/Arduino-EV-J1772-Charging-Station/)**
>
> Arduino EV J1772 Charging Station: Based on the OpenEVSE project
> OpenEVSE
> OpenEVSE Store
> Arduino Electric Vehicle Charging Station "Electric Vehicle Supply Equipment" (EVSE) implementing the J1772 protocol.
> J1772 is used in the current generation of...

a7

---

<div class="post-metadata">

**Author:** ![wvmarle](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/wvmarle/32/1013044_2.png) [@wvmarle](https://forum.arduino.cc/u/wvmarle)\
**Post date:** [February 6, 2021, 4:22am UTC](https://forum.arduino.cc/t/generating-square-wave-signal-12v-12v-is-it-possible/694755/14 "2021-02-06T04:22:17Z")

</div>

In [their other thread](https://forum.arduino.cc/index.php?topic=723709) the OP is adamant it's a signal that goes indeed all the way from +12 to -12 and is at 0V when there's no signal. Odd, but for lack of other ways to confirm it (such as tecnical datasheets of the ECU in question) I'll take their word for it.

The circuit from the instructable in #12 looks simple enough to me. The only question I have is... why would you even want to fake this signal?

---

<div class="post-metadata">

**Author:** ![JCA34F](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/jca34f/32/340148_2.png) [@JCA34F](https://forum.arduino.cc/u/JCA34F)\
**Post date:** [February 6, 2021, 4:52am UTC](https://forum.arduino.cc/t/generating-square-wave-signal-12v-12v-is-it-possible/694755/15 "2021-02-06T04:52:20Z")

</div>

> **[datasheet D107E](https://www.digchip.com/datasheets/parts/datasheet/1001/D107E-pdf.php)**
>
> Download MicroPower Direct D107E pdf datasheet file

> **[lf353.pdf](https://www.ti.com/lit/ds/symlink/lf353.pdf)**
>
> 913.51 KB

---

<div class="post-metadata">

**Author:** ![6v6gt](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/6v6gt/32/225488_2.png) [@6v6gt](https://forum.arduino.cc/u/6v6gt)\
**Post date:** [February 6, 2021, 4:55am UTC](https://forum.arduino.cc/t/generating-square-wave-signal-12v-12v-is-it-possible/694755/16 "2021-02-06T04:55:59Z")

</div>

A +/- 12 volts signal from a device in a vehicle electrical system could simply be derived from an H bridge or similar. The output would look like -12v 0v +12v on an oscilloscope. To recreate it, if required, another H bridge.

---

<div class="post-metadata">

**Author:** ![Tiborx8](https://avatars.discourse-cdn.com/v4/letter/t/ac91a4/32.png) [@Tiborx8](https://forum.arduino.cc/u/Tiborx8)\
**Post date:** [February 6, 2021, 12:05pm UTC](https://forum.arduino.cc/t/generating-square-wave-signal-12v-12v-is-it-possible/694755/17 "2021-02-06T12:05:10Z")

</div>

> Idahowalker:  
> I'm curious, could you, OP, provide the make, year, model of the car so I can look it up to see how they are generating the -12V signal?

it is a 2014 citroen c-zero (same as the mitsubishi i-miev)

---

<div class="post-metadata">

**Author:** ![alto777](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/alto777/32/317385_2.png) [@alto777](https://forum.arduino.cc/u/alto777)\
**Post date:** [February 6, 2021, 1:37pm UTC](https://forum.arduino.cc/t/generating-square-wave-signal-12v-12v-is-it-possible/694755/18 "2021-02-06T13:37:12Z")

</div>

There’s no need to take anyone’s word for it. I appreciate the stubbornness, I had torble myself.

Try google.

> **[SAE J1772](https://en.wikipedia.org/wiki/SAE_J1772)**
>
> SAE J1772, also known as a J plug or Type 1 connector after its international standard, IEC 62196 Type 1, is a North American standard for electrical connectors for electric vehicles maintained by SAE International under the formal title "SAE Surface Vehicle Recommended Practice J1772, SAE Electric Vehicle Conductive Charge Coupler".
> The SAE maintains the general physical, electrical, communication protocol, and performance requirements for the electric vehicle conductive charge system and coupl...

It’s just how signaling works in this circumstance. Why is probably interesting.

a7

---

<div class="post-metadata">

**Author:** ![Idahowalker](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/idahowalker/32/238858_2.png) [@Idahowalker](https://forum.arduino.cc/u/Idahowalker)\
**Post date:** [February 6, 2021, 2:19pm UTC](https://forum.arduino.cc/t/generating-square-wave-signal-12v-12v-is-it-possible/694755/19 "2021-02-06T14:19:11Z")

</div>

Oi!

From the link in post #17

> A 1 kHz square wave at ±12 volts generated by the EVSE on the control pilot line to detect the presence of the vehicle, communicate the maximum allowable charging current, and control charging begin/end

for the charging system.

I did find one link to the service manual for the year make model but they want 29.99USD, not happening.

Yes, it is possible to generate a +/- 12V signal at 1Khz using an Uno and some external components.

---

<div class="post-metadata">

**Author:** ![alto777](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/alto777/32/317385_2.png) [@alto777](https://forum.arduino.cc/u/alto777)\
**Post date:** [February 6, 2021, 3:07pm UTC](https://forum.arduino.cc/t/generating-square-wave-signal-12v-12v-is-it-possible/694755/20 "2021-02-06T15:07:37Z")

</div>

The specific mention in that article of +/-12 volts, -12 volts and 0 volts convinced me it was a competent exposition of truth.

About an H bridge, I basically understand using it for greater peak to peak voltage, and have done similar things with two i/o lines for “AC” excitation of piezo discs. But

will an H bridge ever yield a negative voltage measured wrt to ground?

The hacks I’ve come across so far use DC/DC converters to develop +12 and -12 volts.

a7

[Next page](https://forum.arduino.cc/t/generating-square-wave-signal-12v-12v-is-it-possible/694755.md?page=2)
