fish

DISCLAIMER

Here are the steps to make this project your own. Be funny within appropriate limits, guys and gals. I, the creator of this project, do not approve of any racist, sexist or otherwise defamatory, insulting or abusive content being used in the creation or execution of this project. I should hope you don't either. Please be nice, folks.

I hope things go swimmingly for you.

~~~ Bobby ~~~

GENESIS

And some bot-lord-dude said "Let there be some dumb fish robot"

...and there was.

To create this project, the first thing's first, and that's final. Wait...not final...you know what I mean. I mean let's get started.

You're probably aware that the fish-bot platform is Raspberry Pi-powered, but you'll need one of two specific variants to make this project work:

Raspberry Pi 3A+

Raspberry Pi Zero W

This project, and its 3D-printed parts, are NOT DESIGNED FOR THE PI B+ FORM FACTOR. This includes Pi 2, Pi 3, Pi 3B+ and Pi 4! Don't attempt to use them, things won't fit!

You'll also need an Adafruit Crickit HAT, which seats nicely on top of the Pi's GPIO pins.

Before getting too ahead of myself, let's list the full BOM:

BUNCH OF MATERIALS

That's what BOM stands for, right?
Anyway, we have a lot of stuff to collect. We'll need:



MAIN COMPONENTS

(1) Raspberry Pi 3A+ or (1) Raspberry Pi Zero W

(1) Adafruit Crickit HAT

(1) DRV8833 DC/Stepper Motor Driver - Low Power

(1) 5V Relay Module

(1) MG90D High-Torque Metal Gear Servo



OPTIONAL PARTS / FLASHY BITS

(1) 24x Neopixel Ring - RGBW



PRESERVED FISH PARTS

You need the original motor gearbox for the front motor (including motor itself, mouth flap and head assembly), and the epoxy eyes if you want to re-use the originals. You'll also want to harvest the speaker from the original wall plaque, or else purchase one of these.



SECURING THE PI TO THE MIDDLE SKELE-BONES

Go ahead and place the Raspberry Pi 3A+ into the plastic housing. You should be able to tell from the contour of the plastic piece which side of the Pi belongs where. Gently press the Pi down onto the four screw posts coming from the rear. Press gently until flush with the plastic backing. Secure (4) ##MM M->F standoffs on the protruding screw ends to hold the Pi against the plastic back piece.

Place the Crickit Hat so that the pins are matching the Pi's GPIO pins, and press down gently but firmly until the pins are firmly seated in the bottom of the Crickit Hat's underside ports.

SETTING UP THE SD CARD IMAGE

First, start with the latest version of Raspberry Pi OS. Choose the Lite version, for speed. If you're worried about not having a mouse-and-keyboard experience, choose the normal Raspberry Pi OS with Desktop variant. Avoid the 'with recommended software' variant, as this installs unnecessary packages. We can add these if we need to later.

Once you have the Pi image downloaded to your computer, it's time to burn or "etch" the image onto a MicroSD card. Download balenaEtcher, following any installation prompts that may occur. Open balenaEtcher once installed, and click 'Select Image' to locate the Raspberry Pi OS disk image file you previously downloaded.

Next, select the drive you wish to etch the image onto.

NOTE: ALL DATA ON THE MICROSD CARD YOU CHOOSE WILL BE DELETED!
Back up any files you wish to keep before etching onto your SD card.

Once completed, eject the MicroSD card, and plug it into the slot on the back of the Pi 3A+. Attach an HDMI cable connected to an HDMI-compatible display, a mouse and keyboard, and finally connect the power via the barrel jack.

OMG I HATE RASPI-CONFIG

On first boot, you'll log in with the username pi and password raspberry. Go ahead and change this as soon as you can; it's a security risk to leave it as-is. Type in:

sudo raspi-config

to get to the main Raspberry Pi Configuration menu. Once here, first choose option 1: System Options.

Choose 'Password', then a define a new password for the pi user when prompted. Once complete, re-enter the System Options menu and choose the first option: Wireless LAN.
This should allow you to type in your preferred home (or office) Wi-Fi network's SSID and password. At this point, go ahead anc yet again enter System Options, then choose 'Hostname', and name your Pi. This will make it easily accessible on your local network with a tool like Angry IP Scanner. Once you change your hostname, the Pi should prompt you for a restart. Go ahead, and when the Pi reboots, you should be able to log in with your new password.



Once re-logged in, go back, once again, into raspi-config.

Navigate to 'Interface Options', and enter the menu. Choose the second option, 'SSH', and confirm on the next screen that yes, you would like the SSH server to be enabled. This frees our fish from having to use a monitor!

Reboot if prompted after the preceding steps.

Back in the raspi-config menu (again), enter the 'Localisation Options' menu. Choose the first option, 'Locale'. Scroll down until you reach the entry labeled 'en_GB.UTF-8 UTF-8', and press SPACEBAR when it's highlighted. You should see a small asterisk disappear from next to that en_GB entry.

Now, select the locale that most closely matches your current location. Mine is 'en_US.UTF-8 UTF-8', so I'd scroll up to it. When you reach your correct locale and it's highlighted, once again press SPACEBAR to select it. Press TAB now to jump to the bottom of the page, and press the RIGHT ARROW KEY to select 'FINISH'.

You'll br prompted to reboot (agaaaaain). Do it.

Re-enter the raspi-config menu and finish the rest of the entries in the 'Localisation Options' section. You can skip 'WLAN Country', as we already covered this earlier.

SSH-ING IN, INSTALLING SOME BASE PACKAGES

Now that you should have your regional settings, keyboard layout settings and interfaces enabled, let's get started installing some prerequisites. Copy the following

Current Log

Experimenting with the 555 timer to see if I can make an artificial PWM signal from the "Envelope" output of the Sound Detector (or possibly the "Analog" output if it is a true amplitude measurement as well)