Space Blaster MP - Hardware planning / brainstorm - Page 1
Forum section: electronics / projects

author: Youkai
author_rank: Regular Contributor
timestamp: March 06, 2023, 03:49:39 am
content: I'm working on a project where I'm making a cosplay prop based on the blaster weapon from Metroid Prime. I have the model printed and assembled and some tests with the servos confirm the pieces will move as expected. Now it's time to start planning the hardware / schematic. I realize I'm probably putting the cart before the horse on this one. Hopefully doing what I want to is possible in the space I'll have.Features that the project will have:Moving piecesLight up partsSound effectsWirelessButtons to control it.Moving PiecesTo handle the moving pieces I'll be using (5) HS-55 servos and (1) HS-311 servo. I have tested these and know they will meet the needs of the project.Light Up PartsI have a meter of60/m dotstar stripthat I was planning on using. Not exactly sure how much strip I'll need but probably somewhere between 0.5 and 1 meter. I'll be cutting it into sections and joining them with wires to put segments where I need them but the plan is to wire all the sections in one long chain with power injection wherever needed. Any 60/m RGB strip would work though.Sound EffectsNot sure here. I've played with a DF Player Mini before. Could use that. If the micro-controller/whatever has built in sound capabilities that would be great. Any small speaker will work. I'm thinking in the neighborhood of 20mm but I'm happy to use whatever so long as it fits. I want people within 10 feet of the thing to be able to hear the sounds but it doesn't need to be obnoxious. If it gets drown out and becomes inaudible in a crowded/noisy room I won't cry about it. If I have the ability to put some kind of volume slider/dial to control the volume then it could get much louder if the speaker would support that.WirelessI just mean that it needs to run on a battery pack. I'm hoping I'll be able to find something strong enough to run the setup for an hour minimum ideally.ButtonsThe inside of this thing is a 100mm diameter tube that you stick your arm in. Inside of that I need to put a handle bar and cram a number of buttons onto it. Not sure exactly how many. Will probably depend on pin availability and space considerations. Ideally there would be 7 buttons on the handle, plus one on the base to sense when it's picked up.Micro Controller(s)I have no idea what to use here. I imagine I'm going to need to string together a couple things depending on the pin count/capabilities of the MC. I think I have a SparkFun Pro Micro somewhere so that's an option though it doesn't have very many pins. I could use aPWM driverof one kind or another to possibly save pins from the servos/take some load off the MC. I think most Arduino things don't have native audio support so something like a DF Player Mini will likely be needed as well.Space ConstraintsAll of this needs to fit inside of a 40mm X 100mm X 330mm box. The LED's won't be inside the box because they will be scattered elsewhere, as well as the buttons. But all of the following needs to fit in there: battery pack, any micro controllers, speaker.Any suggestions or advice are much appreciated. Any of the components I've named I'd prefer to use because I already have them. But if swapping them out for a similar item would be better for the sake of the project I'm happy to use whatever is best.I'm not concerned with the actual schematic here. I know there will need to be a number of wires, resistors, diode's, etc. We need to make sure that there is likely to be enough space to hold that too but for the purposes of this thread that is not something I'm considering. I'll start another thread as I work on the schematic once I know what hardware I'm going to be using.Currently the parts I'm most ignorant about are the Micro Controller(s) to use and what I'm going to power this with.

author: CountChocula
author_rank: Unknown
timestamp: March 06, 2023, 02:08:42 pm
content: Sounds like a really cool project!I would start by writing down the power requirements of each component of your project, and then “adding them all up” into a budget around which you can design your power supply.For example, you will need a power rail for each voltage needed by the devices you use; if your MCU needs 5V and your servos run on 12V, you will need a way to create both, which will typically mean a combination of batteries and regulators. Likewise, you will need to figure out the current consumption of each module, add them up accounting for conversion losses, multiplying them by the amount of time you want to be able to run the device, and then adding a safety margin to make sure the thing doesn't quit on you mid-show.Given that this is going to be worn by a person, you should also consider the safety aspect, particularly if it takes a while to take the prop off: If you don't provide a safe current limit and you end up experiencing some kind of thermal runaway (for example, a wire getting hot or catching on fire), you might damage some of your components or, worse, end up injuring yourself.Similar idea for a choice of CPU; your limiting factors are probably going to be (a) number of GPIOs required, (b) speed, (c) system resources like RAM and storage. Your best bet is to write down all those requirements, and then find a device that satisfied them (and that, ideally, you know how to program).I realize this is super generic, but if you start putting together some concrete numbers, I'm sure the folks here will be happy to help you sanity check them and validate your thinking—it's always easier to when you have actual data to work withIf I can offer a couple additional suggestions:Make your design as modular as possible. If your MCU and the rest of the system have a clearly-defined interface, for example, you can easily swap the processor out for a better/different one if you need to, without having to rewire half your circuit.Limit the number of unknown variables as much as possible… it looks like this project is going to have a lot of moving parts (both literally and figuratively!); if I were in your shoes, I would try to use as many familiar tools and techniques as possible to get something going quickly, and then iterate to optimize everything. For example, other than a quick check to make sure that you're not going to need a small power plant to run the prop, it might not be the worst idea to not worry about power and just use an external supply until you have everything else working; it'll mean one less problem to think about until later.—CC

author: Youkai
author_rank: Regular Contributor
timestamp: March 06, 2023, 06:02:44 pm
content: Thanks CountChocula. In response to a couple of your comments. I think at this point everything is 5v. The two types of servo's I'm using operate at 5v and the LED strip also runs on 5v. I don't think there will be anything that runs over 5v so I'll probably need a buck converter from the battery to get down to 5v.As far as the safety goes, you "put it on" by sticking your arm inside and holding onto the handle. You could drop it instantly by letting go of the handle and pointing your arm down. There will be a power switch to turn it on. I'll make sure that's in a position that can be easily accessed while it's equipped so you can kill whatever if something goes haywire.The biggest thing I don't have good information about right now is the microcontroller. depending on what is used there I may have to add a couple extra secondary modules (sound board, pwm board). So I'm hoping to get some guidance there. Once I have an idea of what might work then I can start putting together the power requirements.

author: CountChocula
author_rank: Unknown
timestamp: March 06, 2023, 07:40:51 pm
content: Cool—for the processor it sounds like you need:2 pins for your LED strip1 PWM-capable pin for each servo (6 total)either 2-3 analogue or 7 digital inputs for the buttons (seeherefor a way to use an analogue input to drive multiple buttons)2 pins with support for I2C to inteface to the sound board, if you use oneIf I'm counting correctly, that's a total of 4 digital I/O pins, 6 PWM pins, and let's call it 3 analogue pins for the buttons. I think this is more or less within the capabilities of a bunch of different MPUs… If you're of the Arduino persuasion, something like aPro Miniwould do the trick nicely, is tiny, and has plenty of power for this type of application. There is no direct sound support, but if you're already familiar with the DF Player Mini and that fulfills your needs, pairing that with the Arduino board seems like a great idea (the only downside I can think of is whether the DF Player will respond fast enough to your commands to play sound effects, but that's something that you can just experiment with, I suppose). The DF Player can drive a 3W speaker directly, or you could add an external amplifier and a larger speaker for a little more oomph.