Build an ESP32CAM R...
 
Notifications
Clear all

Build an ESP32CAM Robot Car  

Page 3 / 3

Troles
(@troles)
Active Member
Joined: 7 months ago
Posts: 11
 

john B,   Thank you....It seems to work (at least it compiles) when I do it with your suggestion from the link in the blue resources box.  Thanks!!!!   Not sure why my copy paste would cause that error, but I think I will just move on to the building of it and worry about the many more future errors I will surely run into.  Thank you, I am so appreciative of the help everyone gives on this forum.


ReplyQuote
John_B
(@john_b)
Active Member
Joined: 4 months ago
Posts: 11
 

@troles, It's too easy to miss a bit when you copy and paste! Or add something by mistake!

I'm currently carefully adapting the code to use a different motor driver, and because I'm converting a cheap RC car (see my previous post with the pictures), that uses one motor for drive, and another  for steering, so there will be much bad language flying about here soon 😀. But it's a good way to learn, as this is the first time I've used an ESP32!


ReplyQuote
straygrey
(@straygrey)
New Member
Joined: 3 months ago
Posts: 1
 

I have just implemented this project om a DF Robot Devastator using a L298N motor controller, here in sunny South Africa.


ReplyQuote
jBo
 jBo
(@jbo)
Eminent Member
Joined: 8 months ago
Posts: 49
 

Fantastic article and video! I am encouraged to get started again. I'm even reviewing the video on buck, boost and other power supplies, just because I need the education. Congratulations! 😀 

In theory, theory and practice are the same.
In practice, they're different.


ReplyQuote
jBo
 jBo
(@jbo)
Eminent Member
Joined: 8 months ago
Posts: 49
 

OK, now for the nitty-gritty. My question is - oh, I have so many questions - but to start:

I've never purchased any 18650 cells before, only the AA, AAA, D, etc.

I went to batterystore and the nice tech said yeah, this would be OK for robot car, with the caveat:

Hello John - the only thing to be aware of is the 32E has a very low discharge rating of 6.4A, meaning the maximum continuous current the battery can hold is only 6.4 amps, relative to most other 18650's this is extremely low so just be sure of the demands of the battery from your device.
 
So, what is the current draw of this project? Is it less than 6 amps?
 
 

In theory, theory and practice are the same.
In practice, they're different.


ReplyQuote
jBo
 jBo
(@jbo)
Eminent Member
Joined: 8 months ago
Posts: 49
 

(Always willing to do the research, I read all the notes on this particular topic).

Then still trying to answer my own question, I tried to reason it out by comparing with other little experiments for Arduino, Pi Zero, etc. I came to the conclusion that these batteries were good enough to at least give them a shot. If not for this project, then for some other.

Next, I'll put something together, then get out my multi-meter and try to remember how to measure current in operation.

In theory, theory and practice are the same.
In practice, they're different.


ReplyQuote
John_B
(@john_b)
Active Member
Joined: 4 months ago
Posts: 11
 
Posted by: @jbo
 
So, what is the current draw of this project? Is it less than 6 amps?

It shouldn't be more than a few hundred milliamps, if you're using small motors like the ones Bill used, 130s, or N20 gear motors. I think the Wi-Fi is quite power hungry, but only relative to the small currents drawn by microcontrollers. I'll be using two 14500s, which are the AA sized equivalents of the 18650. I think the Chinese makers can be rather creative with quoting capacities of their batteries, so  you may not get anywhere near the advertised capacity, but I think it should be plenty. I'm just hoping that my smaller ones will last a reasonable time.

Hopefully I'll be able to test this for real soon. I'm waiting for the last component I need to clear customs before I get back to building mine.


ReplyQuote
jBo
 jBo
(@jbo)
Eminent Member
Joined: 8 months ago
Posts: 49
 

@john_b

 

Thanks for that info. I will proceed as planned, and yes, I do intend to use more or less the same motors as Bill's example. I'm using the little car kit, and following the rest as closely as I can. I know some had already finished a robot within a week of the video coming out, but I'm much more a beginner. 😎 

Also, I take your point on exuberant vendor claims. I watched a test series of 20+ 18650 batteries, and the Chinese ones had the worst actual-to-claimed performance ratio. The Japanese were good, and the Korean ones were good, and more cost effective. I couldn't find LG, so I picked Samsung.

Anyway, waiting for shipping, including customs; yes, I'm there too 🙂  I don't mind; I like ordering small boards, components from Aliexpress, though not batteries. The key thing for me is, if I can actually understand what it is I'm buying, based on the web page, then I buy it. Otherwise, order from Amazon, Adafruit or others.

 

In theory, theory and practice are the same.
In practice, they're different.


John_B liked
ReplyQuote
jBo
 jBo
(@jbo)
Eminent Member
Joined: 8 months ago
Posts: 49
 

Hey all,

No questions this time, just general comments. I sourced all the components best I could, so now I wait for shipping and customs. In the meantime, I decided to redo the ESP32-CAM experiment because I needed the reminder. Well that I did: I had rebuilt my machine, a Pi 4, in the meantime, so I needed to reinstall Arduino IDE anyway.

I picked CAMERA_MODEL_AI_THINKER  

as the article suggested, since it is supposed to be the most common. Entered my ssid and WiFi password. Compiled the code. Yes, on a Pi 4 it did take a long time. This is longer than most Arduino sketches. 

I also agree with what Bill said regarding voltages. I programmed it in 3.3 volts, then just tried running the code (sketch is CameraWebServer). It gave a message: Brownout detector was triggered.

So I switched the FTDI jumper to 5 volts, and moved the power connection to 5 volts on the ESP32-CAM board. Now it works. I assume this will be the same for programming and executing the robot sketch as well. With the serial monitor, I found the IP address. Running nmap on my network, that IP reported a MAC along with the label, LG Electronics. Good to know.

A further observation about just running the camera. It worked fitfully, at first. It would grab a frame, or I could press the 'Get Still' button and usually get a still of a frame. The serial monitor was similarly sluggish. I played around with resolution settings, and no luck. Even at tiniest sizes, it wasn't transmitting very much. I restarted a couple of times, and it works much better now. I picked QVGA (320 x 240) as a size that would give me at least 10 frames per second, but still allow reading text if I held it in front of the camera. This may be important in robot navigation.

As to why, I blame it all on WiFi. I intend to install the antenna on the actual bots. Right now, I'm working in the same room as the WiFi router, but I assume we'd all like to drive the things all over the house. So, I have to learn how to desolder, and put on the antenna. Upwards and onwards.

In theory, theory and practice are the same.
In practice, they're different.


ReplyQuote
fisyon
(@fisyon)
New Member
Joined: 2 months ago
Posts: 2
 

hello,

i made it with some difficulties.

* my board is placed horizontally then i found and change the 'rotating' part of the code, done.

* the led was too dim. i changed the pwm variable to a constant value (255):

 else if (!strcmp(variable, "flash"))
{
ledcWrite(7, 255);
}

 the led is now much more brighter but somewhat flicker. maybe the issue is the power supply (L298n's onboard 5v). anyway i can live with this.

* the last problem is the motors are not moving even a little bit with.

i suspected pwm signal for the motor driver is not high enough. i changed the variable to a constant as i did with the led trick above. i tried 127 and 200 as the value:

 else if (!strcmp(variable, "speed"))
{
if (val > 255) val = 255;
else if (val < 0) val = 0;
speed = val;
ledcWrite(8, 200);
}

but this method is not worked. i had to use L298n without pwm by using onboard jumpers. the robot is working fine with no speed control. of course it is moving a bit jerky and harder to control.

i am not sure if the problem is using different motor driver or browser. i tried on xubuntu/firefox and android/chrome. both are working ok without pwm input/output.

anyone had similar problem?

 

 


ReplyQuote
jBo
 jBo
(@jbo)
Eminent Member
Joined: 8 months ago
Posts: 49
 

Howdy,

Regarding the Robot Car with ESP32CAM, I'm still working on this, what with other interruptions, plus the time to order new parts I keep discovering I need. 🙄 

Anyway, my Main Board is in decent shape. I was looking at this photo from the article, trying to understand how to mount the adjustable buck converter onto the Main Board. I found some based on the LM2596 regulator, and identical or very close to what Bill described.

My question: Is it just screwed directly on? Or soldered by the corners? Or are there little short stubby standoffs at the corners?

Thanks for any answers/advice. This has been a great project for me; I think it will be just within my reach.

This post was modified 2 months ago by jBo

In theory, theory and practice are the same.
In practice, they're different.


ReplyQuote
Page 3 / 3