Go Down

Topic: Uno only semi works on two of four computers (Read 693 times) previous topic - next topic

format22

The purpose of the program is to send a HIGH LOW signal to a transistor that opens and closes a relay.  The UNO has the example blink program uploaded on it with the digital pin connected to the transistor.  I plug the USB into my laptop and it works (switches relay on and off). I plug it into my other laptop, and it works.  I plug it into my third laptop and it stops. I plug it into an external power supply and it works.  If I plug it into my third laptop with the external power supply it also doesn't work.  All in all, I have four laptops and it works on two and doesn't on two..?  All four have arduino software uploaded and can upload programs onto to the board. Two can upload the blink program and can make the board's LED blink but will not work with my circuit. 

The circuit is simple but may be where the problem lies.  Digital pin to base pin of triac. AC power supply to relay to pin 1 of triac, pin 2 of triac to ground and return AC. 

Laptop that will not power the circuit but can light up the board's LED.  When I connect the base to digital pin 13 (pin with the board's led) the LED dims but still blinks but relay does not switch.  I do the exact same thing with my other laptop and the LED and switch work fine..? 

Any thoughts..?

groundfungus

Used to be that some laptops had weaker USB ports.  Might check the supply voltage to the board to make sure they are getting enough voltage?

format22


Used to be that some laptops had weaker USB ports.  Might check the supply voltage to the board to make sure they are getting enough voltage?


I agree and that's what I thought too.  But then when connecting a external 9V battery to the Vin pin, should this not have fixed the problem?

groundfungus

if the 9v battery by itself, yeah.  if 9v with USB plugged in maybe not.  i was working on my robot a while back and with the USB plugged in (only) my rangefinders wouldn't work right.  I read that they needed more voltage to work so i plugged in a 9v battery while USB plugged in (to read rangefinders).  The USB voltage was low enough that it pulled the battery down and drained it rather quickly.  only when i ran the arduino with 9v by itself would the rangefinders work right.

format22

That's interesting.  Is there a way to stop this from happening.  The laptop that does this is the one that is connected up to all the power supplies with all the labview software to run them on it so I can't really switch out computers..

format22

opto-isolator with the 9V supply fixed problem.  Thanks for your help.

groundfungus

Could you show me what you did?  May help me in the future.

James C4S

9v battery as in the small rectangle style?  That wouldn't be doing you any favors.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

format22


9v battery as in the small rectangle style?  That wouldn't be doing you any favors.


Hmm.  The arduino digital pin is sending the signal to the opto (pin 1, pin 2 ground).  The 9V is going into the opto collector pin (pin 5) and when the opto gets the signal from the arduino pin it closes the circuit and allows this 9V to go to the triac base (via opto pin 4)  which lets the AC current flow.  The arduino wasn't opening and closing the triac but the 9V will..  Is there another way to work this, sorry for not having a pic. ? 

Grumpy_Mike

In the first post you seem not to have any ground return path.
However what voltage was your AC, it is not a good idea to hook up circuits to mains without an optical isolator.
You can find out how much your triac gate ( not base ) needs from the data sheet. I would have thought there should be a resistor to limit the current in the gate.

You can dispense with the battery by using the mains to supply the voltage to the gate through a series resistor and capacitor.

format22



You can dispense with the battery by using the mains to supply the voltage to the gate through a series resistor and capacitor.


Awesome, thanks Mike.  I really don't want this battery in my circuit but I'm a little confused on this series resistor/capacitor that you describe.  Could you go into a little more detail on where this fits in to the opto and triac part of the circuit? 

Grumpy_Mike


cjdelphi

don't use pin 13.

use another pin like pin 2.. if the voltage is low to begin with, the led will only lower the current further to the transistor.



Grumpy_Mike


don't use pin 13.

use another pin like pin 2.. if the voltage is low to begin with, the led will only lower the current further to the transistor.

Well pin 13 has a load on it but it is only a mA or so, it will not affect the voltage appreciably.

cjdelphi

well it would depend on the input voltage and resistor used... 


Go Up