Data over power ...

I just downloaded Fritzing, and this was one of my first 3 tries. I have not found a way to adjust the size. In Fritzing, I used File - Export - As Image - Jpeg. I saw no options for adjusting the size. I am searching Fritzing for that option.

jackwp: UPDATE: the jpg did attach, but when clicked it is really to large. Is there a way to adjust that image size? Sorry if off topic.

Depending on your operating system, most image viewers have a resize option. The Gimp is free.

[quote author=Nick Gammon link=topic=181337.msg1346052#msg1346052 date=1375908962]

jackwp: UPDATE: the jpg did attach, but when clicked it is really to large. Is there a way to adjust that image size? Sorry if off topic.

Depending on your operating system, most image viewers have a resize option. The Gimp is free. [/quote] XnView is a nice little image viewer that can crop, resize etc and it's multi-platform now.

mrburnette: @Nick:

Here is one rather mature uC network: http://www.kranenborg.org/ee/picaxe/twowirenetwork.htm

I'm trying to make this up, and have hit a snag. Either I am misreading the circuit, or mis-assembling it, or there is a typo in the circuit. This is it:

Does that look right? Or are the transistors around the wrong way (NPN/PNP)?

I swapped them (unless I have put them in wrongly in the first place) and the output looks much better.

They look the right way to me... PNP on top (high side) and NPN on the bottom (low side). It looks like a basic high current two stage push-pull output to me.

Do you have the MOSFETs the right way round?

Caveat: FET’s aren’t really my area of expertise. The superior man reaches his own conclusion.

From the datasheets, T3 turns on when VGS is below about -4V, and T4 turns on when VGS is above about 3V.

With the serial pin high, T1 is off and T2 is on. T2 collector voltage is low. VGS for T3 is -5V, and close to zero for T4. T3 is on, and T4 is off. Output is high.
With the serial pin low, T1 is on, T2 off. T1 collector voltage is high. VGS for T3 is close to zero, and 5V for T4. T3 is off, and T4 is on. Output is low.

The 4K7 resistor between the gates slows gate charging on the active FET, so that it turns on more slowly than the inactive FET, preventing them from both being on simultaneously. It’s likely that you’ll see a short period when the output is open-circuited after the serial pin switches, and that may be why the output doesn’t look as good as you’d hope. With this circuit, turn-on time will certainly be limited by the 4K7 gate resistor, and that will limit the switching rate that you can use. The datasheets suggest that the effect will be more pronounced when the output switches from low to high.

Well it does not really look right to me. If the serial out was at, say 2.5 volts. That would cause both transistors to turn on wouldn't it?

No, on the contrary. With the serial out at 2.5V, both MOSFETs are -off- because both Bipolar transistors are -on-. The circuit is designed specifically so that both MOSFETs are never on at the same time. The upper P-MOSFET is only on when the Serial Out signal is at or near 5V, and the lower N-MOSFET is only on when that same signal is at or near 0V.

You could build it and try, or enter all that into a Spice simulation and see what you get, but I suspect the switching points are roughly above 4V and below 1V. Between that, both MOSFETs are off.

Thanks polymorph for the clarification. I know just enough to be dangerous, but I learn something new all the time.

jackwp:
If the serial out was at, say 2.5 volts. That would cause both transistors to turn on wouldn’t it?

If the serial pin is high-impedance, the pin voltage is about 2.5V. Base currents are roughly (2.5V - 0.7V)/10000 = 0.18 mA. Figuring hFE at 110, the smallest value shown in the Fairchild datasheets for either transistor, the collector current is close to 2 mA for each transistor, if the circuit could supply it. It can’t, though, because the only DC path for the current is through the 4K7 resistor, which will only carry a little over 1 mA at 5V. So, both transistors saturate. The gate voltage on T3 is nearly 5V, VGS is close to zero, and T3 is off; the gate voltage is nearly 0V on T4, VGS is the same, and it’s off, too. So, if the pin is set as input, a milliamp is wasted between the two BJT’s, but the circuit is safe.

There’ll be no power to the remote devices, though. That may not be an issue: ATMega328P datasheet says, “When the USART Transmitter is enabled, this pin is configured as an output regardless of the value of DDD1.” If it’s an output, it’s either close to 0V or close to 5V, and it’s high in the idle state. Worst case, if Serial.begin() were omitted, the pin might be an input, and the remotes would be unpowered, but the output circuit wouldn’t burst into flame.