Arduino power issue/project guidance

I have a project n which an arduino nano is connected to a 433mhz rf receiver module.
The proble is using 5v of the nano i power the rf and i addition to that when i try and power an led it is very dim / does not power up.
Will switching to an arduino mega help in any way.

also can i ask any questions related to my project here?

Hi, @chrisbisi

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, component names and pin labels.

Do you have a current limit resistor in series with the LED?

Thanks... Tom... :smiley: :+1: :coffee: :australia:

Hi tom,
i do not have resitors because my leds work perfectly fine with 9v bats non regulated.
I will post the shcematic after soe time.
thnx

tom can i ask questions regarding the whole project here
?

Unless your LED has a built-in resistor to limit current then you risk damaging the board.

PP3? If so, put them away and try 6 * AA.

1 Like

Yes...
I presume your LEDs have built in resistors, can you please post images of your project?

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:

Thnx,
Here is the shcematic for the receiver and transmitter.
(note : I could not include the 433 mhz tx and rx modules in the diagram.)

transmitter
T.M.C AVS transmitter.pdf (3.9 KB)

receiver
T.M.C AVS receiver.pdf (3.8 KB)

receiver pin table
image_2022-10-27_144908595

The problem which i think is here is that since the receiver module draws 5v , the arduino nano might not have much more current left to power the leds.
My proposed solution is to switch out the nano for an arduino MEGA , to help with the voltage problem.

(note : The leds are a substitute for a motor drivers 4 pins which will be connected to the arduino later.)

Also here is the code for later guidance questions

transmitter code

// Include RadioHead Amplitude Shift Keying Library
#include <RH_ASK.h>
// Include dependant SPI Library
#include <SPI.h>

const byte front = 6;
const byte back = 7;
const byte right = 8;
const byte left = 9;

byte motonum = 0;

// Create Amplitude Shift Keying Object
RH_ASK rf_driver;

void setup() {
  pinMode(front, INPUT_PULLUP);
  pinMode(back, INPUT_PULLUP);
  pinMode(right, INPUT_PULLUP);
  pinMode(left, INPUT_PULLUP);


  // Initialize ASK Object
  rf_driver.init();
}

void loop() {

  if (digitalRead(front) == LOW) {
    motonum = 1;
  }




  if (digitalRead(back) == LOW) {
    motonum = 2;
  }




  if (digitalRead(right) == LOW) {
    motonum = 3;
  }



  if (digitalRead(left) == LOW) {
    motonum = 4;
  }

  if (digitalRead(left) == HIGH && digitalRead(right) == HIGH && digitalRead(back) == HIGH && digitalRead(front) == HIGH) {
    motonum = 0;
  }





  char *msg = motonum;
  rf_driver.send((uint8_t *)&motonum, sizeof motonum);
  rf_driver.waitPacketSent();
  delay(50);
}

(note : the leds are a substitute for the 4 pins of an l293d motor driver.)

The project as a whole is a car which has a camera(esp32 cam).
It has 2 modes, 1 in which you can control it as an rc car and the 2nd mode in which it patrols the house autonomously.
For the autonomy part im using ir sensors to detect if im close to hitting anything.
The camera(esp32 cam) uses a slightly modified example code to send the feed via wifi.

The receiver code will change because I am still working on the autonomous mode.
Thank you for your time.
Chrisbisi

Hi,
@chrisbisi thanks for the schematics.
Transmitter;


Receiver;

Can you post an image of your LEDs please?
Where are your Tx and Rx units.
Where are your power sources?

Have you loaded your receiver with code that JUST cycles the LEDS to make sure you have full brightness available?
Do you have a DMM?

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:
PS. Your CAD program should have been able to EXPORT in jpg.

I gave you the table for the arduino receiver.
That is all ,right?
Icould not include the rx /tx module in the diagram as i use tinker cad for it and it's library does not have rf modules.

led photo

also the problem is not the leds
it is if i will have enough power to give signal to the motor driver

Hi,
What are the motor specs?
You will need an external power supply for the motor.
The Nano has enough power to SIGNAL the driver.
What are the specs of the driver?

Thanks for the image of the LED.
Those LEDs do not have series resistors.
What specs makes you believe that 9V is okay for them?

In the configuration you have now, those LEDs will cause damage to the outputs of your controller as they are drawing more current than specified for your controller.

Do you have a DMM?
Can you please tell us your electronics, programming, arduino, hardware experience?

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:

Thnx.
The motor is a 3-6VDC TT geared motor
i have an l293d motor driver with me.
Yes i do have a battery as a power supply with th 7v bat going to the motor driver .
I will connect the arduino to the 5v supply of the motor driver.

I thought that 9v was ok because the led was fine to glow for long periods of time without heating up when powered by 9v.

I have little experience as in 3 and a half months of it.
I had my interest peaked by a motor spinning a blade.
this project i one for a robotics competition.
In the first comp the car did not work.
we trying to get it to work for another comp coming this nov 30th.

Yes i have loaded the code which cycle it and it works, the leds shine at full brightness.
However they do not do the same when loaded with the receiver code.
This will be ok if i can provide a signal to l293d motor driver module (not a shield).

Thanks
Chrisbisi

It depends on what you call full brightness.

If you connect a DMM, in volts mode across one of the lit LEDS that should be on continuously, can you measure the DC volts and then the AC volts?

Have you defined in your Rx code the OUTPUT pins?
We haven't seen your receiver code.

Tom.... :smiley: :+1: :coffee: :australia:

@chrisbisi

Can you elaborate about your project ?

Let me get this ...

The transmitter have 4 button switch with a 433 MHz module. Press button 1, move forward, button 2, move backward, button 3, turn left, button 4, turn right. .... I am correct ?

The receiver with a 433 MHz module , have 4 leds, one represent foward, backward, left and right ... I am correct ?

And also you want to control the speed of the motor .... I am correct ?

Not sure why OP is so resistant (pardon the pun) to adding resistors to the LEDs. It is an obvious issue so why not just fix it?

Yes u are correct , 4 buttons 433 mhz transmitter.
yes u are correct , 4 leds representing forward left etc

You are not correct i do not want to control the speed of the motors.
i want it at a constant speed.

Sry,
I did not ave resistors.
But will 10k ohm ones be ok?

i have also switched out the nano for a mega.
but i havnt ran the code yet as i was busy.
will do later.
thnx

this is my code for autonomy,
is this ok.
I used lidar as inputs.

byte irf = 10;
byte irl = 9;
byte irr = 8;

byte rightfront = 2;
byte rightback = 3;
byte leftfront = 4;
byte leftback = 5;


void setup() {
  pinMode(irf, INPUT);
  pinMode(irl, INPUT);
  pinMode(irr, INPUT);

  pinMode(rightfront, OUTPUT);
  pinMode(rightback, OUTPUT);
  pinMode(leftfront, OUTPUT);
  pinMode(leftback, OUTPUT);

  Serial.begin(9600);
}

void loop() {


  if (digitalRead(irf) == LOW && digitalRead(irl) == LOW && digitalRead(irr) == LOW) {
    digitalWrite(rightfront, HIGH);
    digitalWrite(rightback, LOW);
    digitalWrite(leftfront, HIGH);
    digitalWrite(leftback, LOW);
    Serial.println("no obstacle , going front");
  } else if (digitalRead(irf) == LOW && digitalRead(irl) == LOW && digitalRead(irr) == HIGH) {
    digitalWrite(rightfront, HIGH);
    digitalWrite(rightback, LOW);
    digitalWrite(leftfront, HIGH);
    digitalWrite(leftback, LOW);
    Serial.println("right is near obstacle , going front");
  } else if (digitalRead(irf) == LOW && digitalRead(irl) == HIGH && digitalRead(irr) == LOW) {
    digitalWrite(rightfront, HIGH);
    digitalWrite(rightback, LOW);
    digitalWrite(leftfront, HIGH);
    digitalWrite(leftback, LOW);
    Serial.println("left is near obstacle , going front");
  } else if (digitalRead(irf) == LOW && digitalRead(irl) == HIGH && digitalRead(irr) == HIGH) {
    digitalWrite(rightfront, HIGH);
    digitalWrite(rightback, LOW);
    digitalWrite(leftfront, HIGH);
    digitalWrite(leftback, LOW);
    Serial.println("right and left is near obstacle , going front");
  } else if (digitalRead(irf) == HIGH && digitalRead(irl) == LOW && digitalRead(irr) == LOW) {
    digitalWrite(rightfront, LOW);
     digitalWrite(rightback,HIGH;
     digitalWrite(leftfront,HIGH);
     digitalWrite(leftback,LOW);
     Serial.println("obstacle infront ! , turning right");
     delay(600);
  } else if (digitalRead(irf) == HIGH && digitalRead(irl) == LOW && digitalRead(irr) == HIGH) {
    digitalWrite(rightfront, HIGH);
     digitalWrite(rightback,LOW;
     digitalWrite(leftfront,LOW;
     digitalWrite(leftback,HIGH);
     Serial.println("obstacle infront and on right , turning left");
     delay(600);
  } else if (digitalRead(irf) == HIGH && digitalRead(irl) == HIGH && digitalRead(irr) == LOW) {
    digitalWrite(rightfront, LOW);
     digitalWrite(rightback,HIGH;
     digitalWrite(leftfront,HIGH);
     digitalWrite(leftback,LOW);
     Serial.println("obstacle infront and on left , turning right");
     delay(600);
  } else if (digitalRead(irf) == HIGH && digitalRead(irl) == HIGH && digitalRead(irr) == HIGH) {
    digitalWrite(rightfront, LOW);
     digitalWrite(rightback,HIGH;
     digitalWrite(leftfront,LOW);
     digitalWrite(leftback,HIGH);
     Serial.println("obstacle in front & right & left, going back");
     delay(3500);
  }

  delay(100);
}

your suggestions are extremely valuble to me.
thnx