Fallout 4 Gatling laser

As i have been asking around about how to finish the electronics on my prop for a Fallout 4 cosplay, most people have pointed me in the direction of Arduino, so i´ll give it a try...

What I got… (Film Clip of the thing right now)
A gatling laser from fallout 4
I set up the engine and the battery. A Bosch drill motor and a 14,4v battery and a simple on/off switch
The battery will be the powersource for all of the electronics, som some sort of way to power the arduino parts with the 14,4 v battery will be needed.

What do I want?
Ingame film clip
One trigger.
When I pull the trigger the barrels should start spinning. Not at full speed at once, but increasing speed from 0 to max in a bit more than one second. I also want the top speed reduced from what it is now. Not sure how much so I would like the top speed and the time it takes to reach it to be adjustable.

When the top speed has been reached I want the led diodes in the front to start blinking. Alternating so that when the top is lit, the bottom one is not and the other way around. I would like the blinking to be in sync with the barrels spinning. I guess a reed switch can be used for this.

When the top speed has been reached and the blinking has started I also want the sound effect from the game to be played.

I also have a designated place for the ammo counter so a nice bonus would be if that could start counting down when the blinking starts, that would be a great bonus.

Another bonus would be if the speaker can be used for background music… And if the knob by the counter can be used as a twisting on/off switch for the whole thing.

Adding a sound effect for powering up when I switch it on would also be great and the possibility to add other sounds when I add functions. Reloading is one thing that comes to mind.

You can use analogWrite to control the motor speed. Make sure you use one of the PWM enabled pins. Note also that you'll need a mosfet to control the power from your battery - the Arduino won't be able to source it. Google arduino mosfet PWM for guidance.

Thank you!
I found this little tutorial and it seems to be what i need!

I should be able to program that in sequences with increasing voltage? Right?

And i should be able to activate it with this?

I presume that the easiest way is to start the alternating flashing LEDs when the motor has reached full speed, or after a set time from pushing the button?

The spinning will be to fast to see if the barrels are aligned with the muzzle when the LEDs are flashing, so that kind of precision is not needed, and that way i wouldn´t need any reed switches.

Is that i feasable thought?

And the sound and ammocounter could start at the same time as the LEDs in that case?

You won't actually know when the motor has reached full speed, unless you add something to measure the RPM, so you'll have to rely on timing to decide, which seems fine.

And if the LEDs are out of sync but that's imperceivable, that's fine too I would think.

Start of sound & ammo counter can be whenever you like of course, but starting with the LEDs sounds good.

So...
I´ve found the following...

A tutorial with BOM for the spinning barrels

A tutorial with BOM for a momentary button

A tutorial with BOM for the sound

A tutorial with BOM for 7-segment led displays

A tutorial with BOM blinking leds

Is there anything else i might need?
Stocking up for the weekend since i have some time to tinker then...

Hi,
With this link;

Just use the circuit example with the single MOSFET, as you only need one direction of the motor.
The L298 woud be hopeless as it drops too much voltage when running, in fact it should be classed oboslete.

By the way this circuit from that link has a fault.


Using an N-CH MOSFET they have connected the Drain and Source connections back to front.

This circuit has the correct arrangement.


Tom... :slight_smile:

So i´m on the way!
Got the thing working with this tutorial and a 9V battery and motor.
But when i use the same ting with my 14,4V battery and motor all I get is a buzzing from the motor...
Trying the battery and motor directly still works fine.

http://forum.hobbycomponents.com/viewtopic.php?f=76&t=1872

Hi,
The MOSFET they use is not a Logic Level MOSFET.
So you are not switching the MOSFET ON enough for the current and voltage combination of your 14.4V battery.

Model number: HCMODU0083
Weight: 10g
Size: 33.5 x 25.5mm
Max load (drain) current: <5A
Output load voltage :0-24V
Input Voltage: 3.3V, 5V

This is a common stuff up, as they quote 3.3v to 5V input, is not true.

If I was you I would complain that the module is not to spec and what they are going to do about it.

Tom... :slight_smile:

Thank you!
I actually got one of these laying about that i bought fpr an upgrade to a 3d printer before i tossed it out...

https://www.newfrog.com/product/mos-tube-high-current-load-heat-hot-bed-power-module-expansion-board-with-input-signal-connector-cable-for-3d-printer-176973?currency=SEK&gclid=Cj0KCQjwrLXXBRCXARIsAIttmROfVQPhYwVSoSbMRjBSQQPH5KUx8vVXFsOS1oIdoV6SvU0vCp52J58aAhXzEALw_wcB

Could that be put into use?
Routing the signal and ground through the avaialble pins?

Or is the polarity important?

Sorry for my stupid questions... And thank youfor your replies!

And to add to things...

Im trying to get it to work with a momentary button.

Using this tutorial

And changing the output to either the POT_PIN och MOTOR_PIN but i´m getting some strange results...

const int buttonPin = 2;
/* Include the library */
#include "HCMotor.h"

/* Set the pin that will control the motor. Note that it doesn't have to be a PWM pin -
any digital pin will do! */
#define MOTOR_PIN 7

/* Set the analogue pin the potentiometer will be connected to. */
#define POT_PIN A0

/* Create an instance of the library */
HCMotor HCMotor;

int buttonState = 0;

void setup()
{
/* Initialise the library */
HCMotor.Init();

/* Attach motor 0 to digital pin 7. The first parameter specifies the
motor number, the second is the motor type, and the third is the
digital pin that will control the motor */
HCMotor.attach(0, DCMOTOR, MOTOR_PIN);

/* Set the duty cycle of the PWM signal in 100uS increments.
Here 100 x 100uS = 1mS duty cycle. */
HCMotor.DutyCycle(0, 100);

pinMode(POT_PIN, OUTPUT);
// initialize the pushbutton pin as an input:
pinMode(buttonPin, INPUT);
}

void loop()
{
int Speed;

/* Read the analogue pin to determine the position of the pot. The map
function takes this value which could be anywhere between 0 - 1024
and reduces it down to match the duty cycle range of 0 - 100 */
Speed = map(analogRead(POT_PIN), 0, 1024, 0, 100);

/* Set the on time of the duty cycle to match the position of the pot. */
HCMotor.OnTime(0, Speed);

buttonState = digitalRead(buttonPin);

// check if the pushbutton is pressed. If it is, the buttonState is HIGH:
if (buttonState == HIGH) {
// turn LED on:
digitalWrite(POT_PIN, HIGH);
} else {
// turn LED off:
digitalWrite(POT_PIN, LOW);
}

}

Progress!
Apart from not being able to use the motor and battery i need to (but i expect to solve that with time) i continued with the smaller motor and added the button. I also added blinking leds.

So with the button both leds and the motor starts.

Next step is to delay the start of the leds for 1-2 seconds from when i press the button.
Any tips?

Hi,
I contacted the sellers of that MOSFET module, I got this back.

Hi,

Thanks for your comments....

why do you fit am IRF520 MOSFET to this module

This is actually a product we buy in from a different company to resell and so it isn't actually designed by ourselves. As such I can only speculate the reason why the manufacturer chose this particular MOSFET. It is likely a combination of suitability/low cost/availability but as previously mentioned this is just a guess.

and quote 3.3V to 5V input voltage when the IRF520 is not a LOGIC LEVEL device. Vgs(threshhold) = 2.0 to 4.0V, threshold is where it STARTS to make the MOSFET conduct not where it does conduct efficiently.

I do agree that there is no reason why this module could not be used as an analogue device, however as our main customer base is the digital microctroller market we advertise the module as a digital switch to allow microcrontrollers to switch relatively heavy loads such as DC motors. The reference to the 3.3V and 5V switching voltages is to make it clear to this customer base that the module can directly interface to, and be controlled by, both 3.3V and 5V microcontrollers.

I will make sure the specification is updated to make it clearer as to what this parameter is in reference to.

Regards

Andrew

The RED is me.
Can someone explain the underlined BLUE response.
I never refered to analog operation.
Is Andrew an Engineer, or a Sales Engineer? :o :o
Spleeling arrors not myne.

I have replied asking for an ELECTRONICS ENGINEER to read my emails.

Tom..... :slight_smile: