Pages: 1 [2]   Go Down
Author Topic: Analog Input Problem  (Read 2697 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley-sad

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.

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here is the corrected version of the circuit diagram.



 smiley-fat
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6639
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

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.

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 639
Posts: 34726
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Currently, I have this one.

http://db.sanyodenki.co.jp/product_db_e/coolingfan/dcfan/dc_fan_detail.php?master_id=484

But I think I'll be using this one instead. I changed the 10 V to 12 V and so far its working fine.

http://db.sanyodenki.co.jp/product_db_e/coolingfan/dcfan/dc_fan_detail.php?master_id=1926
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 639
Posts: 34726
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.


* screen.png (57.45 KB, 1136x672 - viewed 7 times.)
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hmmm well I used flickr for that one obviously. Anyway I've attached it here on this post.  smiley-grin


* cktdiagram2.png (29.69 KB, 934x587 - viewed 7 times.)
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 639
Posts: 34726
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: 1 [2]   Go Up
Jump to: