Jump to content
Electronics-Lab.com Community

DIY Wireless Car with Camera -- Ameba Arduino


Recommended Posts

We have shared several posts before about how to build a remote control car and how to implement live video streaming using an Arduino sized microcontroller Ameba RTL8195 from Realtek, this time we will try to put all these together and create a fun project -- a DIY RC surveillance patrol car. here is how it is done,

 

Preparation

  • Ameba x 1
  • L298N H-Bridge x 1
  • 4-wheel motorcar or 2-wheel motorcar+Universal wheel x 1
  • Android Phone x 1
  • Logitech C170 web cam x 1
  • Mirco USB OTG adapter x 1
  • 18650 Li-ion battery >= 2
  • 18650 batter holder x 1

Example

  • Power source

In previous examples, we use portable power bank as power source and use Ameba to supply power for L298N Bridge and the motor. However, in this example we connect a webcam additionally. To provide sufficient power, we use two 18650 batteries as power source. A typical 18650 battery is 3.7V. For safety concern, please keep the battery in cool temperature, and use stable voltage to charge the battery.
We connect the two batteries in series to provide 7.4V voltage. L298N Bridge accepts 7V to 12V power. We connect the batteries to L298N. There is a 5V power output on L298N, we can use it as the power supply for other components.

  • Wiring

The detailed wiring diagram:
1

  • Download AmebaMotors library and run the example

Please download AmebaMotors library version 1.0.3:
https://github.com/ambiot/amb1_arduino/raw/master/Arduino_libraries/AmebaMotors-1.0.3.zip
And install the library to Ameba:
https://www.arduino.cc/en/Guide/Libraries#toc4

Note that if you have installed AmebaMotors v1.0.1, please remove it before installing v1.0.3. Find the location of the library in "File" -> "Preferences", the "Sketchbook location" is where Arduino IDE stores sketches and libraries. For example, in the figure below, the Sketchbook location is "D:\workspace\arduino", then the AmebaMotors library is located in "D:\workspace\arduino\libraries\AmebaMotors". Please remove old version first, then install version 1.0.3.
2

Open the example in "File" -> "Examples" -> "AmebaMotors" -> "car2wd_mobile_plus_uvc",
then follow the steps:
1. Upload: Upload the sample code to Ameba
2. Wiring: Connect the components as the wiring diagram in previous section.
3. Download App: you can download and install it directly here: Car Remote 2.0
3

4. Connect android phone to Ameba: Go to "Settings" -> "Wi-Fi", find the SSID "mycar", enter password "12345678" and confirm that the android phone is connected to "mycar".

Below is the demo video of this example:

Code Reference

 

Link to post
Share on other sites
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
  • Create New...