ground/earth detection

Status
Not open for further replies.

Dakta

New Member
I'm thinking of undertaking a signal conversion project where I have to convert a pwm signal to one with a different frequency and some other stuff, mostly basic.

One thing of importance though is that this signal is switched low, so the 12v wire is permanent, and the ground wire is open circuit whilst the pwm signal to the driving mosfet is low, and when the pwm signal is high it's connected to ground. One of the stipulations of my project are that the mosfet and driving system are not altered, (as it's a totally seperate device that I can;t interfere with) so I have to work with this.

I was thinking, as my signal converter would go between the mosfet and the solenoid being driven, (and thus the solenoid could be isolated from the initial pwm signal that's being converted) could I perhaps pass a small (limited) current to this switched earth wire, and monitor the voltage, with a pic and reconstruct the pwm signal from when the voltage is dragged down.

I can't see any reason why that wouldn't work, and it would also tell the driving device that there's a small load on the signal wires too (its a controller and can detect open circuit faults etc) so that'd be pretty ideal.

Does anyone have any better ideas, or does it sound like a 'plan'?
 
Last edited:
Take a wire. Connect one end to a microcontroller, connect other end to nothing.

Now connect the same loose end to ground/earth.

I want the pic to know the difference.

I could still provide the diagram, but it would only be of a system that is it's own seperate design seperate of what i'm trying to acheive. The only thing I'm interested in is one wire coming out of this system that is either connected to ground, or nothing. If we're confused at this stage perhaps I'd best sort it myself. I do thank you though, I thought the question might have been a dumb one.
 
Last edited:
Assuming the PIC ground and the ground to which you are connecting the wire are shared, just use a weak pull-up. When the end is not connected, it will read high; when it is connected to ground, it will read low.

John
 
Notice that jpanhalt has to make the assumption that the PIC ground and the ground you are connecting to are shared.

He also has to make the assumption that this wire of yours is connected to an input port pin.

This is because your description leaves out very important details. You have mentioned a number of apparently extraneous things about a PWM circuit that changes frequency, a solenoid, and a MOSFET driver - yet you have failed to give us the minimum details about the connections we need to help you with this. Once again, I suggest posting a diagram.
 
Wow, talk about pulling a needle out of a haystack. How much help you need?

Just a little:
*Looks like you want to monitor a signal without disturbing it. You then want to do stuff with the signal (who cares at that point - mainly you want to monitor the signal).
*The signal you're monitoring is an open-collector/open-drain type.
*Suggestions: an external weak pull-up (or even the PIC's internal pull-up) might suffice to determine between open and GND.

More than a little:
*Is the PIC powered from the same power as the system being monitored (i.e. does it share power and ground)?
*Do you care that +12V may be present at the PIC's input pin (for one-offs you might not, but for production / industrial you will).
*Suggestions: at a minimum have a serial resistor to protect the PIC's input pin; you may still use the pull-up at the PIC's input pin, or use a specialized IC to detect GND/OPEN conditions (an example of such device: DEI1026A), or use transistors or optical isolators.

Block diagram of HOLT devices (HI-8420/1/2/3/4):
View attachment 64891
 
Last edited:
Notice that jpanhalt has to make the assumption that the PIC ground and the ground you are connecting to are shared.

That's deeply unfortunate - so have I because I haven't had the chance to meet the host hardware yet, and I'm just trying to think in advance of theories of how I could approach the problem. I'll admit I made a lot of guesswork and assumptions of my own in starting this thread, needless to say I'm rather open minded on how he decided to approach it, any advice at this stage is useful and appreciated.

Nevertheless, despite his assumptions, he did a grand job with the information i provided and I'd like to thank him for his input - I don't like leaving threads unconcluded, hopefully he'll read this and know his info has come in useful.

I don't beleive in being given the solution on a plate, and reading between the lines of my opening post I suggested the pull-up oslution before asking if it sounded like a plan - really I wasn't too fussed about connections, I just wanted a rough idea as to whether it was plausible. I know people can't give me definitives, especially when i'm not sure myself, but two people have tried and they've both done me a good turn. It could go two ways - the pull up would work if the earth was shared, or not if it wasn't. That's all anyone would have needed to say really, but that's by and by now.

I also thank languer for his/her input too. To answer the question
How much help you need?
- not much. I had a problem, I had a potential solution, I just wanted input (or perhaps alternative solutions) as to whether it was plausible. The answer is 'yes, if the earth connections are shared'.

We got there happy days.
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…