Teardown of Magstim 200 Transcranial Magnetic Stimulator - Page 1
Forum section: electronics / general

author: dexters_lab
author_rank: Unknown
timestamp: July 19, 2015, 11:16:41 am
content: Teardown of a Magstim 200, a 1980s TMS base unit. I have two of these, one has released the magic smoke and the other is seemingly working.Unit discharges a large high voltage capacitor into a coil placed on the patients head, the magnetic field produced induces electrical currents into the brain.https://en.wikipedia.org/wiki/Transcranial_magnetic_stimulationPart 1Part 2

author: dexters_lab
author_rank: Unknown
timestamp: July 20, 2015, 04:01:55 pm
content: small update on what i know since the part 2 video...i found a document referencing the Magstim 200, it details full charge of the capacitor is 2800 voltsso this should allow a few things to fall into place... the first potted brick, which i am calling the charging control is in series with the 120/240v power feed to the HV transformer, the output of the transformer runs into this same brick. So i think i am making a pretty good guess that the brick will switch power to the transformer, rectify the output and when the voltage is correct for the power set on the front panel, it turns off.

author: Andy Watson
author_rank: Super Contributor
timestamp: July 20, 2015, 04:20:13 pm
content: If you have access to academic journals try searching the medical physics papers for the profs I.L.Freeston and A.T.Barker - it was their baby in the the early 1980s.

author: dexters_lab
author_rank: Unknown
timestamp: July 20, 2015, 07:28:00 pm
content: Quote from: Andy Watson on July 20, 2015, 04:20:13 pmthanks Andy, it was through searching some of the academic papers that i found this...http://www.psicomag.com/biblioteca/Guia%20MagSrtim/mguide.pdfi dont have access to any journals, but i have some friends that do so i am going to see if they can get the original text

author: dexters_lab
author_rank: Unknown
timestamp: July 21, 2015, 10:32:12 am
content: made a little progressI started looking at the front panel connector now, as i'm getting a handle on how this works i need to figure this out to hopefully disable the 'Replace Coil' error that seems to be locking everything out.First off i popped out the pins from the charging brick that connect to the primary of the HV transformer so that should disable any HV charging and make it a bit safer for me.So i mapped out the front panel connector, 19 pins total, 10 for the main coil power and 9 low voltage lines for sensing etc. These 9 all run to the front panel logic board.I found ground, +5 & +12v on four of the pins. Pin 9 is connected to the logic board but doesn't seem to go anywhere. Leaving pins 2, 3 and 8 unaccounted for. 2 & 8 have no voltage on them at all so I took a wild stab and took a 10k resistor and probed that between the +5v pin to pin 8 and the "Coil Temp" light came on so that'll be the coil temperature sensor. When doing the same to pin 2 it lit up 7 segments of the bargraph on the front panel, switching to an 18k resistor it lit up 6. One thing that did make me LOL is the fact the bargraph has 11 segmentsi wonder if they had been watching too much Spinal Tap when making this?I am wondering if the different coils have different maximum power levels, they could place a fixed resistor in the coil body to feedback a basic power rating to the base unit. The output power maybe scaled depending on the coil that is attached. A user guide would probably help here!Finally pin 3, i found an odd -166mV here so left this alone. I may trace this pin on the logic board to see if that helps.

author: dexters_lab
author_rank: Unknown
timestamp: September 05, 2015, 04:26:58 pm
content: need some help guys... i have been looking at this device in more detail trying to figure out how to get this 'replace coil' error/lockout turned off and to be honest i am not making much progresswhat i would like to achieve is to keep the overall workings original with an aim to replace the front coil connector with some connection of my own but retain all the original power adjustment controls, triggering etc. I plan to make my own coil to their spec to get this working thankfully they detail the coil turns and inductance so i can make something up.i have tried to trace the circuit for the mystery pin 3 which i believe is some kind of sense to detect faulty coils but it's proving difficult for me, mostly because i have never worked with opamps before which is compounded by the board being 4 layers, having various bodge wires and bodge boards on.this Pin 3 runs from the main connector into two LM324AN quad opamps through a 33k resistor, on the fist 324 it runs into two of the 4 opamps the negative input of one and the positive input of another, the output of one of these i know traces to a driver IC that in turn switches the 'replace coil' led indicator so i know i am on the right track here.i do know there is another interlock on the coil head itself, just a simple switch that has to be held before you can trigger it, this is also something i have not figured out yetof course if i had a coil i could see how it was constructed but i cant find anything online about them and magstim's patents on coil design dont reveal that much detail to helpOne thing that puzzles me is how they are detecting a good coil over a bad one using this low voltage connection, i think knowing this would help.any thoughts on how they could check to see if a a coil is good or bad?

author: SeanB
author_rank: Super Contributor
timestamp: September 05, 2015, 04:43:57 pm
content: 2 opamps says a window comparator, so they likely are detecting the resistance of something in the head, like a thermistor for over temperature, or they have a fusible link inside that melts open after the requisite number of pulses and then the next pulse is dissipated by a resistor to trip a thermal fuse and a series resistor. Look at the other pins of the opamp, and see the voltages there, one will be higher than the other, giving you the window voltage they expect so if you put in something in this range it will fool it into thinking coil good and allow triggering.

author: dexters_lab
author_rank: Unknown
timestamp: September 05, 2015, 05:57:09 pm
content: Thanks Sean, i'll take some readings when its powered onthere is a separate temperature input which is a basic thermistor, reading some of the manuals they expect the user to have more than one coil to hand so they can be swapped out when they get too hotbut i hadn't thought about using something like you suggest to permanently disable a coil, i guess they could do in house testing, work out the typical lifespan of a coil and they design in a safe failure mode that happens before the actual coil fails... designed obsolescence? But i guess its fair enough considering someone is holding a 3000volt 2 tesla coil next to an innocent patient!

author: SeanB
author_rank: Super Contributor
timestamp: September 05, 2015, 07:55:26 pm
content: I learned that from a toner unit used in a Konica copier, which had a small PCB on it connected by a set of 5 contacts. Common ground ( shared with the static ground), a variable resistor used to set the photoconductive drum voltages ( used in the power supply to set the corona voltages per drum), 2 used for the red LED and phototransistor for low toner detection and the last was connected to common with a 50mA wire in fuse. They would typically do 2000 pages per cartridge, and you could refill them easily just by popping the end cap off and putting in new toner, but they would check the fuse and blow it after around 200 copies after toner low. So I wired in a 20A wire link and refilled them till the drum wore out after around 5 refills. Toner was free as the Sharp copier next to it had a refillable toner box and they dropped off a bottle of toner a month, when the copier would do 2 on it. Toner was compatible, and as it was not on a maintenance contract ( was a lot cheaper to call out once a year if needed, plus we were not buying the consumables) it ran till it wore out.

author: dexters_lab
author_rank: Unknown
timestamp: September 05, 2015, 09:17:23 pm
content: interesting storyit's a damd shame i dont have one of the coils, but the coils from this machine are compatible with the newer Magstim 2002(basically a 2nd generation unit dating from the 2000s) so wherever these came from i guess they saved them to use

author: dexters_lab
author_rank: Unknown
timestamp: September 06, 2015, 04:28:35 pm
content: bahwell i did make some progress, but not in the right directionturns out i am pretty sure now those opamps are for the temperature sensing, while probing with my dmm between certain pins i could get the coil temp error leds to enable/disable but noting happened with the replace coil leds.So headed over to a ULN2803 transistor array that turns the four main status leds on and off, traced the pin that turns on the replace coil leds and it's controlled from a PAL16P8ACN device, it's quite a simple affair 8 inputs and 8 outputs with programmable AND/INVERT logic between them.So my thought is to pull it out and rig up a counter to the 8 inputs and just run through all the 256 combinations of inputs to find the right input state to unlock it. Hopefully this is the last piece of logic that controls the lockout and not just some poxy logic for the led indicatorswhere is my breadboard?

author: dexters_lab
author_rank: Unknown
timestamp: September 07, 2015, 04:18:52 pm
content: well that seems to have worked, simply counted through all the logic possibilities (brute force style) on the inputs to the PAL device with a binary counter, compared with the Magstim and found i only needed to pull one pin high on the PAL device.replace coil error gonecan arm itHV comes on and charges the capacitorjust need to see what happens when i try and trigger it

author: SeanB
author_rank: Super Contributor
timestamp: September 07, 2015, 06:03:15 pm
content: So the coil has a fusible link on it with a pull down.

author: dexters_lab
author_rank: Unknown
timestamp: September 07, 2015, 06:58:53 pm
content: Quote from: SeanB on September 07, 2015, 06:03:15 pmi dont know, i gave up trying to figure out the analog side, as i mentioned in my other post i think the opamps are for the temperature sensor, so went for the logic instead which proved to be much easier

author: dexters_lab
author_rank: Unknown
timestamp: September 07, 2015, 09:03:25 pm
content: video update

author: dexters_lab
author_rank: Unknown
timestamp: September 15, 2015, 06:35:23 pm
content: well finally got this thing working, turned out i only needed to ground one of the coil plug pinsstill no sign of charging to the 2800v i expected, so for the moment it's limited to a total of 1700v. It is very controllable though so i can go from about 0.25J to 275J in 1% steps but it is non-linear so the power goes up quicker as you increase the %, if i can figure out how to unlock the higher power mode i can get to 745J, that is if i am correct in believing it is capable of it.i have some interesting ideas for future uses including combining with my air-gap flash unit for some interesting photography but for the moment i need to find something more interesting to blow up. I have tried can crushing but 275 Joules isn't enough

author: Andy Watson
author_rank: Super Contributor
timestamp: September 15, 2015, 11:33:41 pm
content: Quote from: dexters_lab on September 15, 2015, 06:35:23 pmIf you are going down that route I would urge you to watch what happens to the coils on the can and coin crushing videos. One of the engineering challenges that faced Magstim was packaging the coils such that they did not self-destruct - violently. Be safe!

author: dexters_lab
author_rank: Unknown
timestamp: September 16, 2015, 09:05:49 am
content: thanks for the tip Andy, i am careful around these thingssounds like you know a little about magstim?

author: opusensemble
author_rank: Contributor
timestamp: September 26, 2015, 08:36:43 pm
content: Hi Dexter and thank you for the very interesting thread. If possible for you to measure, I would be interested in knowing:1) The value of the 8 parallel resistors in the board in series with the transformer.2) Examples of the currents on these resistors for different capacitor voltages (oscilloscope plot eventually)3) Discharge pulse oscilloscope plot for a given measured coil inductance.I'm not sure how to take the readings 3), and specially 2), due to the safety concerns regarding mains earth.A differential probe would probably be the only way I suppose? Or reading it through a HV probe using the oscilloscope disconnected from mains earth?

author: dexters_lab
author_rank: Unknown
timestamp: September 27, 2015, 06:31:46 am
content: Quote from: opusensemble on September 26, 2015, 08:36:43 pmHi there!Point 1:Can certainly do this, there are also additional resistors in the charging brick, there are some pictures on my blog but i will draw out a schematic for you. The charging circuit is very simple, just the transformer, rectifier and current limiting resistors. I am interested to know how often the transformer is switched on as it is switched by two SSRs.Point 2This is probably not necessary given the simple design, would imageine you can work out the currents from theory.Point 3I have been getting some traces using inductive coupling, simply placing the ground cable around the wire to the coil and back to the scope tip makes a simple single turn current transformer and means the scope is isolated. I have made a few coils but need an lcr meter to measure their inductance.I am away until tomorrow so will follow up when i get a chance

author: opusensemble
author_rank: Contributor
timestamp: September 27, 2015, 11:46:13 pm
content: Quote from: dexters_lab on September 27, 2015, 06:31:46 amHi again Dexter.It would be great that you could create a schematic for it.I have just used tinycad (downloadable herehttp://sourceforge.net/projects/tinycad/) to create a brief sketch of what I understood of the circuit so far based on your videos.I'm attaching the schematic file in case you want to edit your findings there.In particular, I would like to have learn more information on the following aspects, in descending order of importance:1) Grounding of the device.Is the device connected to mains earth? If so, to which components does the ground line exactly connect inside the device? Only to the box chassis (in case it has a metallic chassis inside?). I am currently assuming that the ground line does not connect to either the transformer and the capacitor, (Kindly check this), as I'm guessing the secondary of transformer and all connected components should be floating, to avoid accidental closed loop through the patient.2) The relative placement of the series diodes and the SCRs.In my tentative schematic, I have placed them how I would expect them to be theoretically, but I'm not sure if this is correct or not. I have placed the diodes in anti-parallel with the SCRs as their function would be to conduct on the negative cycle of the LC tank, i.e, while the magnetic field collapses. (I have attached a drawing I made to describe the 4 quadrants on a LC tank). According to the specs of Magstim 200 the pulse is monophasic which would mean that the diodes would conduct on the second quadrant, reversing the voltage of the capacitor.Theoretically it would make no sense to interrupt the current at the end of quadrant 1, considering the law of continuity of the magnetic field (guess it's related with Gauss' Integral Law of Magnetic Flux), so I assume the 2 IXYS diodes are actually placed to conduct the reversing current while the field collapses and not to block it. Kindly check how this is actually connected to confirm or refute this, reflecting any necessary corrections in the schematic. (checking the discharge current in the scope through your current transformer should shine a light on this too)I believe Ben Krasnow used diodes in anti-parallel in his experiment, although I was never able to understand from his scope readings how exactly the current was extinguished.Maybe in Magstim 200 they simply cut out the magnetic field while it's at its maximum, without allowing it to collapse? (Now my big doubt here: could a magnetic field on a coil be extinguished without letting a reverse current to be established? This is currently a paradox to me)3) The charging module.If possible, try to replace the charging module (the black box) in my schematic with the elements you found inside and the connections between them.You mention a rectifier in the charging circuit. Is that rectifier inside the charging module or is it apart not shown in your videos? I got very curious too on how that charging module is working as seems to be the tricky part (wondering if they have a patent on this part of PSU) You mention the SSRs are switching the transformer, so if that's the case, my tentative schematic will have to be quite modified. Please mess up with it as needed.4) The trigger module.This is the less important, but I'm guessing if they use pulse/isolation transformers there or other components (like opto coupler maybe? too sophisticated for a 90s machine maybe?), am wondering if it has other functions there, like reading the capacitor charge level, or other functions, but if you can figure out the connections and the components types (assuming that you won't be probably able to retrieve most of their values), would be a nice to have.Sorry if I'm giving you too much work. Thanks so much for your help.

author: dexters_lab
author_rank: Unknown
timestamp: September 28, 2015, 12:14:34 pm
content: QuoteThe unit is earthed, the case is all plastic the only metal parts that connect the inside to the outside are the trigger input/output and expansion connectors on the back which are well isolated from the HV side.There is a star earthing point inside, which connects to mains earth. This connects to both the HV transformer case and to a shield connection on the low voltage toroidal transformer, earth also connects to the metal enclosure encasing the HV potted devices and to the external trigger & expansion ports.The negative side of the capacitor is connected to mains earth through a 100 Ohm resistor.- I dont recall seeing this in my original teardown which was a much older unit.QuoteSee somewhat simplified schematic, it should be correct!I have included the diodes of the MDD95-16N1B module which connect across the capacitor through two parallel PCB modules with thick copper tracks located in the fan cooled section. Best i can measure these to is 0.15ohms each. You can see these PCBs at 23:00 in my original video. The consensus was these were resistive elements so i showed them as resistors on the schematic.I have tried to be as complete as possible in some areas, like showing the two connections for the SCR gate drive and including the discharge circuit (which i have slightly simplified)I have shown the capacitor as 190uF at 1700v because that is what i am measuring on my unit, though i do suspect it's rated much higher and mine is stuck in some low power mode. I have quotes from papers written by the magstim inventors stating the voltage should be 2800v and the coils needing at least 500J. My magstim is only outputting just over half of that. Also i have found a almost perfect match for the capacitor; the General Atomics 39504 pulse capacitor, the dimensions are spot on with the exception of the weight. Mine is showing 4.6kg but it's listed as 5.0kghttp://www.ga.com/series-dp-general-purpose-pulse-capacitorsQuoteThe charging module contains two SSRs (Z1 & Z2) that switch L & N to the HV transformer. One output of the transformer runs to the fan cooled area where it passes through 8 parallel power resistors (Shown as R1) making 5kohms. From there it then enters the charging module to meet with it's other connection from the HV transformer and passes into a bridge rectifier made up of 8 discrete diodes (D1-D8), each of the 4 legs of the rectifier then pass through 4 33ohm power resistors (R5-R7) which then make the HV DC output which then exits the module to pass onto the trigger module.4) The trigger module.QuoteI only know a little about this part as i have not been able to depot it enough, given i now have a working unit i wasn't intending to look at it further but the details on the schematic are as much as i know.there are some pictures of the charging and triggering modules on my blog:http://dexterslab2013.blogspot.co.uk/2015/08/magstim-200-hv-charging-control.htmllet me know if you spot any errors or things that dont make sense and i will clarify & correct

author: dexters_lab
author_rank: Unknown
timestamp: September 28, 2015, 03:33:47 pm
content: additional:two traces attached, i should qualify these by saying:output coil is a 70mm coil i made, is 15 turns of 2.5sq/mm cablepickup is simply attaching the ground clip to a regular 1X scope probe around one of the wires to the coilmagstim set to 95% (equates to about 1600v, or 243 Joules)Would welcome any comments about other ways to capture the waveform... joeqsmith, i think you are the guy to speak to about HV scope probes!?

author: opusensemble
author_rank: Contributor
timestamp: September 28, 2015, 05:47:07 pm
content: Thank you for your great work on the schematic Dexter.I'm trying to make sense of it and these are some of the thoughts I'm having.Probably some of the things on this list are self-evident but I'm including them here, for the case you have some inaccuracy in the schematic, and in case you don't, if you can comment on why it is done that way.1) Ground connects to the HV transformer case. Does the transformer have two terminals on the secondary or just an HV terminal like thishttp://www.hvtesla.com/img/tesla%20coil%20mot.jpg? In case it has only one terminal the other HV terminal would be the transformer case, right?2) The 100 Ohm connecting the C negative terminal to ground is quite intriguing. My first thoughts is that it is hazardous as it seems to facilitate this scenario during dischargehttp://sub.allaboutcircuits.com/images/00056.png. Or maybe it prevents it since it also connects the coil to ground?I've seen a TMS circuit example where they do that as well (http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3697055/figure/F3/), but am wondering which case is the safest.In your older Magstim have you noticed if the negative of the capacitor was connecting directly to ground without the 100 Ohm resistor?I think this issue is really critical and wanted to dig further on it with you if possible. In this referencehttps://books.google.pt/books?id=IgTSBQAAQBAJit's mentioned that not only the coil but the entire circuit of the stimulator should have a floating voltage isolated from earth ground:https://drive.google.com/file/d/0B_pa-g27qiWIbWptZ1VEZWczanM/view?usp=sharingIn this referencehttps://books.google.pt/books?id=KRImUIVWLCUCthe same is saidhttps://drive.google.com/file/d/0B_pa-g27qiWIZmJ1YlA3UXNSOW8/view?usp=sharing,where they refer that noise artifacts may need to be bypassed to ground with a big resistor or small capacitor, which is nothing what we have there in Magstim. Are you sure the resistor is 100 Ohm only?3) Is the switching of the primary through SSRs probably a way of avoiding the use of more expensive devices (IGBTs) on the secondary? What is your take on that?4) What on earth do you think the 33 Ohm resistors are for if there's a 5k Ohm in series with it? Seems a bit irrelevant but quite puzzling.5) What is really intriguing is the discharge curve. I could never understand why it behaves like that if they mention that the curve is monophasic, which means that the diodes should be blocking the collapsing current of the field, but I don't see how that can happen in that schematic. The curve looks a damped biphasic curve and is similar to Ben Krasnow's which I believe used diodes in anti-parallel with the SCR (image attached), as mentioned in the literature, which explains the negative current.But in this schematic are you sure the diodes are not across the coil instead of across the capacitor? If it's like what you have in that schematic I really have no explanation for the negative current on the pulse.I've attached a diagram trying to depict this. Maybe there's something wrong in the schematic here?6) What are you measuring in the rising curve in your second trace?

author: opusensemble
author_rank: Contributor
timestamp: September 28, 2015, 06:15:31 pm
content: I'm speculating the following, regarding the possible coil currents curves, in the attached image:Circuit A generates a biphasic curveCircuit B generates a monophasic curve (with damped negative current)Circuit C (in your previous schematic).. I can't understand how this works. It would discharge the capacitor, and somehow an overshoot current bypass the blockage of the SCRs below 0A ? Seems a bit impossible to me, and in this case I don't see the purpose of the diodes... but maybe I'm interpreting this circuit wrongly and it works through a different mechanism? Really puzzled about this.

author: joeqsmith
author_rank: Super Contributor
timestamp: September 28, 2015, 06:52:13 pm
content: Quote from: dexters_lab on September 28, 2015, 03:33:47 pmI have made capacitive coupled probes that work like you describe but I have always had a way to calibrate them. Not sure what your end goal is but it may be time to invest in a good HV probe and a current probe as well. Be careful with that nice looking capacitor. You may only get to make one mistake.

author: dexters_lab
author_rank: Unknown
timestamp: September 28, 2015, 08:55:41 pm
content: Quoteno worries, i enjoy doing it TBH!Quoteit's not like an MOT, there is no connection to the case/core and the primary or secondary windingsQuotei double checked, it's 100 ohms to ground, see attached pictures, in one of the pics you will see 101ohms from the negative terminal to the mains earth pin.as for the other unit, it's been... recycled, i still have my original video footage, i will review it to see if i can spot the same connectionto qualify the pictures attached, you will see the cap, SCR, busbars and a binding post.The top connection on the capacitor is the negative terminal, this connects to a isolated binding post with various connections to it (including my black insulated wire i have installed), this previously had the connections to the front panel connector.The bottom terminal of the capacitor is connected to the busbar that connects to the negative terminal of the SCR, which is the left most terminal and to a binding post.The middle connection on the SCR just to the right of the negative terminal is the positive, this also had connections only to the front panel connector and now has a black insulated wire for my own front panel connectionYou should be able to see two thin black wires on the negative binding post in addition to my large black one and three red wires. The small shiny cable is the charging cable and is teflon coated, the other black cable looks more matt and is covered in heatshrink, this connects to the earthing post deeper in the unit.You should also be able to see the AC terminal of the SCR just under my two black cables, it's flat and black because it's covered in heatshrink as it's not used.Quotemultiple reasons i would say, keeping the other transformer off when not needed will help keep the heat down in the unit and will be safer. At the higher charge levels the transformer is switched on and off every few seconds to keep the capacitor topped up so mechanical relays would probably fail too quickly.Quotefor those, i have no idea!!Quotedont forget i am measuring inductively before the diodesi have double checked, the schematic is correct, in two of the pics i have disconnected the capacitor and the discharge circuit, the two images show open circuit one way and 0.8v drop the other way, this is from the two diodes in the MDD95-16. You should also see the wiring, there are three red wires on the negative binding post i mentioned earlier and the busbar that connects to the negative terminal of the SCR (the far left connection). One red wire is for the discharge circuit, the other two connect to each of these PCBs with the long thick traces and then to the MDD95-16 and back to the other. You should be able to see it's across the capacitor not across the coil connections.Quotei was measuring rise time, actually trying to see the load on the SCR during short circuits (like when i am blowing something up)

author: dexters_lab
author_rank: Unknown
timestamp: September 28, 2015, 09:12:22 pm
content: Quote from: joeqsmith on September 28, 2015, 06:52:13 pmin my case i was only looking for the time period / rise time rather than an accurate amplitude when there was no inductance on the outputahh, so many things to buy, new probes... probably an isolation transformer would be a good idea too!yea that cap has evil written all over it, it's treated with the upmost of respect, in fact the whole thing is evil... i might paint a skull and crossbones on the lid!

author: opusensemble
author_rank: Contributor
timestamp: September 29, 2015, 01:17:00 am
content: Thank for confirming everything Dexter.Was digging through the literature and found a few things here too, attached. Your schematic matches the monophasic circuit.And apparently the current does not cross the 0A mark in the monophasic circuit. Your reading through your pickup is actually the induced voltage (E ~ dB/dt), so this makes sense after all.On each of the 2 boards with thick traces, are the stripes on both sides connected together, acting as a parallel ? Initially I thought the IC on one of the boards was a hall effect sensor, and the boards would be indutive elements, but the IC there is really a temperature sensor right? Absolutely no C or L components in these boards correct?I wonder when do these boards conduct as the diodes are clamping the C capacitor. Could you make the experiment of putting your probe/ground loop around node 3 in your schematic, to see what is inducted there during a pulse, if possible using 2 scope channels and overlapping that curve with the induced voltage waveform you got above?References:http://rstb.royalsocietypublishing.org/content/360/1458/1185http://www.amazon.com/Oxford-Handbook-Transcranial-Stimulation-Handbooks/dp/0198568924

author: dexters_lab
author_rank: Unknown
timestamp: September 29, 2015, 07:41:08 am
content: QuoteQuotePictures attached, the two boards are identical, one just has the addition of a LM35 Temperature Sensor, the PCBs are double sided, the top and bottom traces follow each other. The traces simply track one side to the other. So the tracks are parallel and the boards are parallel. I had wondered if one board was wired backwards to the other, given they are placed over each other they might have formed some kind of inductive element but it seems notQuoteyes, i should be able to do that, will report back when i get a moment

author: opusensemble
author_rank: Contributor
timestamp: October 01, 2015, 01:11:09 pm
content: Hello Dexter,Thank you for all the reverse engineering. This post may be a bit unrelated with the thread topic but I'm placing this here in case someone can help me solve the mystery that I describe below on my quest for creating a 10Hz prototype.Inspired by your teardown, I was able to setup the basic pspice simulation environment for a biphasic circuit seen in the literature, using:-> Cadence Orcad Capture CIS Lite & Pspice A/D Lite-> IXYS Pspice model files for the SCR and an IGBT (I had to relax the SPICE parameters by editing the models, as couldn't find models for the exact HV components I intended to use, similar to Magstim's 200, but supporting 2kV: Diodes: MDD95-22N1B, SCR: IRKT230-20)My results were quite disappointing, although my calcs didn't expected much better data, as the design a 10Hz TMS device seems to completely escalate in complexity compared to a low frequency (<1Hz) like Magstim 200.On a 10Hz rTMS equipment there's only 100ms between pulses and the recharging of the capacitor must be done as well in less than 100ms. Magstim 200 single pulse operation doesn't have that constraint, and this is really where things get complicated.The bottleneck is at the charging part. Based on the literature I have simulated 2 circuits, attached:First circuit attempted to recreate the isolation from the charging and discharging part through a coil but for that particular bridge rectifier circuit there were no benefits. I had to add a small resistor in series to mysteriously raise the level of the capacitor, useful also to eliminate C-L-C oscillations if there was a filtering capacitor after the bridge.Second circuit attempted to recreate the isolation from the charging and discharging part through an IGBT and included filtering on the charging side.In both cases I was only able to get a decent discharge voltage at the capacitor, by reducing the charging resistors to 1k, which is not acceptable and makes this circuit not implementable, as I would have to use a very bulky custom made transformer with many kVAs (6kVA, 7kVA, or higher)It's mentioned in the literature that it's often used current-limiting, constant current and constant power designs, but I wonder what designs are these that make it possible for the capacitor to work in "high" frequency (such as 10Hz) fully charged at the desired power before each pulse.Magstim Rapid with one PSU only is capable of 10Hz (actually 15Hz) at full capacitor charge of around 1.7kV, and at half of the output power, it can output 30Hz. The power consumed by the equipment is 3kVA, so, comparing that with my simulations, I wonder how that is possible if there's only a certain amount of power that can be drained from mains to charge the capacitor, and as seen in the simulations, that power would have to be much increased in order to recharge the capacitor on time for the next pulse.It's said in the literature that after the completion of a full pulse there is a residual voltage on the capacitor of about 50-80%. My simulation using ideal cap models shows results between 75%-85% but even with this good voltage recycling rate, I was unable to have enough charging current from the supply without doubling or tripling the power of the transformer, which is not acceptable,Do you have any clues of the rocket science that may make it possible for Magstim Rapid, to be as rapid as it is?(Pulse power Specs here:http://marquezsales.com/files/Rapid_.pdfpages 48-21. )

author: dexters_lab
author_rank: Unknown
timestamp: October 01, 2015, 01:22:45 pm
content: Quote from: opusensemble on October 01, 2015, 01:11:09 pmi read this patent from magstim when i was doing my initial research, it's regarding rTMS and recovering energyhttp://www.google.co.uk/patents/US5766124

author: opusensemble
author_rank: Contributor
timestamp: October 01, 2015, 11:00:07 pm
content: Great reference Dexter.After being puzzled for almost 2 years on how these pulsers could recharge their caps so quickly, this was one of the most interesting readings I ever had.I decided to summarize visually the contents of the patent, to simplify future references to it (attached)Circuit in Figure 8 seems to be one of the more simplest to implement, both in bulky parts and control. Still, 2 capacitors seem inevitable and definitively more bulky than Magstim 200. And, being circuit on Figure 8 very similar to my circuit above with the IGBT (now replaced with the SCR to cut out the current at the first quart of cycle of the resonant frequency, to achieve the fastest maximum energy transfer), I suspect that problems will appear when implementing this and an unusually bigger transformer will be needed, compared with the ones that we can only guess are on the actual Magstim units from their power specs (3kVA for the 1PSU, 6kVA for the 2PSU)In any case, nothing like further investigating and simulating.Possible typo on the patent:Where it says: "For example, recharging a 70uF capacitor to 1.8 kV in 10 microseconds requires about 11 kW whereas the preferred embodiment could utilize a 500 VA transformer in the supply unit 1.", I believe the author meant 10 milliseconds, instead of 10 microseconds.In any case I'm amazed and dazzled how it says there a 500VA transformer is enough to do that, in the circuits of the patent, even if he meant 10ms. So far I couldn't even charge it in 10x more time (100ms) using 3 times the transformer power, so I may still be missing something critical that only maybe through simulation can be found)Great mind behind the patent, Dr. Michael Polson. Maybe one day I contact him to ask him what was the magic sauceThanks again for your reference. Very helpful

author: opusensemble
author_rank: Contributor
timestamp: October 02, 2015, 04:43:12 am
content: Found the secretThe charge pumping coils and the SCR resonant frequency halters make it possible to completely empty the reservoir capacitor while filling the charge capacitor.Found that there is an optimal value which is the best compromise between size of the reservoir capacitor and the charging speed. And it's around 10x smaller that the discharge capacitor for just 12% loss in pumping power when compared with a capacitor with the same size as the discharge capacitor. Can be 20x smaller if needed with only 25% loss in pumping power.10Hz are achievable at full power 2000V with a 2240VA transformer, and is inline with Magstim Rapid - 1 PSU specs for 1.67kV/3000VA.Thanks for the patent reference Dexter. This was truly tricky but made sense after all.Other thoughts: It's interesting to notice in the patent docs that the coil is also connected to mains earth. Still not clear on why this would be done like that. If the user touches HV, a return path will be established through ground, in parallel with the coil impedance (+ the 100 Ohm resistor you found). This sounds no good and potentially lethal. I wonder why they do it like that. probably because they trust their isolation and want to avoid electrostatic charges accumulating on the user scalp? Still guessing about that.Thanks again for the big clues

author: dexters_lab
author_rank: Unknown
timestamp: October 02, 2015, 09:35:38 am
content: No worries, glad it was helpful... it was interesting when i read it but i didn't go all the way through as i was looking for clues about the coil so i could remove the safety locksnot sure about the earth referenced coil, if you look at all of the pictures of TMS coils they are heavily potted and protected, coming in contact with the electrical parts must be absurdly remote.in answer to your earlier question about the older broken magstim i did the teardown on and the earth connection to the coil, i have checked my footage and the low side of the coil/capacitorwasconnected to ground, however it was directly connectedwithoutthe 100R resistor from what i can see.

author: dexters_lab
author_rank: Unknown
timestamp: October 02, 2015, 12:14:51 pm
content: one other thing that is still puzzling me with the Magstim 200 is the voltages of the charging supplyi find it surprising that the HV transformers they use could charge the cap to much higher voltages than they are rated for if the supply wasn't switched off in timei think it's a pretty good guess that the cap is a General Atomics 39504 (185uf @ 3000v), yet the transformer in the magstim i took apart was rated at 3400v, so that would peak at around 4800v once rectified. My working magstim is newer and rated at 2800v so would peak at 3960v.i guess that it would help with charging times?

author: opusensemble
author_rank: Contributor
timestamp: October 02, 2015, 08:29:12 pm
content: Quote from: dexters_lab on October 02, 2015, 12:14:51 pmThat's exactly my same doubt Dexter. It resembles jumping from a trapeze without a net.The problem seems to be common to the monophasic, low pulse frequency architecture of Magstim 200 and to the patent circuits that seem to be behind Magstim Rapid.In Magstim 200, theflawless controlof the charging block through the use of the voltage sensing of the cap, seems to be what keeps the capacitor alive. 4800V would certainly damage the 3kV cap if the charging block allowed it. It seems crazy to operate circuits like this, but if they used a capacitor rated for 5kV, it would be even a bigger brick, so guess these real life HV circuits need some otherwise disastrous cowboy tricks as these.The same problem also seems to happen in the higher pulse frequency circuits described in the patent:For instance, in my images attached I consider the circuit from FIG.8 in the patent (simplified by removing C5 and S8 as suggested), and similar to what they describe (the reservoir capacitor C2 being at a higher voltage than the discharge capacitor C9), I am assuming in this circuit what would be expected to be found inside Magstim Rapid, based on their product specs. C9 is rated 2000V as the voltage in Magstim Rapid specs is 1.67kV, and C2 rated at the transformer peak voltage (2800V) with capacity around 10 times smaller than C9. L15 value was calculated so that its resonant frequency with C10 had a period of 150us, as the patent describes.The charging timing seems to be the thing that makes the circuit work by controlling the charge pumping from C2 to C9 through the "magic" L15 and simultaneously the same SCR seems to be the thing that prevents the discharge capacitor C9 from being overcharged to the point of blowing up.If, either by failure the charging SCR was allowed to be turned on indefinitely, or by design, repeated pumping triggers were sent to the charging SCR, irrespective of the voltage level of C9, the C9 voltage would be overridden above its rated voltage, destroying it.The charge pumping circuit comprised by C2, C9, L15 and the SCR looks quite ingenious. I am assuming it works like this, based on what is said in the patent. (In my plots of the curves attached I was unable to make the SCRs turn off when their current equals 0, as I have no decent Pspice models for this device, so I couldn't see this charge pumping effect):1) C2 sucks all the charge from the power supply while it can.2) SCR is triggered and a LC tank resonant circuit is established between C2, L15 and C9.3) In the initial conditions of the resonance, V(C2)>V(C9) which establishes a current from C2 towards L15.4) All the charge is transferred from C2 to L15 (stored transiently there) and then transferred to C9, in half a resonant cycle. At that point the current in the SCR equals 0, so it turns off.5) C2 is now depleted and starts charging again through the power supply.This pumping circuit is so powerful that, each triggering of the SCR gate represents more than a switch turned on. It's an actual pumping order. This is what makes it so interesting and scary at the same time, as irresponsible blast triggering of SCR will overload C9 above its rating (commanded by C2 which although is a smaller cap, is fully charged at a higher voltage), destroying it.For the dimensioning of C2 I made some charge considerations (table attached), based on the maximum charge (in Coulombs) that C9 could withstand and that C2 could drain from the transformer in between C2 recharge cycles, and at the same time, in between pulses.(Determined that for 10Hz discharge of C9 at its 2000V rated voltage, the charging resistor needs to be 3.5k for a 2800V peak transformer, and that the capacitor C2 would to recharge partially during about 10 recharge cycles between pulses.)The number of recharge cycles matters and this is probably one of trickiest things in all the circuit.Each recharge cycle is a partial rechargeof C2, and the more partial recharges we make (as long it's <= 100Hz, the peak frequency in the rectified voltage supply), the more charge one can drain from the transformer.The fact that the the capacitor charge curve is logarithmic, not linear, is responsible for the "high frequency" Magstim Rapid charging circuit to work. It took me almost 2 years to figure out this, and the almost neglectable "annotation 55" in the patent was the clue I was lacking.Now, .. although there are ingenious things in the circuit, if the charging SCR fails, the discharge capacitor C9 will be lost (if it doesn't blow up). Preventing it would require a voltage sensing circuit for C9, that would switch the supply off through SSRs like in Magstim 200 (in this case it would not be used for charging control but for failure prevention).Btw, can the fact that they used 2 separate SSRs for Live and Neutral in Magstim 200, be that way as a safety redundancy feature for the case of one of the SSRs fails, preventing the destruction of the capacitor? (The failure of the discharge SCR you found short-circuited, didn't any harm to the capacitor, in comparison to the potential SSR failure, I assume)P.S. Your guess on the capacitor must be right, as the dimensions seem to match (http://www.rell.com/products/Capacitors/Synthetic-Capacitor/39504.html)

author: dexters_lab
author_rank: Unknown
timestamp: October 02, 2015, 10:02:21 pm
content: it's funny really the all the safety interlocks and physical design for the user, but they seem to be just relying on things to keep working inside. The burned and broken one i tore down had a catastrophic failure, probably down to the SCR failing short and cooking the limiting resistors.certainly looks like you have and are putting a lot of work into this, i think i remember you mentioned some open hardware project, is this your goal?those caps & SCRs are not cheap, i dont envy your research costs!

author: opusensemble
author_rank: Contributor
timestamp: October 03, 2015, 02:55:52 am
content: Quote from: dexters_lab on October 02, 2015, 10:02:21 pmYes, that seems clearly to have been the crime sceneQuote from: dexters_lab on October 02, 2015, 10:02:21 pmI'm sure the following is really not typical of an Electronics blog, and don't know well where to start, but here goes:I have personal (medical) reasons behind my interest on this topic.The long story short: I am a victim of Western Psychiatry.I was given an antidepressant for over one decade, and was really harmed by it when I had a sudden adverse reaction, that I compare only to chemical lobotomy (even if there are no medical exams that can prove my complaints). Due to it, I was bedridden for years in absolute lethargy, stricken by opportunistic illnesses, and my life fell apart.When seeking for medical help I was further drugged with life-jeopardizing polypharmacy as doctors attempted to "medicate" the brain damage caused by the exactly the same type of drugs that caused it (there are new buzzwords for this phenomenon in psychiatry: "iatrogenic" and "tardive dysphoria":https://www.psychologytoday.com/blog/mad-in-america/201106/now-antidepressant-induced-chronic-depression-has-name-tardive-dysphoria)I may seem a bit biased here, but I had to live it to believe it:https://www.ted.com/talks/ben_goldacre_what_doctors_don_t_know_about_the_drugs_they_prescribe?language=enThe truth is that all over the world, people are being given psychotropics by GPs like candy, and for an increasing % that stay on them for a long period of time, it will be deadly.Even in UK if you check,"Prescription. pills are Britain’s third biggest killer: side-effects of drugs taken for insomnia and anxiety kill thousands."http://www.goforwardtogether.com/2015/09/21/psych-meds-are-killing-more-people-than-we-thought/Some links on the psychiatric genocide going on:Robert Whitaker, author "Anatomy of an Epidemic", and "Mad in America"(www.madinamerica.com):Part 1: The Roots - Robert Whitaker - Psychiatric Epidemic:Part 2: The Scope of the Epidemic - Whitaker - Psychiatric Epidemic:Psychiatry: The Marketing of Madness: Are We All Insane:The Untold Story of Psychotropic Drugging - Making a Killing - Full Documentary:The Hidden Enemy: Psychiatry [FULL DOCUMENTARY]:Dr Peter Gøtzsche exposes big pharma as organized crime:Interview with Peter Gøtzsche:Maybe some of the damages I had from the meds will never subside, but in the process, the public opinion is being slowly mobilized against the current psychiatric model, and as wounded victim abandoned by Psychiatry in the battlefield, I feel I need to do something, even at my own small scale.Psychiatric drugs (many of them chemical analogous to street drugs) are being handed out like candy, promising help and delivering death.It's the deepest betrayal of a human being. To kill them while claiming you're treating them. To call it medicine and deliver death.Current western psychiatry is essentially modern day quackery: In many cases calling it treatment and delivering suicide.If you check the news, nearly all suicide or mass murderer stories have psych meds (not guns) in the common denominator.Just to give you 2 examples that I'm sure you've heard of: Robin Williams suicide last year and Germanwings plane crash this year were both related to psychotropic medications.Similarly, anyone that is part of psychiatry support groups online will see almost daily news posted about suicides, shootings, all related to psychiatric drugs.If you look further, all mass killings in the US were made by young men taking some sort of psychiatric drug, from Columbine to Virginia Tech, names such a Adam Lanza, James Holmes, Dylann Roof this year, the list in interminable, and it's possible to find nearly daily stories of killings inside families in the US hitting the news.A fresh example of a mass shooting yesterday: (Probable cause: Lithium, a psych medication)http://www.theguardian.com/us-news/2015/oct/02/chris-harper-mercer-first-details-emerge-of-oregon-college-killer?CMP=fb_gu.This keeps happeningevery single dayand you won't see Obama mentioning the drugs, while he wards off the war on guns.http://www.nytimes.com/2015/10/02/us/obama-oregon-shooting-umpqua-community-college-gun-control.htmlIn his statement yesterday, instead of saying"it's fair to say that anybody who does this has a sickness in their minds", he should be saying"again, psychiatric drugging caused another carnage".Other cases that I bothered reading in the last days, all with very probable ties with psych meds (this is the case in >99% of the cases. >99% is an accurate estimation according to a FB group I am part of that tracks some of them, as it's virtually impossible to follow them all)http://www.dailymail.co.uk/news/article-3253642/Jim-Carrey-s-ex-girlfriend-Cathriona-White-28-dead-apparent-suicide-just-days-breaking-comedian-second-time.html?ito=social-facebookhttp://www.chicagotribune.com/news/local/breaking/ct-wisconsin-man-accused-of-beheading-mom-with-sword-20150917-story.htmlhttp://perezhilton.com/2015-09-25-ahmad-rashad-siddiqi-ex-marine-convicted-killing-pregnant-girlfriend-not-sorry#.Vg8SrflVhBdThe fact is that even visiting a doctor nowadays complaining of insomnia can be a path for psychotropic drugs being prescribed and hell to be unleashed.Just to give an interesting example: The battlefield is safer than psychiatry. Statistically you are less likely to be shot by an enemy if you were in the war of Afghanistan, or Iraq than to be killed by a pharmaceutical drug. That's the truth about psychiatry. 22 American soldiers commit suicide every day in the US at the hands of psychiatric drugs. In a single year that's more than all US casualties in the wars or Kuwait, Iraq and Afghanistan, combined.Clinical depression is a terrible illness, and psychotropic drugging can be life wrecking as was in my case. This says how prevalent it is:"Major depression is the No.1 psychological disorder in the western world.(1) It is growing in all age groups, in virtually every community, and the growth is seen most in the young, especially teens. At the rate of increase, it will be the 2nd most disabling condition in the world by 2020, behind heart disease"Source:http://www.clinical-depression.co.uk/dlp/depression-information/major-depression-facts/As a severe depression sufferer I recognize the hope of rTMS, and unfortunately due to the spiral of destruction that psych drugs have made in me, I was unable to hold a job since then and save £15,000 to visit UK or some EU country offering rTMS therapy, and give it a try. Besides, although 4+2 week treatments seems to be the norm, there are situations where results were seen only after 6 months of periodic treatments (http://www.drstubbeman.com/depression-treatment-results/). So, the whole idea of having a device like this available at home for personal use is not so unreasonable as it could sound. And as it's virtually impossible to buy one from the makers, from reasons ranging from pricing from them not selling to individuals due to regulatory agencies' directives, I think it's quite inevitable that someone will try this on their own, at their own expense and risk, as hopefully the essential parts that make one can be bought and assembled together.You mentioned Trigger's Broom. I think it's bespoke frankenstein, DYILast time I checked (last year), there were only 3 (three) TMS machines in Portugal, and all of them were reserved for investigational purposes (PhD and medical students). Two of them were from Magstim.This is kind of shocking in an age where the general public is increasingly more informed about the dangers of Western Psychiatric care, and where some leading researchers believe they can save lives and prevent unrelenting suffering to as much as 50% of treatment resistant severe depression patients (which is a fairly high population percentage. 1 in 10 persons suffers from clinical depression, and as much as 1/3 of them is drug treatment resistant), like Dr. Jonathan Downar's recent work:Brain Stimulation Dr. Jonathan Downar Public Talk (full talk):My purpose of creating a rTMS machine is thus due to my personal struggle with depression, and I've been reading about it for about 2 years, but in the process if I could make it somehow an open hardware project, I believe it would serve a bigger purpose. I have met people along the way that could benefit from it. Of course, people from all quadrants will warn against such an attempt, arguing aspects ranging from safety concerns, to medical regulatory agencies' authorizations, to patent infringements, etc, but the fact is that as long no one is creating a commercial product or willing to electrocute oneself, these shouldn't be actual limitations.My view is that this technology should be as accessible to people willing to try it on their own, as easily as is making a home made Transcranial Direct Current Stimulation (tDCS) to try at home (for which there are simple, clinically unproven, yet expensive devices for its portable range such aswww.trans-cranial.com,www.alpha-stim.com,www.fisherwallace.com)Making the long story short, I think more people like me would make good use of DIY-rTMS instructions if it was available openly. I'm not encouraging anyone to do it, as the setup by itself can be lethal, and it can probably kill more people by accidental electrical-shock than the ones it treats. But I've seen people I talked with on FB groups dying by suicide at the hands of psych drugs. There has to be a better way of coping with mental illnesses than resorting to poisonous mind bending chemicals, and all avenues should be explored when one is trying to hold on to life. Only electronic savvy people could mess around with it, but would be better than the current secrecy around the technical aspects of rTMS and the wide unavailability of the treatment, specially at reasonable pricing.I probably would never have found out the tricks of rTMS charging if it wasn't your Youtube channel and this thread's Magstim teardown. Ben Krasnow's device was a start and I bought SCR's like his and some materials but one thing is basic experimentation of the concepts like he does, other thing is stimulation according to the actual medical protocols and intensities. The only medical applications for which rTMS is FDA-approved is the treatment of clinical depression. There are some off-label uses for Bipolar Depression and Tinnitus but with small clinical evidence so far. Aside from that, all experimenting with TMS/rTMS is essentially kids play as no-one knows exactly what they're doing. So, clinically speaking, when playing around with rTMS, either we do it the right way at a high frequency (>5Hz) for its main application (the treatment of treatment resistant severe major clinical depression disorder), or we're just making useless experiments with magnetism.A low frequency <1Hz TMS system is of very limited use in clinical depression. The standard protocol for depression consists in applying 10Hz simulation pulses to the "Left-Dorso-Lateral-Prefontal-Cortex" (LDLPFC). In a minority of cases the treatment is complemented with 1Hz stimulation on the homologous right side (RDLPFC), but it's very uncommon and clinical data doesn't support it much. Of course, a device capable of 10Hz is also capable of 1Hz in case anyone wants to try both modalities.--Wrapping up, I'm sorry for all the venting above, I believe your Magstim's teardown helps on setting a precedent in the information publicly available about these devices, and I'm so glad that you did it.I intend to assemble a device with similar frequency and intensity specs as Magstim Rapid's, but using a C-shaped iron core like Neuronetics' Neurostar with insulated/potted litz wire coil. Doing it is probably an overkill as it reduces greatly the need for a large discharge capacitor, but I intend to join together "the best of both worlds". I'm not exactly sure how I can ask for technical advice from anyone experienced in HV, but meanwhile I guess you gave me the best help possible with the teardown and that patent reference. Trying to figure out how it worked haunted my tormented mind for nearly 2 years. Suddenly everything looks clear and technically achievable. There are certainly many technical aspects involved in isolated drivers, triggering, safety and control, but none seems as demanding as needing to charge a capacitor bank at a given rate and not being able to draw enough power from mains. It just defied the laws of physics. Now it's so clear. Thanks to you.Quote from: dexters_lab on October 02, 2015, 10:02:21 pmYou're right, although he price of the SCRs/Diodes can be surprisingly cheap if sourced for instance through Hong Kong suppliers, as I recently checked with one of my trust there:MDD95-22N1B $20.0IRKT230-20 $70.0But, the costs skyrocket for all other things:-> A 3000VA transformer needs to be custom made and can probably cost a little fortune-> Capacitors will certainly be expensive-> An Iron C-shaped core for the coil gets quite expensive too, although sent from Asia.-> Same for properly insulated litz flat copper wire for the coil and stripping chemicals/Cad welding of copper wire (to avoid resistive losses and heating) electrically insulating Mica sheets, Epoxy "G10 FR4" sheets,-> I'm not even mentioning the costs in trial and error on the making the isolated SCR drivers, isolated voltage sensing board for controlling supply SSRs, capacitor discharge board (will probably use HV IXYS MOSFETs bought previously for controlling HV, with respective driving optocouplers), and all the parts and materials that although insignificant they may seem, play a vital role in each of their functionsContrarily to many electronic projects and experiments this is certainly not something to play with lightly. Safety must be #1 concern, and there's no point in doing it without all safety procedures in place (As the user joeqsmith said here in the forum the other day"You may only get to make one mistake."). It's safety concerns can easily double or even triple the initial estimated cost and effort.Nothing comparable at first glance with the cost of an rTMS treatment with medical supervision, but still high though.The thing is, one can't exactly put a price tag on health or even life.

author: dexters_lab
author_rank: Unknown
timestamp: October 03, 2015, 07:17:54 am
content: an interesting story and i am glad i could help with your quest!thankfully it does seem you have good knowledge of the whole subject, i must admit i was a little worried that you might try something ill-conceived! Whats the saying... "Give someone a rope and they will hang themselves with it"!From what i read it has taken quite some time for TMS and rTMS to be slowly accepted, as with all new medical procedures. The initial research was in 1985, i think the Magstim 200 was on the market around 1987 and was in production for more than 10 years it seems.The control side thankfully would be far simpler than back in 1985, though dont really understand why there is not at least a 6502 or something in there, it seems over complicated with all the PAL devices and looks like it needed lots of tweaking too. Maybe it was a cost issue? i bet the bom for just the main components was huge, maybe they skimped on the electronics to save some ££ and keep the price down a bit?Did you still need those other scope traces from my Magstim after the blocking diodes? - I may get a chance this weekend to set it up

author: opusensemble
author_rank: Contributor
timestamp: October 03, 2015, 03:13:17 pm
content: Quote from: dexters_lab on October 03, 2015, 07:17:54 amProbably because at the time, electronic design was not microprocessor-centric. And given the academic origins of the device, probably using PALs was their way of reassuring they had all the control logic hardwired. 6502 was becoming popular but they probably decided it would be too risky, more probe to bugs, and slow down the development if they used a microprocessor, Even today, one will probably find mission critical logic directly hardwired. We can only guess, It's been 30 years. Today a simple PIC can handle all the control for the same application. Or even for Magstim Rapid, running some embedded OS and featuring a interface screen, a generic SBC would be more than enough to replicate everything.In my initial thoughts on the control logic I bought this modulehttps://www.4dsystems.com.au/product/1/132/4D_Intelligent_Display_Modules/uLCD-70DT/willing to use it to interface a simple PIC board like an Arduino, but that was just to give it a more fancier look, and allow some controls there like setup of pulse repetition rate, intensity, rest interval between train of pulses, treatment session pulse count, capacitor charge level, on-screen control for single or repeated pulse trigger, emergency capacitor discharge or power circuit shutdown.This was probably all the control logic complexity I would use. I wouldn't go into a SBC Linux board, that although would be able to allow nice things like on screen display of the pulse, in a open source project as would get too complicated, and demand considerable software development efforts.And that shifts the attention from all the demanding challenges around the HV control and monitoring itself. For instance, the capacitor can fail at certain point, and that needs to be detected, as these HV caps have quite low discharge count limit around 6 million full charge/discharge cycles.http://www.mhzelectronics.com/ebay/manuals/general_atomics_30543_capacitor_datasheet.pdfAnd what they mention as the "voltage reversal coefficient of life" (curve on the right in the second page below):http://www.rell.com/filebase/en/src/Datasheets/Series-DP-General-Purpose-Pulse-Capacitors.pdfit's not that promising, If I understood it correctly if the voltage is reversed at its intended maximum of 80% (the same 80% the patent mentions), the life expectancy will by reduced to only 2 percent of the original e 6million pulses (making it 120,000 pulses all it can withstand)?. Maybe I am interpreting this information the wrong way?If this is as bad as it seems, probably using capacitors for a more reputable brand like EPCOS would do the trick?http://www.digikey.pt/Web%20Export/Supplier%20Content/EPCOS_495/PDF/epcos-apps-mkv-power-caps.pdf?redirected=1I have searched the documentation of data about life expectancy and it's only mentioned in terms of operating hours as a function of operating voltage. It doesn't mention the heavy life-span shortening as in General Atomics caps. What could I be missing(I have asked some quotations to a UK supplier and was given the attached MOQs and prices.)If that life expectancy is really an issue, I have even went a bit extreme and considered building a capacitor made up of a stacked small MKP/FKP 5uF capacitors like thesehttp://www.wima.com/EN/applicguide.htm. They have great current specs and would last "a lifetime". But building it with these WIMA caps would be quite expensive. The best way would be to source smaller rated (5uF/400VDC) caps from China (http://www.ebay.co.uk/itm/10-pcs-High-Voltage-Capacitor-MKP-X2-5uF-AC275V-for-Induction-cooker-repair-/150851828833?hash=item231f783c61). Found a supplier there last here that sells them at $0.8/pc. Building a 100uF/2400V rated capacitor would require me to use about 720 of those. Even ordered 360 of them to stack together square sized modular boards of 12 caps each (3 boards or these would make up a 5uF/2400V cap). 60 boards would make the target 100uF/2400VDC. I know what you're thinking, but this was my initial approach on building a highly reliable capacitor bank, both in discharge current peak, and life expectancy.Commercial TMS equipment makers don't probably get this dumb/or extremeQuote from: dexters_lab on October 03, 2015, 07:17:54 amJust a comment first on the first curve I asked (the charging of the cap). Your patent reference helped me demystify most of what I wondered could be happening at the charging side. In the Magstim 200 since they don't use a reservoir cap, when they charge it they simply leave it there connected to the rectifier, so the charging currents there are easily calculated manually. What keeps puzzling me is your finding of the 33 Ohm resistors inside the charging brick. Why would anyone want to dissipate power inside a bridge rectifier, if it had a charging resistors board before it?. It doesn't make sense to think of HF artifacts at that rectifying stage right? Even imagined it could be some transient extinguishing mechanism, but that's not the way snubbers are made, right? There doesn't seem even to be a temperature sensor on the charging brick around the resistors, and doesn't make sense to be one there as there is no heat dissipation.... so I'll keep wondering about the reason for the 33 Ohm Rs.On the blocking diodes, while I was reading the patent it immediately made sense to me why they use it on the Magstim 200. They use them to literally fry the 2 resistive boards, when the transiently stored energy on the coil, tries to charge the capacitor with reverse polarity. The temperature sensor must be there to confirm that the transient power stored at the coil, occurred. Maybe a Flintstones era or ingenious way of confirming that a pulse really took place? At your maximum measured voltage of 1800V, the capacitor will discharge starting at a peak 24kA through the 0.075 Ohm equivalent resistor made by these boards. That's a peak power dissipation of 1800W that although decays inversely exponentially, will certainly create some heat. Made some calcs: At 185uF/1800V that's 333 J being dissipated in the copper tracks, which is equivalent to an energy consumption of 93mW/h. The equivalent to having a 2000W hair dryer turned on at it's max power for around 0.2s. So this will certainly be spotted by the temperature sensor as a way of confirming that the discharge took place.This is probably a way of detecting failures on the discharge circuit, allowing the detection of a failure in the capacitor? (The voltage sensing in the trigger block should be able to tell that, but probably some redundancy here.)Overall, if you can put your "oscilloscope inductor loop" around that node 2 and capture it would be nice seeing. I'm speculating if the inducted voltage in the loop will likely be similar to the one you measured previously in the discharge, but this time with reverse polarity. Could think a bit more about it, but would be nice if you could confirm that through an easy and safe measurement. If you do it, kindly measure it for two voltage charging levels, like 800V and 1600V for instance. Would be nice to confirm what's happening there.Another nice to have would be the reverse engineering of the discharge board. I'm just a bit curious to know what are the neighbourhoods of that relay. Not exactly sure if a power MOSFET nowadays would be as reliable as such a mechanical relay, probably depends on the discharge currents they can handle . But would be nice to see a diagram of this circuit, the equivalent resistor of the whole in case both wings are connected together, to check how fast they are making the discharge .

author: opusensemble
author_rank: Contributor
timestamp: October 03, 2015, 04:42:15 pm
content: As a curiosity:Something I have attempted last year, in the realm of magnetic stimulation, called "Low Field Magnetic Stimulation" (LFMS) being developed bywww.talmedical.comSome info on it:http://www.elsevier.com/connect/low-strength-brain-stimulation-may-be-effective-for-depressionhttp://mghmcleanpsychiatry.partners.org/7529/novel-treatment-of-depression-shows-immediate-results/Patent US 8303480 B2: (Magnetic field treatment techniques)http://www.google.com/patents/US8303480http://www.prnewswire.com/news-releases/tals-new-rapidly-acting-depression-treatment-awarded-funding-for-clinical-trial-in-prestigious-nimh-rapid-program-239596211.htmlThey basically use the signal amplifiers used in the gradient coils of MRI machines (This page handsomely explains how a MRI machine works:http://www.howequipmentworks.com/mri_basics/), feeding it with a square wave and connecting it to a coil. (It's been observed that depression patients undergoing MRI scans tend to find immediate relief after the scans, and that seems to be attributed to the auxiliary gradient fields used)Checked the specs and according to the signals and powers used, all could be recreated with an audio amplifier, a programmable signal generator and a coil (to achieve the desired electric and magnetic fields they only used one of the MRI amplifiers shown in the rack, at a fraction of its total power, and the cylinder coil apparatus is misleading as it has the coil loops internally all in one of the sides : the application side where the patient places his head. That cylinder has that shape as it has sham sound emitting components for clinical trials. The computer they use is just a for the feeding in the signal to the amplifier and storing patient personal information and treatment sessions).I realized by the time, that although the inventors setup photo looks a bit intimidating, it was incredibly simple to recreate with the same specs, so I decided to create a quick improvised setting. Unfortunately after submitting myself to the generated fields, didn't experienced the relief the authors are claiming, and that I have felt myself when I did a MRI scan 2 years ago. Not sure what I could have done wrong as basically followed the same electrical specs, and the stimulation vibration of 1kHz could be heard in the coil as described.Anyway, was a just a curiosity.

author: dexters_lab
author_rank: Unknown
timestamp: October 03, 2015, 08:31:42 pm
content: QuoteI have not cross-referenced General Atomics ratings to Magstim, but they guaranteed the capacitor for 200,000 full charge cycles. I'll try and dig out where i read that.Not a problem for the monophasic single pulse units, but might not last long for rTMS!Quotenot sure, from what i read from general atomics, the DP series is specifically designed for pulse operationhttp://www.ga.com/series-dp-general-purpose-pulse-capacitorsQuotewow, thats a lot of soldering! Any concerns about all the small increases in resistance on all the connections affecting the overall throughput?Quotenice insight there, personally my feeling is the temp sensor is not for feedback like that but just simply over temperature monitoring. You could work out the discharge far better from the capacitor voltage which it uses for charging. But to be honest, i dont think they check the discharge at allQuoteThe discharge board i can do pretty easy, the relay has the advantage of safety, it's wired normally closed so always wants to keep the discharge resistors in circuit and opened only after the unit is in the Armed mode.I still have the scr triggering board too, i will see if i can find something that attacks the potting compound faster than dichloromethnane, it would be nice to see inside that given it does form part of the HV side of things.

author: opusensemble
author_rank: Contributor
timestamp: October 03, 2015, 11:01:55 pm
content: Quote from: dexters_lab on October 03, 2015, 08:31:42 pmYes, sounds they're specific for pulse applications, but probably with low frequencies. Damn.Quote from: dexters_lab on October 03, 2015, 08:31:42 pmTrue, not proud of it. Wise remark on the connections resistance, didn't remember that. the 100uF/2400V cap would be made of 60 boards, each containing 12 caps (a parallel of 2 series of 6 5uF/400VDC caps). This is equivalent to having 120 parallels of series of 6 caps. Each series has 5 soldering points. I believe it's not problematic as it's a small number of connections across each series (Ben Krasnow used a parallel of series of 5 caps). I speculate that maybe it can add some degradation on the recycling % of the voltage reversal, but I guess it would be marginal.Each series would be rated for 2400V, quite above the ~1800VDC max expected for capacitor operation. What I think can go wrong with it is one of the 120 series to fail.If one series fails through an open circuit, the total capacitance would be reduced, which would have no impact in the circuit leading only to a decrease in the pulse intensity.If on the other hand, one series fails shorted, that could be quite bad. The charging SCR would keep conducting and all the transformer power will dissipated through the charging resistors uninterruptedly. Not good. This is where a temperature sensor could become useful. But probably even better than that would be a voltage sensing circuit, that would shut down the unit through SSRs if the charging SSR failed (leading to the dangerous voltage increase of the discharge cap, dangerously near its rated voltage), or if the discharge cap failed (through short circuit of one its internal cap series), leading to the cap to be permanently discharged despite receiving SCR triggers.This makes me realize of the importance of the voltage sensing circuitry after the 30Meg resistors. More on that below.Quote from: dexters_lab on October 03, 2015, 08:31:42 pmYou're right. It's only for temperature monitoring. Probably the safety feature that was intended to prevent overheating by opening the SSRs, in case of SCR or Capacitor short circuit. Telling from the state of the lost charging board on your broken unit, it was as almost as fast in doing that as the building smoke detectorQuote from: dexters_lab on October 03, 2015, 08:31:42 pmOh, you're right, the normally closed advantage of the relay has a critical advantage. You're good on this. HV MOSFETs won't be a safe choice here.Quote from: dexters_lab on October 03, 2015, 08:31:42 pmThat is the board I was going to talk you about. I'm also curious to see what type of isolation they use to drive the SCRs.And in particular something that I needed to ask you was if you could go the extra mile here and find what circuitry do the 30Meg resistors connect to, both inside the triggering board and the control board.I've been trying to find a way of measuring the discharge cap voltage, and now with the safety concerns for SCR and cap failure detection it seems more important than ever.This is what I have found so far, which makes use of an opto-coupler:http://www.powerguru.org/using-optical-isolation-amplifiers-in-power-inverters-for-voltage-current-and-temperature-sensing/Using that optically isolated voltage sensor ACPL-C87 chip (circuit and datasheet attached) the voltage divider would have to use a resistor (R1) in the range of a few tenths of MegaOhms (like the 30MOhm used in Magstim 200), to avoid overheating and cap discharge. If it works as described it looks like a very neat solution (Only remark is that R1 would have to be rated a few watts and be of good quality, because if it burns and fails shorted it would be the same as having a shorted cap, and a second safety layer, having a separate circuit for sensing the temperature on the charging resistors, would be required after all.)The thing is, in Magstim 200 they must be doing the voltage sensing somehow, even if it's being done "the 80s-way", otherwise they would not be able to show the capacitor voltage level in the LED vu meter. Regardless the method they use, there has to be an electrical isolation barrier somewhere, either in the triggering block, either in the control board. When you can erode the rest of the potting, together with inspection of the control board circuitry that connects to the resistors, it would be very interesting to see how they have done this.

author: dexters_lab
author_rank: Unknown
timestamp: October 04, 2015, 08:54:18 am
content: Capacitor lifetime:This is from the Magstim 2002User manual, the 2002is the updated version of the 200, single pulse monophasic. So i would suspect it's using the same capacitor? I have not been able to find the user guide for the older 200 i have as they probably pre-date when things like this where electronic. I would love to find a copy, if you ever stumble across it, let me know!QuoteDischarge board:Schematic and pictures attachedTrigger Block:Pictures attachedAll a bit speculative until i get rid of the potting compound. The only thing i am fairly sure is the voltage sense, which is tapped off the HVDC+ connection through two 30Meg resistors (you can see the white ceramic and the remains of the red coating). Note there are two separate connections on the socket, the resistors are not in parallel. They connect to the control board but i have not looked any further than that. I will see if i can get the rest of it depotted.

author: dexters_lab
author_rank: Unknown
timestamp: October 04, 2015, 04:24:08 pm
content: here is the scope trace you wantedCh1 is the connection between the Diodes and the resistive PCBsCH2 is on the + wire to the coilWhy the traces are negative going this time, i dont know... anyone care to offer a suggestion?

author: SeanB
author_rank: Super Contributor
timestamp: October 04, 2015, 05:36:45 pm
content: Probing with the scope ground lead you are basically doing it wrong. Take the source wire and make a single turn loop out of it, and then place the ground lead in a loop over it. that way you will measure the current, and not the capacitance of the 2 cables giving you a voltage measurement of the leading edge. If you want to reduce coupling you will need to use a ferrite core ( old LOPT core) with the cables on opposite legs on a bare core clamped together. For better shielding make a single turn shielded loop by using some thin 50r coax, with the end stripped and the centre soldered to the braid at the end of the loop, leaving the braid not connected at the cut end, and insulated so it does not make a shorted turn but shields the cable. If you have some solid coax you can make one by using a length rolled intp a single turn loop and with the centre soldered to the outer wall. Terminate in 50R.

author: dexters_lab
author_rank: Unknown
timestamp: October 04, 2015, 05:40:49 pm
content: Quote from: SeanB on October 04, 2015, 05:36:45 pmthanks Sean, might give that a try while i order some HV scope probes

author: SeanB
author_rank: Super Contributor
timestamp: October 04, 2015, 06:11:10 pm
content: Quote from: dexters_lab on October 04, 2015, 05:40:49 pmTry to get some very good coax to make it, preferably a double screened 100% coverage coax. Basically you are duplicating those really nice EM probes Dave got sent in in a mailbag, or for larger ones you are making a fully shielded loop antenna. The larger one you can simply solder inner to outer and then tyo the outer at the loop end, then, after having a small piece of heatshrink in the loop before soldering, use a blade to cut a small gap in the outer insulation and the shield, while not nicking the insulation or inner, to open the shield so it is not a shorted loop but is still providing electrical shielding.One I made in the 1990's from an article used a small ferrite bead ( grab the ferrite from a CFL ballast nowdays, I used a random ferrite toroid from old radio equipment) with 10 turns wound around it, and terminated into 100R at the bead end, into some thin 93R coax, again from the same scrapped set, with another 100R terminator at the BNC connector at the other end. Resistor fitted in the BNC connector back, as the cable was much thinner than the RG8 it was designed for. Worked well enough to see the ripple current in power supplies, and would fit around power transistor legs as well to see the AC component as well with some reasonable accuracy. Not calibrated, but was good enough for seeing what was going on.

author: opusensemble
author_rank: Contributor
timestamp: October 04, 2015, 09:46:41 pm
content: SeanB, I really admire your suggestions and would like to understand the theory behind it if possible. From what I understood is it working like a transformer? and also why is the coax solution like that, with that resistor values in the ends. Sounds like an RF thing, but would it be possible to see some theory behind it?.

author: opusensemble
author_rank: Contributor
timestamp: October 04, 2015, 09:48:36 pm
content: Dexter, the reason why you're seeing negative traces has to do simply with the relative way you curl the loop around the wire being measured. Whether it loops clockwise or counterclockwise explains the negative or positive polarity of the pulse. But in any case what we're reading when we use a loop it's not the current, but the derivative of the current. For instance, when you posted the first trace of the "current" on the coil, it seemed to have a negative section, but the actual current in the coil of a monophasic pulser never has a negative part because the capacitor never charges negatively (due to the diode bypass):The fact is that what we're seeing in both measurements is not the actual behaviour of the currents, but inducted voltages in the scope loop that are proportional to thetime derivatives(dI/dt) of the currents. (image with theory attached. Ref:http://www.atmo.arizona.edu/students/courselinks/spring13/atmo589/ATMO489_online/lecture_16/lect16_lightning_currents.html).(I believe what SeanD is suggesting is something that will act like a transformer, where primary and secondary currents are in phase - attached image -, and believe that in his suggestion two exact loops of the same size are placing on top of each other. The coax cable from what I understood acts as way of making sure only a perfect loop is in the secondary, but I would like to understand the reasons behind it and the resistors being used if possible for SeanD to elaborate)

author: opusensemble
author_rank: Contributor
timestamp: October 04, 2015, 10:11:53 pm
content: Quote from: dexters_lab on October 04, 2015, 08:54:18 amIf the capacitor operates at 70% power level, on the biphasic circuit the voltage reversal is about 80%, which means a final voltage reversal of 56% (~50%).Using the attached image chart of the "voltage reversal coefficient of life" for the DP series, 50% on the x axis of the attached chart corresponds to a coefficient of about 0.15 (15%), meaning an effective number of biphasic pulses of around 2E6x0.15 = 300,000 pulses.Ref:http://www.rell.com/filebase/en/src/Datasheets/Series-DP-General-Purpose-Pulse-Capacitors.pdfSounds quite bad for rTMS. A standard rTMS treatment takes between 100,000 to 150,000 pulses per patient.Do you think the 720 x 5uF/400VDC capacitor bank (image attached) gets problematic somehow, like on the soldering points? I am a bit discouraged about it. If I stack 60 boards I'll in fact have around 59 soldering points from the main voltage rail up to the last board. It can bet a bit messy electrically if these junctions add enough resistance, but it's hard to believe it's that influencial.If each connection adds 1milliOhm (graph example on join resistances attached.. not sure if it's applicable for this topic) on a 10kA discharge that would mean 10V voltage drop.. If we had that in all the boards (to top the effect). it would mean around ~1% voltage loss, which would be not very problematic, even if it was 5% would not be very problematic. But maybe there are other aspects that will make it fail?Quote from: dexters_lab on October 04, 2015, 08:54:18 amThanks. I have a couple comments on the discharge board, in the images attached, if you can add you thoughtsQuote from: dexters_lab on October 04, 2015, 08:54:18 amThanks, No rush on it, even if it takes weeks to erode with the regular dichloromethane.

author: dexters_lab
author_rank: Unknown
timestamp: October 05, 2015, 08:18:11 am
content: Quotei dont have enough experience to know this sorry, it's just something i thought of that resistive or inductive properties might have an influence on what your trying to do. Hopefully someone else can make comment?QuoteIt does look like they are long ferrite beads on the legs of the resistors to me, that whole arrangement might be to prolong the life of the relay or to keep relay switching noise down. When you adjust the power level down when the cap is charged it will activate this relay to drop the charge. There is little delay between adjusting the dial and the relay operating, it can be clicking in and out a few times a second if you adjust the power level down at just the right speed.The cap across the relay coil looks just like a decoupling cap to me, probably 50 or 100nf, no sign of the snubber diode too unless it's built into the relay or on the main control board.The unusual PCB trace on the discharge board is connected directly to the earth binding post and looks like an earth guard kind of trace but why it only surrounds that part of the board i dont know

author: opusensemble
author_rank: Contributor
timestamp: October 05, 2015, 06:55:29 pm
content: Hi Dexter, Noticed that a friend of mine, fellow-sufferer of depression asked you on your channel if you'd sell him the working unit.I can understand that you intend to keep it, but wanted to ask you the same regarding your broken unit, in case you have no use for it once your tear down is over.Just let me know, even the ABS box would be of good use for me, and I would pay you a decent price.

author: dexters_lab
author_rank: Unknown
timestamp: October 06, 2015, 07:52:58 am
content: Quote from: opusensemble on October 05, 2015, 06:55:29 pmsorry, most of it went to recycling a few weeks ago including the case. I just dont have the space to retain stuff, i already have a number of other items from other videos i need to give away to make some space!I saved the capacitor, HV transformer, discharging board and a few other small random items which i would like to keep for future projects.

author: opusensemble
author_rank: Contributor
timestamp: October 08, 2015, 10:18:08 pm
content: OK, I understand.Please don't forget to post the results of your findings regarding the triggering board, later on when the potting dissolves. I'm really curious on understanding how they perform the galvanic isolation between the gate of the SCR and the control logic. The answer must be under that potting.

author: dexters_lab
author_rank: Unknown
timestamp: October 09, 2015, 07:51:02 am
content: Quote from: opusensemble on October 08, 2015, 10:18:08 pmsure, it is on the back-burner at the moment so maybe a while, i need to find a better hdpe container so i dont loose my dichloromethane to evaporation but i will get around to it at some point.

author: opusensemble
author_rank: Contributor
timestamp: October 26, 2015, 02:35:11 am
content: Hi Dexter, thought I'd share this finding about a Rogowsky coil design with LR or IC integrator, that can be made from a coaxial cable:Ref1:http://www.ee.bgu.ac.il/~kushnero/belles-lettres/Rogowskoil.pdfRef2:https://commons.wikimedia.org/wiki/File:Rogowsky_coil.png

author: dexters_lab
author_rank: Unknown
timestamp: January 07, 2016, 08:42:01 pm
content: just popped up on my ebay...it's the newer version of the 90mm coil that would have worked with my magstim, unfortunately they are not backwards compatible or i would have bought it already... if it was i could have found out how to unlock the 2.8kv potential on my magstimhttp://www.ebay.co.uk/itm/331747989474?_trksid=p2055119.m1438.l2649&ssPageName=STRK%3AMEBIDX%3AIT