From the Prototype to the Final Device

After successful testing of the prototype, I created the final device. The first problem was to find a suitable casing, which provides enough room for the battery pack, the controller, the speaker, LED and the sensor. It is a little bit tricky to imagine the dimension of the final device, without using a CAD software.

I used a casing from BOPLA, the “Element E 440“. One of the reasons was the detailed plans and 3D models of the casings and not the beauty or the design.

Build the Elements into the Casing Top

I started with the LED and sensor and placed them on small stripboards with the resistors. I added a flat cable ending in crimp connectors. After this step I tested the connections if the LED, sensor and cables are working.

Next I drilled the required holes in the casing and fixed the boards with the LED and sensor in the casing (see F. I also added the power switch and speaker. There was instant adhesive involved.

cp-final-4

Fasten the Controller to the Casing Bottom

I cut a circuit board to the right size to fit into the casing and drilled four holes in the corners to fasten the board with screws to the bottom. The expected location of the holes did not actually match the real location of the holes. But on screw is enough to fasten the board.

cp-final-1

The Arduino (see A) is sticked to the board using some self-adhesive circuit board holder. You can plug four of them into the fastening holes, remove the protection foil and stick the Arduino on the main board. To create all connections I soldered headers to a small strip board (see B). The two pin header is connected to the other two pin header, the three pin header to the other three pin header and so on. You connect the components by plugging in similar connectors to either side. This allows easy assembling and disassembling of the device.

In the area C I connected the battery connector with two two-pin header. One header is for the power switch, the other one is to power the Arduino and the amplifier. To fasten the battery pack, I added some cardboard for the right distance and hook and loop fastener pads (see D).

Soldering the Circuits to the Shield

The data logger shield has a small prototype area which I used to solder the chips and elements to it. The area is small, but has exactly the right size for all elements to fit. I started with the two chip sockets then added the capacitors and connected everything using the wires from these elements.

cp-final-2

At the end I added the flat cables which end in crimp connectors with housings (see E).

cp-final-3

Crimp Connectors

If you have a steady hand and patience, crimp connectors are a great way to quickly build connectors. I use a system from Molex with the crimps and different crimp housings for two, three, four etc. crimps. There are also headers with housings which perfectly fit these connectors.

The crimps look like this:

cp-crimp

Usually you would lay the cable end with removed isolation into the crimp and use some tool to press the wings of the crimp together to fasten the cable. These special tools are expensive and not necessary. You can use a regular flat pliers to do this, or even simpler, just solder the cable to the crimp.

If the cables are connected, you push the crimps into the housing. There is a hook, which clicks in place and fastens the crimp in the housing. There is actually no way to disassemble the connector after this.

Connect the Shield and Battery

Next I put the shield on the Arduino and plugged all the connectors in. I also put the rechargeable batteries into the battery pack and plugged in the battery connector.

cp-final-5

Now I can connect all the cables from the top to the right headers.

cp-final-6

The battery is fastened with the hook and loop fastener pads and put into the casing.

cp-final-7

Close the Casing

Everything connected I can close the casing. Here you can see the view which fits the images above.

cp-final-8

Here the front view with the speaker holes and the sensor.

cp-final-9

Done and Ready

The device is now ready to put into use. I can place it on protected areas like tables or shelves and enable it while I am out of the house. I just have to make sure the sensor area is covering just the protected area and not e.g. the floor. Sometimes it is necessary to put a cup or something in front of the device to reduce the sensor coverage.

If the cat jumps into a protected area, the device expresses its disapproval.

Advertisements

13 thoughts on “From the Prototype to the Final Device”

    1. Currently I can only verify that the device itself is working. Next, I will use a webcam to see the actual reaction of the cat. The cat is smart, she will probably just ignore it. 🙂

  1. Hi! I think you have an excellent project here! Congratulations!

    I found this project because I had the idea to do something similar and I wanted to check if someone already beat me to it.

    Well, you were close 🙂 very close.

    I live with 5 cats at home and, honestly, I don’t think the sound of my or my wife voice will scare them them away. Maybe the sound of barking dogs but that’s too stressful for them.

    However, there is another way to get them off the table! Cats are crazy about the sound of creasing cellophane or creasing aluminium foil. Whatever they do, if they hear that sound coming from some other location they will immediately leave the table and approach the source of that sound. Now, for this we would need to have the amp and the speaker dislocated from the sensor and establish some kind of wireless connection to trigger the sound.

    So, I would be interested to hear your thoughts on this?

    Anyways, thanks for the great project and it will be interesting to see how cats really react.

    1. This is a very interesting approach. Will you use a wireless connection?

      If I would build another similar device, I would use a more powerful microcontroller. Probably one with built-in D/A converter and with enough CPU time to access an SD card in a normal way. For example the Raspberry Pi Zero or one of the Adafruit Feather M0 platforms.

      1. Well, yes, there should be a wireless connection to trigger the sound from the remote location, maybe infrared or bluetooth, something else? I am still not sure which one is better to trigger the sound wirelessly. As a matter of fact I would be really interested to hear your thoughts/advice on this.

        Also, it seems from your reply that you are not very happy with the “responsiveness” of the system? Is that correct? Is it too slow to start playback after the trigger? If this is the case, maybe it would be better to start from scratch with some other platform?

      2. I have not much experience with wireless solutions on hardware level, but I would choose bluetooth LE for the connection. It should be possible to connect two bluetooth devices, one as master and one as slave. The “Adafruit Feather 32u4 Bluefruit LE” could be an interesting platform for both sides.

        No, the system is super responsive. At the end this microcontroller is a real time system and there is no delay between detection and sound output. It is more the unnecessary complexity of the sound output.

        With this project I am close at the limit what is possible using this microcontroller. And for a 22 kHz sound output I also have to prepare a SD card on block-level. This is very complex and this complexity is just necessary because the microcontroller is a little bit slow for the task.

        So if I would redo the project today, I would just use a “Adafruit Audio FX Sound Board” for the sound output. This would reduce the complexity of the sound output and provide the required amplifier.

        Or I would use a Raspberry Pi and add a simple amplifier, this would reduce the complexity of the sound output as well.

        In either case you just could prepare some “wav” or “ogg” files for the sound and do not have the cost of converting and preparing a special SD card.

        It was interesting to bring the microcontroller to a limit, reading data from the SD card and playing sound over an external D/A converter simultaneously. I can recommend it as a student project as a challenge, or if you try to build the device very cheap. In any other case, it is more fun to reduce the complexity using better hardware.

      3. Thank you Lucky. I appreciate your feedback and the advice a lot. I prefer to keep it cheap so I guess I will be looking at Arduino setup like yours with a Bluetooth connection to place the speaker away from the sensor.

      4. I would just recommend to invest at least into a little bit faster microcontroller with more RAM. This would simplify the project, because you can read a FAT file system from a SD card and have enough RAM to buffer enough samples to play the sound.

  2. Sorry. I forgot to put “was” 🙂 It was supposed to be “I was just looking into it.” 🙂 Can you edit my response please? This looks silly. Thanks.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: