Welcome
Username or Email:

Password:


Missing Code




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


Next birthdays
05/19 cbfull (52)
05/19 Steve Ward (39)
05/20 Vaxian (17)
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 :: High Voltage
« Previous topic | Next topic »   

Microcontroller Timed Flyback

1 2 
Move Thread LAN_403
Patrick
Sat Mar 12 2016, 08:08PM Print
Patrick Registered Member #2431 Joined: Tue Oct 13 2009, 09:47PM
Location: Chico, CA. USA
Posts: 5639
Ive been working on this upgrade for quite a while. Normally I don't like putting digital electronics near HV devices. But my beloved 555 timer just isn't going to work in the waveform tests I have coming up.
heres the setup with a Parallax "Propeller" IC, ive never coded much C before, its something I need to work on. I always wish I learned it in the 90's. I have some TVS' in place and I'm looking for my opto-isolator IC's.

there should be enough silicon, if a HV spike reaches back, that it can reach and kill the microcontroller. Even without the Opto-isolator.


1457813305 2431 FT0 Cropped


I have been getting a consistent spark, but only a 1mm dim totally quite one.
Back to top
Erlend^SE
Sat Mar 12 2016, 08:35PM
Erlend^SE Registered Member #1565 Joined: Wed Jun 25 2008, 09:08PM
Location: Norway
Posts: 159
Microcontroller + fet driver + fet?

Also hv circuit should be grounded, so it stays at around same potential as driver on low side.
Back to top
Patrick
Sat Mar 12 2016, 10:16PM
Patrick Registered Member #2431 Joined: Tue Oct 13 2009, 09:47PM
Location: Chico, CA. USA
Posts: 5639
Erlend^SE wrote ...

Microcontroller + fet driver + fet?
yes, but id like the Opto in there too.


Also hv circuit should be grounded, so it stays at around same potential as driver on low side.
[/quote1457820874]Please draw a schematic. I was debating on what to do with the chasis ground, LV ground, logic and HV ground/return.

I do have it putting out tiny sparks.
Back to top
Erlend^SE
Sat Mar 12 2016, 11:09PM
Erlend^SE Registered Member #1565 Joined: Wed Jun 25 2008, 09:08PM
Location: Norway
Posts: 159
I would say it's more a question about physical layout than schematic. For my HV supply(the 60 kV one) I am going with ground plane used for joining the logic and HV.

Based on your picture, you may at the start have all the HV inside a metal box, with negative connected to the box.

Only one of the wires are isolated for >30 kV on a flyback (unless you order special configurations from OEM). So the "low" end should go via current sense resistor, or directly to ground.
(if you use current sense resistor, have clamping diodes, just in case) (and run dual with reversed diodes flyback for big spans)

Also, old TV's have a 1-2 kohm resistor in series with the HV out, to limit peak current (and pulse power)

a metal return sleve around the HV wire(especially outside the box) connected to the system ground of the transformer should keep currents local & balanced.

Here what my planned setup looks like: HV supply (xmega controlled supply, CC/CV)

My reasoning is: if you can't isolate it well, connect it well; And CRT's rarely have total isolation from the flyback.
Back to top
Patrick
Sun Mar 13 2016, 12:30AM
Patrick Registered Member #2431 Joined: Tue Oct 13 2009, 09:47PM
Location: Chico, CA. USA
Posts: 5639
OK we'll revist that issue, but right now im only getting weak sparks 3mm long, very dim, and barely a squeak.

and my code sucks.
Back to top
Blackcurrant
Sun Mar 13 2016, 12:40PM
Blackcurrant Registered Member #2989 Joined: Sun Jul 11 2010, 12:01AM
Location: UK
Posts: 94
Maybe you need some better caps (low esr) driving through the primary coil.
Can you measure the current going in to primary coil side?
Back to top
Art
Sun Mar 13 2016, 02:32PM
Art Registered Member #57369 Joined: Fri Sept 18 2015, 01:24PM
Location:
Posts: 66
Why does your code suck? Do you know the rest would work if you were driving it with 555 or some other logic?
What is the C doing? Do you just have to toggle a pair of pins and keep timing consistent between both of them?
Back to top
Patrick
Sun Mar 13 2016, 05:57PM
Patrick Registered Member #2431 Joined: Tue Oct 13 2009, 09:47PM
Location: Chico, CA. USA
Posts: 5639
Art wrote ...

Why does your code suck? Do you know the rest would work if you were driving it with 555 or some other logic?
What is the C doing? Do you just have to toggle a pair of pins and keep timing consistent between both of them?
A 555 timer was giving howling arcs at 3/4" and banging sparks at 1.2 inches. And yes I'm toggling a mosfet on and off just to replace the function of the 555.

The caps are fine, and current is definitely available.
Back to top
Art
Mon Mar 14 2016, 05:35AM
Art Registered Member #57369 Joined: Fri Sept 18 2015, 01:24PM
Location:
Posts: 66
The only difference between the two I can see is the micro introduces resolution steps
in both duty cycle and frequency because it’s driven by a clock,
and that a 555 can deliver more current from it’s output pin than any micro I’ve dealt with.

Are you turning a whole port on & off? Working with bits in C is always costly with time,
and messy.
If you’re looking for 50% duty cycle things get easier with the micro.
Assuming you have an 8 bit port already set as an output port…

unsigned char counter = 0; // counter

main():
counter++;
port = counter;
} // endmain

Then all 8 pins of the port will be 50% duty cycle at different frequencies,
the least significant bit being the fastest,
and when counter overflows it will start again at zero.
You still have a little analogue adjustment with a low value cap either across the crystal, or between one leg of the crystal and ground,
but in that case you don’t know exactly what freq your crystal is clocking without measuring it.
This will always drag the clock frequency down, not ever increase it.

Some FETs want to be pulled low for the off cycle to switch off properly as frequency increases,
but I assume that’s not a problem if the 555 worked ok.
You might want to try a 10K pull down resistor at the micro output pin though, just to make sure.
Cheers, Art.
Back to top
Patrick
Mon Mar 14 2016, 07:21AM
Patrick Registered Member #2431 Joined: Tue Oct 13 2009, 09:47PM
Location: Chico, CA. USA
Posts: 5639
it uses a gate drive IC, and the power chopped is good.

I'm thinking the Pause(x) command take longer than the time period to execute, before the while(1) statement complets again.

I may go back to the 555 timer.
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.