Let's Make Robots!

High signal from pic to pic w/(2) pwr supplies?

So here we go:

Walter has (2) 7.2v  packs, one for data and one for servos. Each has a switch and can be turned on idependantly (manually). During the "start-up" routine, I need the main picaxe to know if and when the servos have been turned on. It would be like this:

I turn on the main brain. The LCD turns on and displays a message to tell you to "turn the servos on, please" --I need the main brain to know when you have turned them on. 

I need to send a simple data-level signal from a 5 volt source to a pic when that 5v source is running off one volt regulator and battery and the pic is running off of a different volt regulator and battery. Should I do this with a transistor? Diodes somewhere?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Mr. TeleFox

Here is a proper thank you as your schematic worked perfectly. I was even able to solder the entire assembly in-line with a shrink-tube covering --no PCB's. 

Good solution, neat final product, the thing works... Badda Boom, Badda Bing.

Thanks agian.

No worries CtC, you just keep rolling out those Walter updates and that will be thanks enough =)
So as I see it, the resistors really can be anything... Anyone got a problem with something around 10k for each R1 and R2?
I use 10kΩ for all my pull-up/pull-down resistors by default, and unless you use a really really crappy transistor 10kΩ will be fine for R1 as well.

Actually optocouplers would be complete overkill. Telefox's design already provides good over voltage protection.

I would have probably just used a voltage divider on a digital input. Even with a higher voltage than expected as long as you have at least 20K series resistance to protect the picaxes internal protection circuitry you'll be fine. That's all they use for programming the picaxe from the RS232.

Yeah an optocoupler would work great for this. We talked about their uses a long time ago, I don't know if you recall that. Sparkfun has a couple different ones. Chrome isn't liking links so I had to just paste it.

http://www.sparkfun.com/commerce/product_info.php?products_id=314 

Thank you so much!

Hey CtC, here's a little circuit that will do the trick. Note that the grounds, as usual, must be connected.
PICAXE_2ndary_Power_Detector.jpg
When the switch is open (no servo power), the PICAXE input is pulled high, thanks to R2. If the switch is then closed, Q1 turns on, pulling the input low. With sensible choice of NPN transistor and resistor values, this will work with just about any combination of voltages, and consumes almost no current. There is and even simpler option the uses just a diode and resistors, but it's a little sketchy, and I figure you'd rather make something better for Walter =)

If you want to isolate the two circuits completely, even including the ground line, you can swap out Q1 for an optocoupler. It'll be a little bigger than just a transistor, but should your servo power regulator blow up and blast your servo circuit with abnormally high voltages, the optocoupler will virtually completely protect the PICAXE side of the circuit. To be honest, the NPN transistor provides a fair amount of protection anyway, but since this is Walter we're talking about I thought you might be interested in a more secure option as well.