I have a problem in the design or my circuit. I need send data at a maxixum bitrate of 12000 bits /second. The high value should be +12v and the low value should be -12v providing at least 35mA of current. I initialy thought that I could easily get thoses values with the max232 chip. But when I did some tests, I could only get -7.25v, far from the -12v I need. The rest of the time, no data should be sent through the wire, so the current should be stopped logically. I made a diagram of the concept of my circuit so it's easier to understand : I will use a 12v battery if need be, but I'd rather find a way to use a 9v battery. I would use a 5v regulator to get the 5v required for my microcontroller and then with my microcontroller I would send data. That data would then be converted to (+12/-12v high/low). The S6 Switch is used to stop the current when I do not wish to transmit data.
I've thought of a way of accomplishing all of that, but I have technical difficulties to achieve a logical spdt switch and on the whole I wonder wether it would work and if there wouldn't be a better design that mine. Here's a diagram of my first draft : So I use an inverter schema with the IC MC34063 that will provide me with a -12v with 100mA. Then for the +12v I directly use the power source. I'm sure it's a good idea. Then I would use an electronic equivalent of a spdt switch (S1) connected to both the +12v and -12v driven by one or two pins of the microcontroller (preferably one). That should give me nice squared -12/-12v signals (not sure about that too) and then I would have electronic switch (S2) to open or stop the signal whenever needed.
So to sum up, my questions are :
1) Will my design work, what would be problematic ?
2) Is there a better design, maybe more efficient and with less components that mine.
3) How do I achieve the electronic equivalent of the spdt switch (S1) ? I've already opened a thread for S2 that was solved (see Electronic switch with negative and positive voltage)
4) With my design, will I get a nice squared -12v/+12v usable signal that will supply me with the 35mA I need ?
5) Can I work with a 9v battery instead of 12v battery ?
6) Can I use less microcontroller pins ? Ideally 1, but 2 would be okay as well.
Thank you for your help and inputs.