Go Down

Topic: mega and output voltage (Read 290 times) previous topic - next topic

THX_RoG

Nov 05, 2012, 06:35 pm Last Edit: Nov 05, 2012, 06:38 pm by THX_RoG Reason: 1
hey guys have some issue with my project her the code
Code: [Select]

void loop() {
 Usb.Task();
 if(PS3.PS3Connected)
 {
   if(PS3.getButtonPress(DOWN))
  {
    digitalWrite(led_v1,HIGH);
    {
      digitalWrite(led_v1,LOW);
    }
  }
  if (PS3.getAnalogButton(L2_ANALOG) > 0 )
  {
  digitalWrite(led_v6,HIGH);
  delay(5);
  {
  digitalWrite(led_v6,LOW);
  }
  }
  if (PS3.getButtonClick(TRIANGLE))
  {
  digitalWrite(led_v1,HIGH);
  }
 }
}

if i use this  "if(PS3.getButtonPress(DOWN))" my output voltage is 145,5mV
and if i use  "if (PS3.getButtonClick(TRIANGLE))" my output voltage is 4,980V and this is when i use USB cable and when i switch to a dc adapter (7,5V 0,6A)
the voltage is the same i wouldn't bother wit this at all but im use now a 5VDC Relay and a LED 5V and i need fast 4,5V to enable this relay
and if i use deley() the voltage is i around 5V
UNO,MEGA2560,MEGA2560
Killed:UNO, MEGA2560, ... More to come

AWOL

At the top of this section, there is a sticky thread.
Please read it.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

PeterH

Adding to AWOL's advice, I suggest you disconnect the relay from the Arduino right away, and only reconnect it after you fully understand the issues in switching inductive loads with an Arduino and have the appropriate driver hardware. From your description it sounds as if you are connecting it directly, which can potentially damage or destroy your Arduino.
I only provide help via the forum - please do not contact me for private consultancy.

THX_RoG

the voltage that i was measured was without  the led and relay that was "clean" output voltage without any consumer between GND and my output pin 23
UNO,MEGA2560,MEGA2560
Killed:UNO, MEGA2560, ... More to come

Go Up