Welcome
Username or Email:

Password:


Missing Code




[ ]
[ ]
Online
  • Guests: 26
  • Members: 0
  • Newest Member: omjtest
  • Most ever online: 396
    Guests: 396, Members: 0 on 12 Jan : 12:51
Members Birthdays:
One birthday today, congrats!
Colin 99 (53)


Next birthdays
05/14 hvguy (41)
05/14 thehappyelectron (14)
05/14 Justin (2024)
Contact
If you need assistance, please send an email to forum at 4hv dot org. To ensure your email is not marked as spam, please include the phrase "4hv help" in the subject line. You can also find assistance via IRC, at irc.shadowworld.net, room #hvcomm.
Support 4hv.org!
Donate:
4hv.org is hosted on a dedicated server. Unfortunately, this server costs and we rely on the help of site members to keep 4hv.org running. Please consider donating. We will place your name on the thanks list and you'll be helping to keep 4hv.org alive and free for everyone. Members whose names appear in red bold have donated recently. Green bold denotes those who have recently donated to keep the server carbon neutral.


Special Thanks To:
  • Aaron Holmes
  • Aaron Wheeler
  • Adam Horden
  • Alan Scrimgeour
  • Andre
  • Andrew Haynes
  • Anonymous000
  • asabase
  • Austin Weil
  • barney
  • Barry
  • Bert Hickman
  • Bill Kukowski
  • Blitzorn
  • Brandon Paradelas
  • Bruce Bowling
  • BubeeMike
  • Byong Park
  • Cesiumsponge
  • Chris F.
  • Chris Hooper
  • Corey Worthington
  • Derek Woodroffe
  • Dalus
  • Dan Strother
  • Daniel Davis
  • Daniel Uhrenholt
  • datasheetarchive
  • Dave Billington
  • Dave Marshall
  • David F.
  • Dennis Rogers
  • drelectrix
  • Dr. John Gudenas
  • Dr. Spark
  • E.TexasTesla
  • eastvoltresearch
  • Eirik Taylor
  • Erik Dyakov
  • Erlend^SE
  • Finn Hammer
  • Firebug24k
  • GalliumMan
  • Gary Peterson
  • George Slade
  • GhostNull
  • Gordon Mcknight
  • Graham Armitage
  • Grant
  • GreySoul
  • Henry H
  • IamSmooth
  • In memory of Leo Powning
  • Jacob Cash
  • James Howells
  • James Pawson
  • Jeff Greenfield
  • Jeff Thomas
  • Jesse Frost
  • Jim Mitchell
  • jlr134
  • Joe Mastroianni
  • John Forcina
  • John Oberg
  • John Willcutt
  • Jon Newcomb
  • klugesmith
  • Leslie Wright
  • Lutz Hoffman
  • Mads Barnkob
  • Martin King
  • Mats Karlsson
  • Matt Gibson
  • Matthew Guidry
  • mbd
  • Michael D'Angelo
  • Mikkel
  • mileswaldron
  • mister_rf
  • Neil Foster
  • Nick de Smith
  • Nick Soroka
  • nicklenorp
  • Nik
  • Norman Stanley
  • Patrick Coleman
  • Paul Brodie
  • Paul Jordan
  • Paul Montgomery
  • Ped
  • Peter Krogen
  • Peter Terren
  • PhilGood
  • Richard Feldman
  • Robert Bush
  • Royce Bailey
  • Scott Fusare
  • Scott Newman
  • smiffy
  • Stella
  • Steven Busic
  • Steve Conner
  • Steve Jones
  • Steve Ward
  • Sulaiman
  • Thomas Coyle
  • Thomas A. Wallace
  • Thomas W
  • Timo
  • Torch
  • Ulf Jonsson
  • vasil
  • Vaxian
  • vladi mazzilli
  • wastehl
  • Weston
  • William Kim
  • William N.
  • William Stehl
  • Wesley Venis
The aforementioned have contributed financially to the continuing triumph of 4hv.org. They are deserving of my most heartfelt thanks.
Forums
4hv.org :: Forums :: Electromagnetic Projectile Accelerators
« Previous topic | Next topic »   

Microprocessor control with an Arduino

1 2 
Move Thread LAN_403
Maj
Wed Jan 02 2013, 02:01PM Print
Maj Registered Member #9128 Joined: Sat Dec 29 2012, 02:23PM
Location: Sydney, Australia
Posts: 7
Hello all. It's my first post at 4HV so hopefully I can make it interesting.
I've started building a CG after much reading on the topic. Starting simple with a single stage, SCR triggered, 2.5 gram projectile, <20 Joules.
However, I'm using an Arduino to handle a bunch of the timing related aspects and wondered if others have had any success or otherwise with microprocessor control?

Here's what the Arduino does for me:
- Provides the pulsed square wave to the transistor/charging coil to charge the cap. Replaces the 555 in circuits like Uzzor's charger and allows me to fine tune the duty cycle.
- Measures the cap voltage and stops the charge at preset voltage. Replaces the Op Amp in circuits like Uzzors charger.
- Triggers the SCR.
- Measures the duration of the coil pulse.
- Measures the velocity of the projectile using a sensing coil at the end of the barrel. No need for external measuring devices.
- Calculates efficiency of the shot
- Displays all this stuff on a laptop for testing purposes

Here's what it could also be doing that I haven't implemented yet:
- Provide low-voltage notification for my LiPo battery and potentially shut down the CG
- Measure charge coil voltage and shape the pulse duration and duty cycle automatically to suit any combination of charging coil and cap.
- Turn an IGBT on and off
- Read optical sensors and fire subsequent stages
- I'm sure there's plenty more

I'm using only a few external components - mainly just resistors as voltage dividers for the analog inputs. It has really simplified my build from an electronic perspective and given me a great level of control.
Back to top
PSCG
Wed Jan 02 2013, 02:41PM
PSCG Registered Member #3792 Joined: Sun Mar 27 2011, 06:07PM
Location:
Posts: 136
First of all, welcome to the forums!

Now, for your question: There are some micro controller - operated coilguns. Some links are presented below:

Another Coilgun have used micros to control a coilgun's operation (under the "Charging" link).

A low voltage coilgun triggered by an Arduino is (poorly) documented here.

Future Experimental Systems (PA - IV and APA - I but only the first one is completed).

And a quick search at 4HV:

Microcontroller design for coilgun brains.

microcontroller for a coilgun

Coilgun 5 stage machinepistol

Arduino as a Coilgun controller?

As it seems, you have implemented a lot of goodies on your coilgun project. Good job!
Back to top
Barry
Wed Jan 02 2013, 04:56PM
Barry Registered Member #90 Joined: Thu Feb 09 2006, 02:44PM
Location: Seattle, Washington
Posts: 301
Welcome to 4hv and happy new year!

I just got a small box of Arduino parts and shields last week and would love to see some work on applying them to coilguns, especially the part about reading optical sensors, triggering stages and measuring velocity. It sounds perfect for the job.

Cheers, Barry
If I had a dollar for every time I got distracted, I wish I had some ice cream.
Back to top
Maxwell
Wed Jan 02 2013, 06:12PM
Maxwell Registered Member #8497 Joined: Tue Dec 04 2012, 06:24PM
Location:
Posts: 74
While not used for the coilgun side of it, I read of using an arduino to do chronometer readings - photogate triggering and timing.
Back to top
Maj
Thu Jan 03 2013, 07:27AM
Maj Registered Member #9128 Joined: Sat Dec 29 2012, 02:23PM
Location: Sydney, Australia
Posts: 7
Thanks guys.
PSCG, I'd seen some of those sites/posts but since some were years old I thought I'd revive the topic. You have an impressive collection.

Barry, most of what I understand about coil guns so far I have learned from your site! Many thanks for a great resource. I'm happy to share my Arduino code with you (or any 4HV member) if it's of use.
Back to top
lauriethepigeon
Thu Jan 03 2013, 11:24AM
lauriethepigeon Registered Member #7669 Joined: Mon Oct 29 2012, 02:55PM
Location:
Posts: 19
I have created a light gate circuit which uses a single IR LED and phototransistor with sensitivity adjusted using a potentiometer. The arduino measures the duration of the pulse as the projectile passes using the pulsein() function. This is divided by the length of the projectile to return the speed, which is output to the serial port or an LCD display

I would be interested in using the arduino to control other aspects of the project such as measuring pulse duration and triggering other stages
Back to top
lauriethepigeon
Thu Jan 03 2013, 11:28AM
lauriethepigeon Registered Member #7669 Joined: Mon Oct 29 2012, 02:55PM
Location:
Posts: 19
Maj wrote ...


- Triggers the SCR.


The arduino pins can only output 40mA at 5v, was this enough to trigger your SCR or did you have to put it through external switching transistors?

Also, I'd be interested to see how you used the arduino to measure the capacitor voltage, did you set up a voltage divider with resistors and put the output into one of the analog inputs on the arduino?

Thanks
Back to top
Maxwell
Thu Jan 03 2013, 01:10PM
Maxwell Registered Member #8497 Joined: Tue Dec 04 2012, 06:24PM
Location:
Posts: 74
lauriethepigeon wrote ...

I have created a light gate circuit which uses a single IR LED and phototransistor with sensitivity adjusted using a potentiometer. The arduino measures the duration of the pulse as the projectile passes using the pulsein() function. This is divided by the length of the projectile to return the speed, which is output to the serial port or an LCD display

I would think your %error for this single-feedback method would be relatively high; I would estimate around 25% or so.

If you placed two photogates at a known distance from each other, you could simply poll for a change in light intensity, mark these timestamps, then divide gate spacing by difference in time. This would probably bring you into the 1-5% error range.
Back to top
Maj
Thu Jan 03 2013, 01:28PM
Maj Registered Member #9128 Joined: Sat Dec 29 2012, 02:23PM
Location: Sydney, Australia
Posts: 7
Hi laurie.
The SCR is a 50A @ 1600V, bought on eBay and the specs provided are in Chinese :(. I'm driving it directly from a digital output pin, with a 100uS pulse. It's been reliable so far, but I'm using fairly low power at the moment.

To measure the cap voltage I used a 680K/8.2K voltage divider into an analog input (just had those value resistors lying around). That gives me the ability to measure up to 420V with about a 0.5 volt resolution.
Back to top
lauriethepigeon
Thu Jan 03 2013, 09:07PM
lauriethepigeon Registered Member #7669 Joined: Mon Oct 29 2012, 02:55PM
Location:
Posts: 19
Maxwell wrote ...


I would think your %error for this single-feedback method would be relatively high; I would estimate around 25% or so.


So do you think the limitation would stem from the processing speed of the chip or the response time of the phototransistor? The chip measures the duration of the pulse to a very high resolution, to the tune of 10 microseconds.
In addition, phototransistors like the one I have, are used in optical rotary encoders for measuring high speed shafts so the switching time must be very low. I was under the impression that most transistors can switch incredibly high frequencies.

I have validated this method at low speeds by using a nail of a known length (25mm) travelling vertically in a 0.5m tube under the influence of gravity. I calculated the theoretical velocity using constant acceleration equations, and then measured the actual velocity at the bottom of the tube using my circuit. The theoretical value of speed was 3.13m/s, and my 3 repeats read 3.12, 3.13, and 3.12, which is much more accurate than I expected. No doubt the accuracy will decrease at higher speeds, so further testing is required, but so far it has proved more accurate than I thought.
Back to top
1 2 

Moderator(s): Chris Russell, Noelle, Alex, Tesladownunder, Dave Marshall, Dave Billington, Bjørn, Steve Conner, Wolfram, Kizmo, Mads Barnkob

Go to:

Powered by e107 Forum System
 
Legal Information
This site is powered by e107, which is released under the GNU GPL License. All work on this site, except where otherwise noted, is licensed under a Creative Commons Attribution-ShareAlike 2.5 License. By submitting any information to this site, you agree that anything submitted will be so licensed. Please read our Disclaimer and Policies page for information on your rights and responsibilities regarding this site.