Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Inverting pwm signal

Status
Not open for further replies.
Dakta: I know exactly what u are talking about.
I have just designed and in the final stages of testing a multigauge, multifunction controller for turbo charged engines with the following features:

1) Analog sweep & Digital Boost
2) Open & Closed loop multi map, HoT side, boost controller (PID) based on TPS, RPM & Boost pressure
Including True continuous barometric reference for mountainous rallys etc.

3) Electronic Blow off valve control and cold side EBC.
4) True turbo surge control via the cold side BOV/CBV valve at pressures BELOW the hotside wastegate spring pressure.
5) Gear shift boost launch/traction control
6) Gearshift based dynamometer for tracking turbo spool rates and optimum tuning.
7) Turbotimer
8) Auxiliary outputs configured by TPS, Boost, RPM, Oxygen/ AFR sensor. Suitable for NOS or water injection staging.

So...what u need is simple enough.

You are tapping the output of an open collector sink Transistor or N Channel MOSFET.
Therefore all u gotta do is place a 'pullup' resistor...perhaps 10K on the input to force the signal to 'your' MOSFEt high when it goes 'disconnected' from the source. Then use the circuit link I showed u to establish a True Hi and LOW drive inversion..

A pullup resistor is tied to the 12V+ power
 
Last edited:
Let me add this:
What do u know of automotive Load Dump transient handling?

Perhaps this will be of assistance:
**broken link removed**
Automotive EMC Standards

If u need specific design help to handle these transients, let me know.
To avoid having to deal with them...u should tap your power and ground directly from the vehicle ECU wihich will have built in protection handling PLUS include a flywheel clamping diode, reverse biased on your final load as close as possible to the load itself. If your load is to be rapidly switched in the case of a PWM solenoid , you should use a unidirectional transorb and diode combination to 'snub' the transients properly without affecting the response time of the solenoid.

Edit:
This discusses the transient handling:
https://www.electro-tech-online.com/custompdfs/2011/01/13c3311.pdf
 
Last edited:
Anyway to recap, running my original circuit on the first page in proteus, when the earth switch is connected (as it would be when the duty is high) I get 0v between the 12v feed and the output earth of the load (the lamp). The lamp stays off.

When this is inverted, and the earth is disconnected (the switch is open, representing the mosfet controlling the earth connection in the ecu is at logic 0) then my mosfet pulls high and the lamp comes on.

true, at 10v not 12v, but it does do the opposite of the input. Which might be why I took the critisism so badly. I don't mind being called an idiot, but it goes down much better when my solution isn't the closest one to a working outcome.

I was expecting to be told something wasn't right with it however, I am NOT a mosfet expert, and the whole point of posting the circuit was for feedbacks sake.

I do appreciate the feedback received, there are good people on here.

You're not achieving inversion, because the lamp is off when the input to your MOSFET is low, and on when it is high. That's simply a voltage follower, not an inverter. Look at the attached circuit. When the input from the left side voltage source is "High", the current through R1 ( your lamp ) is zero, and visa-versa. This is an inverter, and it's at least a representation of what you want. We just need to make sure the voltages, currents and loads are correct, and make sure we have proper FET's. Also, you'll need to protect the circuit against load dumps.

I have a game to watch, I'll check back and see what you think of the solution.
 

Attachments

  • invertingPWMsignal.JPG
    invertingPWMsignal.JPG
    146.9 KB · Views: 240
Last edited:
Whether you were insulted or not, there is no reason for racist comments.
You don't like comments about Black American people. I didn't call them Africans (which they used to be). They are the only people on earth who talk about "attitude".
Oh. Your name says Brown... and are from Alabama so probably you are Black? Then I am sorry.

there is no reason for racist comments. What do they have to do with electronics? Or helping people?
The little kid talked like a Black American (about "attitude") and has a chip on his shoulder like a Black American. He knows nothing about electronics but expects us to teach him the basics instead of him reading and learning about it like we did. My teachers in University had terrible English and taught poorly. I learned about electronics myself without the internet. Then I learned much more in my first job.
I have taught and am still teaching many pleasant young people on these forums. But I don't help the nasty ones.
I helped one pleasant nice student in The Philippines graduate from university and get a good job.
 
I do get what you're saying.

Maybe I didn't know the terminology to explain it best, but the idea of my first circuit was on that concept.

Lets recap:

**broken link removed**

On the left of the red line we have the outputs of the ecu, one fixed 12v feed and a switched earth. Obviously proteus doesn't have an 'ecu module' so I simulated it with a permanent live and an earth. With a switch.

It's basic but at an electrical level it's the same thing, i just have to flick the switch really fast ;)

Inbetween the red and blue we have my mosfet, with that resistor. Now in the original circuit, thats where my solenoid would be. Instead we have a resistor in it's place which pulls the gate high when the earth is disconnected.

We also have the mosfet conencted to the 12v supply at the top, so that when the gate goes high, current flows.

So you see, in concept it works. When earth switch is off (open), gate is on.

Audioguru actually came within a millimeter of solving my problem whilst he was calling me thick, because he mentioned swapping source to drain (I cant remember what he said exactly) and I misunderstood this instruction as I thought he meant just flipping the mosfet and I knew from my past knowledge this not to be.

It's only two seconds ago that I positioned the load on the other side of the mosfet that I realised the whole problem with my circuit was an amateur cockup, and a result of me not concentrating and putting the mosfet on the wrong side of the load (lamp).

Therefore audioguru, despite all the ill feelings, does deserve the credit of being the person who had the right idea. I think it could have gone without the ill feelings, but I insist on being fair with the good aswell as the bad, so thanks. I do think you're an arsehole but thanks. You've had chance to say what you think, that was mine. We are even and this is done with.

Your suggestion too is appreciated though, this three page thread really is about the placement of a mosfet. I think we've all earned the right to feel daft. It is after all a basic circuit, and as far as placing mosfets goes it's one I've done before.

As far as this thread goes, my solution that I drafted myself was good, the circuit was no-one elses suggestion, I never really understood what audioguru was raving about, but now I've fixed the problem myself by realising my cockup maybe I can. I assume he was trying to get me to look at that but between all the tripe I never got the message. But I sorted it. And I am content with myself.

Interesting though that the circuit itself did 90% work despite the faulty placement.
 
Last edited:
Dude, get rid of that circuit, it won't work, even if your simulator said it does.
 
I think this thread is done with.

That circuit isn't correct as I realised the probem mid-way through writing my last reply.

I will try the new circuit and I will solve whatever is wrong with it. And I will do it. Not out of arrogance, but our pal here is admittedly quite inspiring in his own unique way.
 
Last edited:
Sorry, I don't mean to hurt your feelings.

This whole thread has just taken me aback. I've never seen anything like this before.

It makes me want to get nasty, I've been described as like a lot of things. The attitude has knocked me for six, and I do regret asking.

Your help is appreciated and you don't deserve to be knocked back. I just don't think the thread can be recovered. It is disgusting.

It isn't your doing. If you want to advise, feel free. But you're not under any obligation. And I think the responses I've got here have put the value up as far as solving it myself is concerned, I'm okay with electronics and getting this working would make me content.
 
Last edited:
Dakta please check my posts #21 & 22, I think u missed them.

Do u see?
 
Last edited:
Yes I see :)

It's too late to start looking at the solution, but I'll have a review tomorrow.

Do you have a webpage or anything referencing your controller project? It's the sort of thing I wanted to build up to, but not for a while yet.
 
No web page, it's a work in progress, not completely tested.
I do have a couple pics like this one:
ImageShack® - Online Photo and Video Hosting

The other pics of the faceplate and so on are for a purely analog DIY kit for boost display , turbo timer and electronic BOV control, not with the ebc/afr/aux , digital displays features i mentioned.
 
Your N-channel Mosfet is a follower. Since its gate-source voltage must be at least 5V for it to completely turn on then its max output voltage at its source pin will be about only 7V.

If the load is between the positive supply and the drain pin of the Mosfet then the load will get the full 12V but the logic will be inverted.
With the addition of many level-shifting parts the load will get a swing of 12V when driven from a P-channel Mosfet. But then the load must be disconnected from ground and connected to +12V instead.
 
If the load is between the positive supply and the drain pin of the Mosfet then the load will get the full 12V but the logic will be inverted.

It won't actually be inverted, because the load ( lamp or solonoid ) will be "on" when the input is high, and "off" when the input is low. That's why my circuit uses two FET's.
 
Last edited:
guru...u are assuming a logic level MOSFET?
It is very difficult to read the tiny scribbles on the schematic but it looks like an old logic-level IRL540 Mosfet.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top