1

Within my arduino project I have began to run out of GND ports on my arduino so I am having to resort to using 1 GND port for lots of electric components. I have 2 LEDs that are each connected to a digital pin and then go down to ground and for the servo it has a 5V pin connected into the breadboard and then has a pin that connects the 5V from the breadboard into the servo. In addition to these, the servo also has a GND pin and a PWN pin. (for all of this I am using an arduino mega and a breadboard that looks like this for the LEDs and the servos). enter image description here

I don't think this breadboard is efficient for doing this. How I have wired it is like this (sorry if it is not the best attempt, I tried my best):

[![enter image description here][2]][2]

when the digital pins that are controlling the LEDs have been turned off the LEDs seem to still be on (which is what should no be happening). When the digital pins are turned off the LEDs themselves should turn off.

Here is my attempt of the schematic:

schematic

simulate this circuit – Schematic created using CircuitLab

  • Guessing, it looks like you are using the Pulse Width Modulation (PWM) feature of the processor for the servo motor and the LEDs. This allows positioning of the servo and dimming of the LEDs. If all you want to do is turn the LEDs on and off perhaps you could use one of the digital outputs of the processor for the LEDs instead. Also, the LEDs likely should be in series with a resistor. – st2000 Oct 25 at 16:05
  • 1
    @xboxgamer One thing I recognised is that when I removed a GND for each of the other components that was connected to the same GND as the LEDs (whilst the switch was off), the LEDs got dimmer and dimmer, when I removed the GND for the ultra-sonic sensor there was a huge decrease in brightness. So this tells me its the GND of the other components thats keeping them on – DigitalRookie4 Oct 30 at 13:56
  • 1
    @MatsKarlsson One thing I recognised is that when I removed a GND for each of the other components that was connected to the same GND as the LEDs (whilst the switch was off), the LEDs got dimmer and dimmer, when I removed the GND for the ultra-sonic sensor there was a huge decrease in brightness. So this tells me its the GND of the other components thats keeping them on – DigitalRookie4 Oct 30 at 13:56
  • 1
    @st2000 One thing I recognised is that when I removed a GND for each of the other components that was connected to the same GND as the LEDs (whilst the switch was off), the LEDs got dimmer and dimmer, when I removed the GND for the ultra-sonic sensor there was a huge decrease in brightness. So this tells me its the GND of the other components thats keeping them on – DigitalRookie4 Oct 30 at 13:56
  • 1
    @MatsKarlsson I tried to. – DigitalRookie4 Oct 30 at 15:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.