I-Racer Teardown

  1. Quick overview of the I-Racer HardwareI purchased I-Racer to start my RC car project, and it is a nice starter kit that supports Android apps to remotely control the car via Bluetooth.
















  2.  Hardware components
    These are the major parts list that I-Racer is probably using.
    Some parts were hard to guess by checking the marking on the chip.


    MCU: ATMEL ATMEGA48-10AU
    LDO: CYT6206

    Battery: ATL462849, 490mAh, 150mOhm, L 48mm x W 28.2mm x H 4.3mm
    Bluetooth Module: SKU80711

    I found a good website that is also investigating the I-Racer hardware.
    http://letsmakerobots.com/node/33140
  3.  Motor driver circuit
    After the circuit investigation, I created a clone of the motor driver circuit.
    I am not 100% sure this is exactly same as the one on the board though...
    Next step is to simulate this circuit using SPICE.

     

Hardware:
    I-Racer
    Fluke Multimeter


Reference:
http://letsmakerobots.com/node/33140
https://sites.google.com/site/augmentedrccarbattle/ 

Raspberry Pi: Streaming video and microphone with Android

  1. Android Application
    SimpleMjpegView was modified using Audiotrack.
    Source code is available here. (TBD)


    Best Raspberry PI Kit (Recommended!)



  2. Gstreamer SettingsTX (RPi)
    gst-launch -v v4l2src ! ffmpegcolorspace ! video/x-raw-yuv,width=320,height=240,framerate=\(fraction\)30/1 ! queue ! videorate ! video/x-raw-yuv,framerate=15/1 ! jpegenc quality=50 ! multipartmux ! tcpserversink host=x.x.x.x port=5000 sync=false alsasrc device=hw:1 ! audioconvert ! audioresample ! 'audio/x-raw-int,rate=8000,width=16,channels=1' ! udpsink host=x.x.x.x port=5001
      (Note: host IP address should be android IP address.)

                                                   


Hardware:
    Raspberry Pi
    PS3 Eye
    EW-7781Uh WiFi dongle
    Android phone (Droid X)

Summary:
    Android application was tested.
    Jpecenc and PCM was used for video and audio encoder, respectively.
    The audio latency was still not so great (~1 sec), but video was reasonable (< 1 sec). 
    RPi CPU usage was around 70%. (top command)  

Reference:
http://rxwen.blogspot.com/2011/10/stream-audio-via-udp-on-android.html
https://bitbucket.org/neuralassembly/simplemjpegview

Raspberry Pi: Webcam Video and Microphone Streaming Test

  1. Video and Microphone streaming over UDP and TCP
    TX (RPi)
    gst-launch -v v4l2src ! ffmpegcolorspace ! videoscale method=1 ! video/x-raw-yuv, width=320, height=240, framerate=15/1 ! jpegenc quality=10 ! udpsink host=x.x.x.x port=5000 alsasrc device=hw:1 ! queue ! audioconvert ! speexenc ! queue ! tcpserversink host=x.x.x.x port=5001
    RX (Ubuntu on Pandaboard ES)
    gst-launch udpsrc port=5000 ! jpegenc ! ffmpegcolorspace ! autovideosink gst-launch tcpclientsrc host=x.x.x.x port=5001 ! sppxdec ! volume volume=10 ! alsasink
    (Note1: do not know why, but autoaudiosink was unstable... Audio stopped working after a few seconds...)(Note2: TX host IP address should be receiver/Pandaboard IP address, and RX host IP address should be transmitter/RPi IP address.)

                                                   



Best Raspberry PI Kit (Recommended!)


Hardware:
    Raspberry Pi
    PS3 Eye
    EW-7781Uh WiFi dongle
    Ubuntu machine (Pandaboard ES)

Summary:
    Video and microphone streaming over UDP was tested usin PS3 eye camera.
    Jpecenc and Speexenc was used for video and audio encoder, respectively.
    The audio latency was not so great (~1 sec), but video was reasonable (< 1 sec). 
     RPi CPU usage was about 98% (top command)

Reference:

Raspberry Pi: Webcam Microphone Streaming Test

  1. Install ALSA
    sudo apt-get install gstreamer0.10-alsa
  2. Audio sound test using alsasrc
    gst-launch -v alsasrc device=hw:1 ! audioconvert ! volume volume=10 ! alsasink
  3. Microphone streaming over TCP
    TX (RPi)
    gst-launch alsasrc device=hw:1 ! queue ! audioconvert ! speexenc ! queue ! tcpserversink host=x.x.x.x port=5001
    RX (Ubuntu on Pandaboard ES)
    gst-launch tcpclientsrc host=x.x.x.x port=5001 ! sppxdec ! volume volume=10 ! autoaudiosink
    The latency was not good enough, around 1 sec.
    (Note: TX host IP should be receiver/Pandaboard IP address, and RX host IP address should be transmitter/Rpi IP address.)

    Best Raspberry PI Kit (Recommended!)

           

  4. Microphone streaming over UDP
    TX (RPi)
    gst-launch -v alsasrc device=hw:1 ! audioconvert ! audioresample ! 'audio/x-raw-int,rate=8000,width=16,channels=1' ! speexenc ! rtpspeexpay ! udpsink host=x.x.x.x port=5001
    RX (Ubuntu on Pandaboard ES)
    gst-launch udpsrc port=6666 caps="application/x-rtp, media=(string)audio, clock-rate=(int)16000, encoding-name=(string)SPEEX, encoding-params=(string)1, payload=(int)110" ! gstrtpjitterbuffer ! rtpspeexdepay ! speexdec ! audioconvert ! audioresample ! volume volume=10 ! autoaudiosink
    Still around 1 sec latency...(Note: host IP should be receiver/Pandaboard IP address)

Also read:

[Raspberry Pi] Using Bluetooth Audio Headphone


Hardware:
    Raspberry Pi
    PS3 Eye
    EW-7781Uh WiFi dongle
    Ubuntu machine (Pandaboard ES)

Summary:
    PS3 eye was used for microphone streaming over TCP/UDP.
    The latency was not so great (around 1 sec), and it needs to be investigated, especially using different encoder.  
     RPi CPU usage was about 51%  for TCP(top command)
     RPi CPU usage was about 29%  for UDP(top command)

Reference:

Web Cam streaming from Raspberry Pi to Android using streamer



I tried to stream video from webcam connected with Raspberry Pi to Android phone.


Hardware

webcam : PS3 Eye
Android Phone : Motorola RAZR XT912


Best Raspberry PI Kit (Recommended!)

       

Set up Raspberry Pi

Install gstreamer

Update your Raspbian before install gstreamer packages.
sudo apt-get upgrade
sudo apt-get update
Install gstreamer packages.
sudo apt-get install gstreamer-tools gstreamer0.10-plugins-bad gstreamer0.10-plugins-good v4l-utils

Create gstreamer start script

I like tcsh shell.
sudo apt-get install tcsh
Create the script gst-server.sh to start gstreamer streaming server. 
#!/bin/tcsh

set myip=192.168.0.103
set port=5000
set width=320
set height=240

gst-launch\
  v4l2src !\
  ffmpegcolorspace !\
  video/x-raw-yuv,width=${width},height=${height},framerate=\(fraction\)30/1 !\
  jpegenc !\
  tcpserversink host=${myip} port=${port} sync=false
 Add an executable permission to the script.
chmod u+x gst-server.sh

Connect a webcam

I used PS3 Eye as a webcam. You can use other webcams.

Start gstreamer

Run the script.
./gst-server.sh


                                                   


If you want to stream microphone as well, check this out.

Set up Android phone

I created an Android application simplemjpegview_gst based on SimpleMjpegStreamer. You can download the source codes.

You can download apk file here.
https://docs.google.com/file/d/0B1V8jj4Adbrpdzl4VGVjcW1GT28/edit?usp=sharing




Motion on Raspberry Pi

1. Install motion package
sudo apt-get install motion

2. Install ffmpeg package
sudo apt-get install ffmpeg

3. Edit motion.conf
sudo nano /etc/motion/motion.conf
   Modify the settings as below  
   - daemon off
   - webcam_localhost off
   - width 320
   - height 240

   - framerate 15

4. Launch motion
sudo motion
5. Browse the video stream (Firefox)
   Type http://x.x.x.x:8081 

Hardware:
   Raspberry PiPS3 Eye
   EW-77811Uh WiFi dongle

Summary...
   CPU usage(top) was around 85% when motion was detected.
   The latency was not good, about 1s delay. 
   Tuning the parameter might help but guessing gstreamer is better... 

Reference:
   http://www.raspberrypi.org/phpBB3/viewtopic.php?f=26&t=7397

[AKM Chip Booster] Audio ADC AK5704 PCB Design

Designing a PCB prototype with AK5704 is not so difficult and I show an example with my design. People who are not familiar with AK5704,...