Arduino vs Raspberry Pi Zero W

Thread Starter

Croduino4647

Joined Mar 3, 2021
8
Hello!
I just need advice for my school project. I have to make Smart Pet feeder (microcontroler Rasperry Pi Zero W) which has to be controled by website designed by me ( I go on website and click feed when I want to feed my pet). Project also has a camera which control pet and the condition of the feeder.Camera captured photo every 5 sec when I go on website and save it in album. I am begginer in all of this and I would be very thankful if You just tell me how demanding this project is, what are the kye steps for website designe and "connecting" it with RPi Zero. I have an option to work with Arduino Nano and Ethernet Shield. Do You think it's easier way?
Thank You!
 

dl324

Joined Mar 30, 2015
12,798
Welcome to AAC!

What is it about a Nano that's causing you to consider it?

I've used Uno's and Pi Zero W's. Personally, I'd go with a Pi Zero W unless I needed analog inputs.
I would be very thankful if You just tell me how demanding this project is, what are the kye steps for website designe and "connecting" it with RPi Zero.
What is the learning objective of this project?
 

Thread Starter

Croduino4647

Joined Mar 3, 2021
8
Welcome to AAC!

What is it about a Nano that's causing you to consider it?

I've used Uno's and Pi Zero W's. Personally, I'd go with a Pi Zero W unless I needed analog inputs.
What is the learning objective of this project?
Thank You for answering. I got this project for my final paper. (https://www.hackster.io/russo08/pet-feeder-with-3d-printed-parts-1f46f2) this is the link of the main project but the camera and website parts i have to do by myself. I am student of electrical engineering but the stufs like arduino and raspberry pi are new to me. the project goal is to learn something about electronic components and their application. Any advice is helpful.
 

BobTPH

Joined Jun 5, 2013
3,111
That is a pretty ambitious project for someone with no microcontroller experience.

Most people try to blink an LED as a first project.

Bob
 

djsfantasi

Joined Apr 11, 2010
7,633
That is a pretty ambitious project for someone with no microcontroller experience.

Most people try to blink an LED as a first project.

Bob
I have not used a Pi, but my understanding is it’s a little more complex than an Arduino environment.

I have Arduino experience. And programming skills. To me, it would be easy to accomplish with a Nano and Ethernet shield. I’d prefer an Uno, since it’s easier to interface with Arduino shields.

But the project needs networking experience as well. It requires a fixed IP address in a local or global space. Plus routing of specific ports.

Not a simple project by any means. Perhaps an advanced university project.
 

bobcroft

Joined Aug 22, 2011
8
One key issue is the programming language you favour for the Arduino or RasPi. The Arduino IDE essentially uses C, with the libraries in C++, the pi uses Python as its main language.
Personally I would use an Arduino UNO as it is easy to attach, say a WiFi shield, or any other shield. The project link you posted uses a Nano, so the UNO could use the same code, that will give you a good start. Interfacing to the LCD is easier with the Nano / / Uno because both use 5 volt on the IO pins, whereas the pi is 3.3 volts.
As others have said this is a challenging project for someone inexperienced with microcontrollers. I suggest you have a look at the Random Nerds Tutorials website / blog. They have some excellent tutorials on microcontrollers etc.
Dave Lowther beat me to the RNT link. I agree about using an ESP8266 or ESP32 if you can.
 

Phil-S

Joined Dec 4, 2015
195
I would agree with the others that this is a pretty ambitious project to be starting with.
Just getting an Arduino or Raspberry Pi board going can be challenging and I'm surprised that on the course you are on, you haven't had practical experience of either.

It's a big leap from copying the Blink example on Arduino to the stuff you want to do.

Personally, I would find the RP more of a challenge as it is a completely different beast to the Arduino. Years ago, I asked someone with a lot of experience if they had to choose one programming language to choose, they said Python. I didn't take that advice and concentrated on Arduino C++, but dabbled with the Pi as well.

There is a lot of support for both, probably more so with Arduino.

With any project like this, my approach would be to break it up into manageable modules and put them together at the end. Another tip would be to buy genuine items to start with and resist the the lure of cheap stuff on well-known websites
 

du00000001

Joined Nov 10, 2020
52
The camera feature alone would call for a Pi Zero W - image processing isn't the playground for AVR-based Arduinos due to their more than "limited" RAM available.
And most networking features come easy on the RPi, with little programming work left. (It's more like "configuring".) And RPi support easily rivals that of the Arduino support.
So this task might be solvable "next to bare metal" (the Arduino approach) or "fast and easy" (the RPi approach). I expect that you'll have more time available for website design and "fancy features" when doing it "the RPi way", while you might have to fight with the limitations of the AVR when trying the bare metal way.
Good luck with that!
 

Dave Lowther

Joined Sep 8, 2016
45

Yaakov

Joined Jan 27, 2019
2,927
There is a widely used vision library for Python called OpenCV. Combined with a PI 3 or 4 that has an on board camera connector and support for a standard camera would give a very big head start.

You probably need to find as much already baked for you if you are going to have a good outcome. Since hardware is cheap and libraries are available throw as much as you can at this project to limit the hard parts to your specific requirements and not the platform.
 

dl324

Joined Mar 30, 2015
12,798
the pi uses Python as its main language
Pi supports many languages. I've used C, Perl, and Csh more than Python (which I've only used for a couple scripts). Python is an interpreted language and will be slower than C.

Perl, and now Python, claim they "compile" into bytecode for more efficiency. I don't know about Python (I hate the syntax), but I did a test with Perl and C ~25 years ago. I wrote a Perl script to process a huge amount of textual data (what Perl was supposed to be good for). After running the script for days and not getting any results, I rewrote the script in C. After I got the results from the C program, I killed the Perl job.
 

Dave Lowther

Joined Sep 8, 2016
45
I can't help you with advice on camera connection to the ESP32 as I've never used a camera in a project. I'm just aware that the RNT link I gave you has tutorials on using ESP32-CAM. I think the difference beteeen ESP32 and ESP32-CAM is just that the -CAM version comes with the camera, but I may be wrong about that. I think if you read through the tutorials it will help you.
Best regards
Dave
 

davidl

Joined Jan 3, 2014
3
Lots of good recommendations presented but as a final year project (of any course, qualification etc) the first task should be a clear statement of requirements. We have a good list of 'features' that must be supported, and expanding them into technical specification will guide the choice of platform.

While hobbyists often consider the Arduino and Raspberry Pi boards essentially equivalent they are two very different things. The Arduino is a micro-controller that runs a compiled application. Raspberry Pi boards are a micro-computer that uses an operating system to run different applications concurrently. These applications can be written in any programming language supported by the chosen operating system.

For this project there is a need to monitor sensors, operate motors, take and process images, communicate with web servers etc. Each is a simple task for a controller, but taken together would seem to demand a more powerful micro-computer.

The programming environment, tools, libraries and languages can all be learnt - but unless the underlying hardware supports the technical requirements it is not a viable solution.

As others have said it is no coincidence that the Raspberry Pi has a camera connector and programming tools to use it.

Your lecturer/teacher/facilitator would know that all the components needed to build a viable solution are available - there are plenty of tutorials available for download. This is not the purpose of the assignment.

The knowledge and skills being assessed would include showing how the chosen components satisfy the identified technical and operational requirements. This is the work that you must do - we can't answer it for you.

But we can help with any and all questions that you have so please post what you done and where you have become 'stuck'.

Good luck with this exciting, real-world problem.

Dave
 

davidl

Joined Jan 3, 2014
3
Thank you for your reply. What is the difference between ESP32 and ESP32-CAM. Can a camera module be added to the ESP32.
Following the link that Dave Lowther gave you - only took me 2 mouse clicks to read:

The ESP32-CAM board is an affordable development board that combines an ESP32-S chip, an OV2640 camera, several GPIOs to connect peripherals and a microSD card slot. It allows you to set up a video streaming web server, build a surveillance camera, take photos, face recognition and detection, and much more.

The truth is out there .....
 

Seamus_One

Joined Feb 12, 2021
3
One key issue is the programming language you favour for the Arduino or RasPi. The Arduino IDE essentially uses C, with the libraries in C++, the pi uses Python as its main language.
That's not quite a true statement. Many RPi owners do use Python, but claiming Python as the "main" language is a bit misleading IMHO. It's like saying Python is the main language for Linux. I've got only limited experience with Arduino, but RPi seems to have many more options for programming languages than Arduino.
 

GetDeviceInfo

Joined Jun 7, 2009
1,844
I’ve used the ESP32-cam, it’s relatively easy to load and go. I wouldn’t consider anything else, with one exception, available IO count is low. Run it as an image server. OpenCV is an interesting library for image processing.
 

djsfantasi

Joined Apr 11, 2010
7,633
Likely not. The Arduino family code is compatible across all models. There are more resources available on the Uno, so you may want to consider code changes to take advantage of those addition resources.
 
Top