Jump to content

N-Scale Camera Car


ejinguan

Recommended Posts

ejinguan

I recently built this N Scale camera car!

 

c8fed45b-e1de-4700-a6e1-0e08832f402c.thumb.jpg.06203d2892f0e4ab646e525e458de4f9.jpg

 

It consists of:

 

The camera function is provided by the Raspberry Pi, which is powered from the Li-Ion battery. It doesn't take track power to operate.

I think it would survive 15-30 mins of recording time. 😄

 

I've been running RPi Cam Web Interface https://elinux.org/RPi-Cam-Web-Interface which allows the Pi to show a live camera feed, start & stop recordings and download video files through a webpage.

 

If anyone is interested I may create a more detailed guide.

Edit: Guide here! https://jnsforum.com/community/topic/20521-n-scale-camera-car/?do=findComment&comment=256868

 

Edited by ejinguan
  • Like 7
Link to comment
cteno4

Very fun setup. What is the lens like? Can you set the focal distance?

 

I’ve used a number of little spy cams for recording and broadcast. Limiting factor is almost always the lens. Most small video cameras have pretty crappy lenses that are more akin to a pinhole lens and end up not being very good at close distances which is what you need for a train cam. The one exception is the train cam I bought years ago from a Japanese endoscope company that was also working on wifi capsule endoscopes (swallow the camera pill). Apparently a couple of their engineers were train guys and threw together a neat little camera, lens, transmitter, and battery system. It’s nice as it runs from track power but recharges a lipo for slower speeds or when stopped. Nice system but they only sold it for a year or two and it was not cheap.

 

please post some videos of your results! 
 

cheers,
 

jeff

Link to comment

@ejinguan I think it would be very beneficial to create a detailed guide for building your camera car. It's interesting how I was just thinking about building a camera car but didn't find many guides at all. 

Link to comment
ejinguan
Posted (edited)

Thanks for the interest! I'll find some time soon to do a step-by-step write-up 😄

 

The width is limited by the size of the raspberry pi computer, which is 3cm in the middle of the car. May result in clearance issues with platforms and tight N scale tunnels.

 

I've had to break apart my tunnel portals and widen them to allow this car to fit through.

 

But at least it's something you can buy and build yourself.

Edited by ejinguan
  • Like 1
Link to comment
ejinguan
6 hours ago, cteno4 said:

Very fun setup. What is the lens like? Can you set the focal distance?

 

This is a screenshot of the video (I'm recording at 1080p). Will upload a video sample later on!

 

I'm using the Raspberry Pi Camera V1.3 (5MP) which seems to be similar to older smartphone cameras (2013 era). I guess the beauty of the Pi platform, if you want you can actually get the higher spec Pi Camera 3!

 

Screenshot_20240702_082448_Gallery.jpg

  • Like 5
Link to comment
ejinguan
Posted (edited)

So here's the guide:

 

Guide to building a N Scale Camera Car

 

Contents

 

0. Parts

1. Chassis

2. Installing the Raspberry Pi and Camera

3. Charge the Battery HAT

4. Assemble it all

 

0. Parts

Parts needed for the physical build

  • 3D Printed chassis and camera holder (TinkerCAD Link)
  • Pair of bogies – I used Kato 11-099 bogies

Parts needed for the electrical build

  • (~$20) Raspberry Pi Zero 2 W – get the one with headers pre soldered
    • Pi Zero W may work as well, but is not as powerful on compute.
    • Make sure the board you get has wifi, if not there’s no other way to communicate with it.
  • (~$20) Li-Ion Battery HAT (https://www.waveshare.com/wiki/Li-ion_Battery_HAT)
  • (~$5) 14500 Li-Ion Battery (I bought mine here)
  • (~$10-30) Raspberry Pi Camera (with cable for Pi Zero)
  • Micro SD Card for the Pi Operating System (will recommend 32GB or bigger but I think 8 GB will work too)
  • ($5) M2.5 standoffs to secure the electrical components to the chassis.
    • I used M2.5*11+5 and M2.5*3+4 standoffs, screws and nuts
  • Micro USB cable for running the Pi without battery, USB C cable for charging.

 

1. Chassis

You can probably get around with using an old flatcar or something, but I wanted something secure, so I designed my own chassis around the Pi Zero 2 W.

01Chassis.thumb.png.7451d09ff234895a253a728edf52aa02.png

Pic 1 – General arrangement of chassis components

 

The chassis was modified from lukewang01’s B-Train Shorty Chassis.

I extended the length to have a central area of 7.5cm length and 3cm width, and having holes to thread the standoffs through. The 2 areas “sunken in” on either side are for the pins on the back-side of the Pi to sit.

The couplers from the Kato bogies extend far enough beyond the chassis.

 

1.1 Clearances

This design was not made with platforms, or N-scale loading gauge in mind.

Of course it would have exceeded the loading gauge. Oh well.

 

02LoadingGauge.thumb.png.02fb1956106204a294caa04ec61afa41.png

Pic 2 – Loading gauge exceeding 27mm x 37mm
Loading gauge picture from https://german160.wordpress.com/2012/05/01/nem-standards-for-n-scale-modeller/

 

1.2 Camera frame

For the camera, I measured the camera I had on hand and built a rough frame to secure it. A centre cutout is used to allow the camera to see out in front.

If you use other cameras, make sure to measure the camera position and adjust the cutout to fit.

 

1.3 3D Printing

I do not have a 3D printer so I used a 3D printing service (~$6 for everything).

After getting the parts back from my 3D printing service, I sanded everything and used Tamiya Plastic Cement to “glue” the camera frame to the chassis.

On hindsight this could have been one 3D print instead of 2 pieces.

 

Be sure to attach the camera frame the right way – the camera cutout needs to face outwards.

 

 

2. Installing the Raspberry Pi and camera

 

This design is actually just a Pi Zero camera (with wheels) and there are lots of guides that are better than what I could write.

I will point to a bunch of guides I followed and used.

 

Overall – this has a good overview of several guides that I actually used. https://www.reddit.com/r/RASPBERRY_PI_PROJECTS/comments/18tybiw/pi_zero_surveillance_camera_a_beginners_guide/

 

Install the OS to the Micro SD card, set up wifi and connect to it through VNC. https://www.tomshardware.com/reviews/raspberry-pi-headless-setup-how-to,6028.html

I used VNC to turn on legacy camera in the raspi-config menu.

 

Set up the camera connections - https://projects.raspberrypi.org/en/projects/getting-started-with-picamera/2. I powered off everything before connecting - just in case.

Tested photo and video inside VNC using raspistill and raspivid.

 

Install RPi-Cam-Web-Interface - https://elinux.org/RPi-Cam-Web-Interface. This gives you a web interface to preview, start/stop recording, download video files and shutdown the whole system.

 

At this point you should have a functioning Pi Zero camera – get familiar with it first.

 

 

3. Charge the Battery HAT

 

With the HAT not yet attached to the Pi, insert the battery. Take note to insert the battery in the correct direction.

 

I used a USB C cable to charge the battery fully.

 

Now if you attach the battery HAT to the Pi, you can turn on the Pi by using the on/off switch on the battery HAT.

I would use VNC / RPi Cam Web Interface to shutdown the Pi safely before turning off the on/off switch.

 

 

4. Assemble it all

 

The 11mm standoffs should go between the Pi and HAT.

The 3mm standoffs should go between the Pi and chassis.

 

For direction, I chose to have the screws below the chassis with all the screw and standoff threads pointing up.

 

I found it easier to thread the two standoffs to each other across the Pi, then attach the HAT then nut on top. Lastly attach the screw under the chassis.

 

03Assembly.png.c321ac9e5ef5d9409de0259ccd19c4ba.png

Pic 3 – From Top-to-Bottom – nut / 11mm standoff / 3mm standoff / screw

 

 

5. Complete!

 

Attach a powered car to push this cool camera car 😎 / monster 🤪 around your layout.

 

Potential improvements:

  • Adjust the height of the 3cm wide chassis to allow for passing by platforms - need to sacrifice even more vertical clearance.
  • Secure the ribbon cable so it's not so unwieldy
  • Add support to ensure the camera board is always in a vertical position (not slanted)
  • Lower camera position

 

04CameraCar.thumb.jpg.db8bd511d7ade65946efc72439093e71.jpg

 

Edited by ejinguan
  • Like 7
Link to comment

Looking forward to working on this project thanks for the guide 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...