Pages: [1]   Go Down
Author Topic: mega and output voltage  (Read 281 times)
0 Members and 1 Guest are viewing this topic.
Germany
Offline Offline
Jr. Member
**
Karma: 1
Posts: 80
Arduino in VS MODE
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hey guys have some issue with my project her the code
Code:
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
« Last Edit: November 05, 2012, 12:38:29 pm by THX_RoG » Logged

UNO,MEGA2560,MEGA2560
Killed:UNO, MEGA2560, ... More to come

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 309
Posts: 26495
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

At the top of this section, there is a sticky thread.
Please read it.
Logged

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

UK
Offline Offline
Shannon Member
****
Karma: 223
Posts: 12630
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

I only provide help via the forum - please do not contact me for private consultancy.

Germany
Offline Offline
Jr. Member
**
Karma: 1
Posts: 80
Arduino in VS MODE
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

UNO,MEGA2560,MEGA2560
Killed:UNO, MEGA2560, ... More to come

Pages: [1]   Go Up
Jump to: