Go Down

Topic: Analog Input Problem (Read 2915 times) previous topic - next topic

dcyro

Quote
Your schematic in reply #7 can't be right, because it has the gates of the upper mosfets in the H-bridge connected to ground. Like lefty, I suggest you use a ready-built H-bridge, or at least an H-bridge chip - preferably a mosfet-based on such as MC33926 or BD6222.


Oh yeah...  :smiley-red: they're connected to the source terminal rather than the Drain terminal. Just made a mistake in drawing the circuit. But they're working fine. The only problem is the sensing :(

With the 1.2V Reference, I'll try that. Because I tried using the 3.3V and although the reading seems stable... the output still goes down when the pwm drives the h-bridge.


dcyro

Here is the corrected version of the circuit diagram.



:smiley-fat:

dcyro

Hi dc42,

I've tried your solution of seperate grounds and it worked! Thanks a lot. I think now my problem is just the timing and the fan. Which is I guess is just my coding and the voltage source for my 5V fan.

Whenever I plug the fan to the arduino it draws up too much power interfering with the sensor and I can't plug it in my external source. Well I think I can just buy a different fan or use a voltage regulator so that I can tap-in to my external source while limiting the voltage. But do you have some insights on how I can fix it without buying a new fan?

dc42

Can you provide a link to the specification for the 5V fan?

As you have a 10V supply available (judging from your earlier schematic), how about using a 12V PC fan?
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Grumpy_Mike

Quote
But they're working fine. The only problem is the sensing

No it is not:-
Quote
the voltage is around 5.01 V but when I start to drive the h-bridge circuit, the voltage goes to 5.3 V.

That is your problem. This needs to be fixed first before you worry about analogue inputs.
It is a counter intuitive problem, normally voltage goes down when drawing current from a supply.
All the diagrams you posted come up as "image not available" where I am so it is hard to be more specific. I think if you solve this problem then your analogue problems will go away.
So first off lots of decoupling around the H-bridge, and use a star wiring for the ground. That is all the grounds meet at a common point not chained.


dcyro

Quote
All the diagrams you posted come up as "image not available"


That's weird, i'm not sure, why is it that for you, I think others can see it. If you want I can send you the schematics.

Quote
So first off lots of decoupling around the H-bridge, and use a star wiring for the ground. That is all the grounds meet at a common point not chained.


Yup I think so too. I think this is what dc42 suggested. I've tried it and it worked! I haven't done the decoupling in the h-bridge though.

Grumpy_Mike

Quote
That's weird, i'm not sure, why is it that for you, I think others can see it. If

I don't normally have this sort of problem but this is what your post looks like to me:-

You can always use the attache option under the Additional Options triangle at the bottom of the reply box.

dcyro

Hmmm well I used flickr for that one obviously. Anyway I've attached it here on this post.  :D

Grumpy_Mike

It is a bit overly complex. Why do you go through two FETs before turning on the top FET ?
If you are going to use four pins to control the bridge then you can compensate for one FET's inversion in your code.
Most H-bridges have only two pins controlling them and also use a p-channel FET for the top ones.

Anyway yes you need lots of decoupling.

dcyro

Quote
It is a bit overly complex. Why do you go through two FETs before turning on the top FET ?


Well in order for me to drive the top FETs I would need a high gate voltage. The voltage of the arduino is not enough to switch them on. So I used inverters to drive them. It just so happen that those FETs are the ones I have at hand and I made use of it.

Quote
If you are going to use four pins to control the bridge then you can compensate for one FET's inversion in your code.


Hehe I could just use one inversion as you have said in my code but its just prototype anyway, I wanted to set my mindset 0 - off and 1 - on. Since like I said I already have these FETs anyway so I just made use of them.

Quote
Most H-bridges have only two pins controlling them and also use a p-channel FET for the top ones.


Well with regards to the number of pins, I can think of other ways to control them with lesser number of pins. I just though that I can have complete control over all the FETs of my H-Bridge if I have this set-up. Well if you're saying this is unsafe or can cause some problems in the arduino I can revise the control set-up(any suggestion?). But for all intents and purposes it works for the time being.

Go Up