Pages: [1] 2   Go Down
Author Topic: Wiring question (will this work?)  (Read 1981 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 52
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey everyone!

I have a simple question...incredibly noobish, it's basic electronics. I have a (theoretical) circuit; here is a diagram. (The diagram is much simpler than what it'll actually look like.)

My question is, will it work? By that I mean, I know that the IR reciever (the TSOP34856) will turn on, but will it be able to output any data? No, right? If not, how can I make this work?

Thanks all!
« Last Edit: August 04, 2011, 01:11:43 pm by Fej42 » Logged

Central MN, USA
Online Online
Tesla Member
***
Karma: 73
Posts: 7189
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

From spec sheet:

Supply voltage: 2.5 V to 5.5 V

You are providing the voltage of 6 AA batteries, around 9V. So it is too high. If you have a 3-AA battery pack, it will work. Or if you connect the power to arduino 5V directly. Why didn't you use arduino's 5V power for the sensor?
Logged


Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26956
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That's pretty much what the application circuit is
http://www.vishay.com/docs/81732/tsop348.pdf
Just put  100nF cap across +5 & GND.
Supply it from 3 batteries instead of 6, so you're at 4.5V. Arduino will like that too, connect to the 5v pin on the power header.

You have a source putting out 56 KHz IR pulses it can recieve?
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Cumming, GA
Offline Offline
Edison Member
*
Karma: 20
Posts: 1653
Ultimate DIY: Arduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

No common GND connection?
Logged

Central MN, USA
Online Online
Tesla Member
***
Karma: 73
Posts: 7189
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

No common GND connection?

Did not catch that.

So OP, why do you want to power this sensor with a separate battery from arduino?
Logged


Offline Offline
Jr. Member
**
Karma: 0
Posts: 52
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

From spec sheet:

Supply voltage: 2.5 V to 5.5 V

You are providing the voltage of 6 AA batteries, around 9V. So it is too high. If you have a 3-AA battery pack, it will work. Or if you connect the power to arduino 5V directly.

I cannot believe I forgot about that - thanks for reminding me!

No common GND connection?

Did not catch that.

So OP, why do you want to power this sensor with a separate battery from arduino?

I knew it was a bad idea to not tell you guys the whole story.

Okay, so I have some circuit boards. Here's the schematic for how they're supposed to work. The plan is, there are 3 PCBs, each with 3 sensors and an LED. (Yes, it is ok to use 3 sensors.) The LEDs draw about 98 mA, each, with the 51 ohm resistor they recommend. I can't use the Arduino to power them because it is already going to provide power to, let's see here: A 16x2 character LCD, an XBee, an Adafruit Wave Shield, possibly a small amp, and a PCF8574 I2C port expander. (I'm not even sure if it can handle all of that, yet.)

The 3 PCBs will be wired together like this. ("To tagger" refers to the uC.)

The problem is, everything on the PCB (the 3 sensors and the LED) need to be powered by the same source. The PCB has 4 spaces to solder wires in, shown in the schematic - +5v, ground, data, and hit LED.

My new idea is:
+5v and ground will be taken care of by the battery pack.
Hit LED is simple - just tie it to ground, and trigger it with a MOSFET.
Now the data pin...here is where I'm stuck.

I have a schematic of my idea here. What I need is: on the schematic, there is a part labeled "???". I don't know if this kind of part exists, but I'll ask anyway. What I kinda need is a reverse MOSFET - where power can flow freely between drain and source, but while power is flowing, the gate pin outputs a 1. When power is not flowing, it outputs a 0. I imagine something like this would need to be powered as well.

What I'm asking is - does something like this exist?

(By the way - none of this matters if I can just use the data pin with the Arduino, without a common ground. I can't do that, right?)

Thanks!
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26956
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

"What I kinda need is a reverse MOSFET - where power can flow freely between drain and source, but while power is flowing, the gate pin outputs a 1. When power is not flowing, it outputs a 0."
How about a PNP transister?


* PNP_buffer.jpg (20.75 KB, 960x720 - viewed 18 times.)
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Jr. Member
**
Karma: 0
Posts: 52
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

"What I kinda need is a reverse MOSFET - where power can flow freely between drain and source, but while power is flowing, the gate pin outputs a 1. When power is not flowing, it outputs a 0."
How about a PNP transister?

I...do not know. I have tried to look this up, but I'm having trouble making sense of it. Tell me if I'm wrong...a PNP transistor is a switch, where an electrical pathway inside the transistor can be switched on or off, depending if something is sinking current from a third pin, the name of which eludes me.

If I'm right, then that type of part won't work. I need something to check if a wire is passing current through it, and relay that to the uC.

Also, I think my (theoretical) MOSFET setups won't work either, as they lack a common ground - same mistake. Can anyone link me to a schematic of a simple way to wire up an N-channel MOSFET? (With the default setting (with gate set to 0) set to off? I'm just trying to trigger LEDs.)

Thanks guys!
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26956
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Replace motor/diode with LED.

The other - how about measuring voltage across a shunt resister?
If need a high/low signal instead, then run the voltage into + input of a comparator, -input from a trimpot between +5 & Gnd, will get a high out when shunt voltage exceeds trim pot. Amplify the shunt voltage with an op amp if need larger comparison range.

http://www.dipmicro.com/store/index.php?searchStr=shunt&act=viewCat&Submit=Search


* motor_drive_mosfet.jpg (22.59 KB, 960x720 - viewed 24 times.)
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Jr. Member
**
Karma: 0
Posts: 52
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Replace motor/diode with LED.

The other - how about measuring voltage across a shunt resister?
If need a high/low signal instead, then run the voltage into + input of a comparator, -input from a trimpot between +5 & Gnd, will get a high out when shunt voltage exceeds trim pot. Amplify the shunt voltage with an op amp if need larger comparison range.

http://www.dipmicro.com/store/index.php?searchStr=shunt&act=viewCat&Submit=Search

Thanks for the MOSFET schematic!

The resistors in that, though - they do change based on the application, right? What should they be?

The shunt resistor/comparator idea seems good, thanks! They do come in lower resistances though, correct?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26956
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Resisters on the gate are not critical, MOSFET input is voltage driven, not current. Mostly they ensure the part is off when arduino starts up & inputs, are, well, inputs, and levels are floating.  Current limit resister for the LED is important. Make sure to select a logic level MOSFET.

Shunt - how low do you want it? Needs to have some resistance, or else no workable voltage is developed to make a measurement on.

5A thru a 10mOhm shunt is only going to develop 50mV. How much current are you expecting?
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Jr. Member
**
Karma: 0
Posts: 52
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Resisters on the gate are not critical, MOSFET input is voltage driven, not current. Mostly they ensure the part is off when arduino starts up & inputs, are, well, inputs, and levels are floating.  Current limit resister for the LED is important. Make sure to select a logic level MOSFET.

This is the MOSFET I chose. It was recommended to me by a person from another forum...is it good?

The 1K resistor in the schematic doesn't need to be changed? I read somewhere that it's important to have the right resistor based on the current going through the MOSFET.

Shunt - how low do you want it? Needs to have some resistance, or else no workable voltage is developed to make a measurement on.

5A thru a 10mOhm shunt is only going to develop 50mV. How much current are you expecting?

Let's see here...using a 3-AA battery pack, so 4.5v...

3xLED, 4.5v with 51ohm resistor, roughly 88 mA each, so a total of about 265 mA
9xTSOP sensor, 4.5v with 100ohm resistor, 45 mA each. Wait a second...the datasheet says it can't handle any more than 3 mA. What does that 10uF cap do to my calculations?

Sorry, I'm not quite sure how much current I need right now.

Do I even need a shunt resistor? Couldn't I just tie the comparator directly into the wiring? I'm looking at this one. Also, will I need a resistor for a comparator? (It only uses 1 mA...)

Thanks!
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26956
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

MOSFET looks good. 1K, 10K, not critical. Voltage at the MOSFET Gate will be 0/5V from the arduino. Could be as low as 180 ohm with series resister between arduino & gate and will still work.
You've got so many pieces now I can't keep track. Can you post a complete diagram and show where you want to get 0/1 indication from?
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Jr. Member
**
Karma: 0
Posts: 52
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

MOSFET looks good. 1K, 10K, not critical. Voltage at the MOSFET Gate will be 0/5V from the arduino. Could be as low as 180 ohm with series resister between arduino & gate and will still work.

Great, thanks!

You've got so many pieces now I can't keep track. Can you post a complete diagram and show where you want to get 0/1 indication from?

Yeah, I can't keep track either. My brain's going nuts! Here's the diagram. Sorry if it's a bit messy.

Thanks for helping me so much!
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26956
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Much better.
You need battery ground connected to arduino ground.
I need to look up TSOP34856 again to see what it puts out.

Looks like you want to know if any of the three devices are active, you turn on the Hit light?
Connect them like this.
We could have resolved this days ago if you had shown this kind of picture to start.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Pages: [1] 2   Go Up
Jump to: