• Electronics and Embedded Programming V2
    1,309 replies, posted
High voltage capacitors are fun. [img_thumb]http://i.imgur.com/giL7o.jpg[/img_thumb] Charged it to 158v with a little switchmode I built.
[QUOTE=ddrl46;34018048]High voltage capacitors are fun. [img_thumb]http://i.imgur.com/giL7o.jpg[/img_thumb] Charged it to 158v with a little switchmode I built.[/QUOTE] [img]http://i51.tinypic.com/23qxyxu.png[/img] I dare you to short it
I always wanted to program microcontrollers and stuff, so I've decided to buy an Arduino. I've checked a few hungarian webshops and all of them only listed AVR-Duino boards. Are those cheap copies or is that the full name of Arduino boards?
[QUOTE=VistaPOWA;34034521]I always wanted to program microcontrollers and stuff, so I've decided to buy an Arduino. I've checked a few hungarian webshops and all of them only listed AVR-Duino boards. Are those cheap copies or is that the full name of Arduino boards?[/QUOTE] They are not officially made by Arduino, although they probably are not cheap copies. This one is basically a part for part copy of an Arduino Mega.
Definitely some sort of copy, though that doesn't necessarily mean they won't work. [img]http://avr.tavir.hu/modules/Asers_Shop/images/productimages/avrduino-uno.jpg[/img]
It [i]is[/i] open hardware...
Huh. So the surge monitoring among other things in my TV is monitored by the firmware. If a spike is detected it flips a bit in the service menu and will not allow the customer to regularly use the set. You can only "fix" it by going into service mode and resetting the error condition. Also, finding support for electronics such as TV's (ad we are not even talking about trying to find the service manual) reminds me of an XKCD comic: [img]http://imgs.xkcd.com/comics/wisdom_of_the_ancients.png[/img] [editline]3rd January 2012[/editline] [QUOTE=Lapsus;34034860][img]http://avr.tavir.hu/modules/Asers_Shop/images/productimages/avrduino-uno.jpg[/img][/QUOTE] Just looking at that fills my nostrils with the scent of cheap chinese circuit boards.
[QUOTE=MIPS;34036234] Justy looking at that fills my nostrils with the scent of cheap chinese circuit boards.[/QUOTE] The salty smell of some of them makes me puke in my mouth a little
My first capacitive discharge welder! [url]http://eagle.undo.it:8083/img/cdwelder_01.png[/url] (See below for more up-to-date schematic) Before I build it, any tips? Notes: The commercial power supply I'm using has over current protection, but I will be removing the electrodes after each weld quickly. (Thyristor will allow current to pass until the short by the electrodes is broken) The potentiometer and MOSFET allow charging the cap to an arbitrary voltage. Using 24V to charge the 20V capacitor until the desired voltage is reached (which should be below 20V). I'm thinking about throwing in a trim pot to limit the maximum voltage to 20V so I don't blow up the cap. [b]Addendum:[/b] Just remembered the 16 ohm resistor in place on the cap charging circuit. That should protect the PSU during welding. Data sheets: [table] [tr][td][url=http://system.netsuite.com/core/media/media.nl?id=5632&c=ACCT126831&h=a38794ec1f83d91348f5&_xt=.pdf]AWSP40-24[/url][/td][td]Power supply[/td][/tr] [tr][td][url=http://www.irf.com/product-info/datasheets/data/irfp2907z.pdf]IRFP2907ZPBF[/url][/td][td]N-Channel MOSFET[/td][/tr] [tr][td][url=http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00000465.pdf]LM393N[/url][/td][td]Comparator[/td][/tr] [tr][td][url=http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00000449.pdf]L78S05CV[/url][/td][td]5.0V Linear Regulator[/td][/tr] [tr][td][url=http://www.vishay.com/doc?93711]50RIA20[/url][/td][td]Thyristor[/td][/tr] [/table] Oh, will I need a bypass capacitor on the comparator between V[sub]cc+[/sub] and V[sub]cc-[/sub] (which is connected to ground)? I don't have much understanding of the internals of a comparator - not sure of how much current is drawn on the inputs, either. [b]Edit:[/b] Okay, I think I understand comparator op amps a little better now. I chose a 100K ohm pull-up resistor for IC2A's output to drive the MOSFET. I've added this to the schematic. [url]http://eagle.undo.it:8083/img/cdwelder_02.png[/url] [b]Edit:[/b] Adjusted some resistor values. Replaced the LM78S05CV with a [url=http://www.murata-ps.com/data/power/oki-78sr.pdf]OKI-78SR-5/1.5-W36-C[/url] DC/DC converter; now I shouldn't have to worry about putting a bulky heat sink on a linear regulator. [img]http://eagle.undo.it:8083/img/cdwelder_03.png[/img] After further inspection, I'm still not sure if I'm using that op amp comparator correctly. How would I add an LED to the comparator's output (to indicate charging) without messing everything up?
I made a counter! :dance: Yeah, maybe not all that impressive, but between learning the trick for the 27MHz counter [it comes through the TV decoder!], a handful of stupid mistakes, and some troubles with code-order [No fuck you Quartus that's not a latch!], it managed to take me a few hours to get working to my satisfaction, so I'm posting it. [video=youtube;MRXs5fvVepQ]http://www.youtube.com/watch?v=MRXs5fvVepQ[/video] And what's a post like this without some code? [code]module countup(CLOCK_27, TD_RESET, KEY, SW, LEDR, HEX0, HEX1, HEX2, HEX3, HEX4, HEX5, HEX6, HEX7); input CLOCK_27; // 27MHz Clock input [3:0]KEY; // Pushbuttons input [17:0]SW; // Switches output [17:0]LEDR; // Red LEDs output TD_RESET; // TV Decoder ~Reset output [6:0]HEX0; // Seven-Segment Displays output [6:0]HEX1; output [6:0]HEX2; output [6:0]HEX3; output [6:0]HEX4; output [6:0]HEX5; output [6:0]HEX6; output [6:0]HEX7; assign LEDR = SW; assign TD_RESET = 1'b1; // Tell the TV Decoder to give us the clock signal reg Stop = 1; // Starting Stopped and Reset so the first press reg Reset = 1; // will start the stopwatch always @(negedge KEY[1]) begin // When Key 1 is pressed if (~Stop && ~Reset) begin // If running, Stop = 1; // Stop end else if (Stop && ~Reset) begin // If Stopped but not Reset, Reset = 1; // Reset end else if (Stop && Reset) begin // If Stopped and Reset, Stop = 0; // Run! Reset = 0; end end reg [17:0]ClockDiv; // 18 bits to match the switches reg Clock = 0; // The clock signal to feed the first counter always @(posedge CLOCK_27) begin // When the 27MHz clock ticks, if (ClockDiv >= SW) begin // If we've hit or passed the set number Clock = ~Clock; // Tick our slower clock [135000 for 1/100] ClockDiv = 0; // Reset the tick counter [100000111101011000] end else if (Stop == 0) begin // If we're not stopped, ClockDiv = ClockDiv + 1; // Count a tick end end wire Carry1; // Wires to carry the output of one counter wire Carry2; // into the next one wire Carry3; wire Carry4; wire Carry5; wire Carry6; wire Carry7; CounterDigit Dig0(Clock, 10, HEX0, Reset, Carry1); // 10000ths CounterDigit Dig1(Carry1, 10, HEX1, Reset, Carry2); // 1000ths CounterDigit Dig2(Carry2, 10, HEX2, Reset, Carry3); // 100ths CounterDigit Dig3(Carry3, 10, HEX3, Reset, Carry4); // 10ths CounterDigit Dig4(Carry4, 10, HEX4, Reset, Carry5); // seconds CounterDigit Dig5(Carry5, 10, HEX5, Reset, Carry6); // 10 seconds CounterDigit Dig6(Carry6, 10, HEX6, Reset, Carry7); // minutes CounterDigit Dig7(Carry7, 16, HEX7, Reset); // 10 minutes endmodule module CounterDigit(ClockIn, Base, HexIn, ResetIn, CarryOut); // Counters! input ClockIn; // Clock Input input [3:0]Base; // What base to count in / What to reset at input ResetIn; // Async Reset input output [6:0]HexIn; // Seven-segment output output CarryOut; // Carry out to next counter reg [3:0]Counter = 0; // Register for actual counting reg [6:0]SevenSeg; // Register for the display always @(posedge ClockIn or posedge ResetIn) begin // When Clock ticks or Reset if (ResetIn) begin // If Reset, Counter = 0; // Reset end else begin // Otherwise, Counter = Counter + 1; // Increment the Counter if (Counter == Base) begin // If the Counter is at maximum, Counter = 0; // Reset the counter CarryOut = 1; // Trigger the next counter end else if (CarryOut == 1) begin // Otherwise, turn the signal CarryOut = 0; // off, it's no longer needed end end case(Counter) // Seven segment decoder 4'h0: SevenSeg = 7'b1000000; // Segments are active low 4'h1: SevenSeg = 7'b1111001; 4'h2: SevenSeg = 7'b0100100; 4'h3: SevenSeg = 7'b0110000; 4'h4: SevenSeg = 7'b0011001; 4'h5: SevenSeg = 7'b0010010; 4'h6: SevenSeg = 7'b0000010; 4'h7: SevenSeg = 7'b1111000; 4'h8: SevenSeg = 7'b0000000; 4'h9: SevenSeg = 7'b0010000; 4'ha: SevenSeg = 7'b0001000; // Hex too! 4'hb: SevenSeg = 7'b0000011; 4'hc: SevenSeg = 7'b1000110; 4'hd: SevenSeg = 7'b0100001; 4'he: SevenSeg = 7'b0000110; 4'hf: SevenSeg = 7'b0001110; default: SevenSeg = 7'b1111111; // Just in case endcase end assign HexIn = SevenSeg; endmodule[/code] I want to say that I'm starting to get the hang of the IDE and SystemVerilog, but I'll just have more trouble with the next new thing I make if I do. :v:
Could you guys recommend me a webshop where I can order a genuine Arduino Uno for cheap, preferably with cheap/free shipping?
[QUOTE=VistaPOWA;34049754]Could you guys recommend me a webshop where I can order a genuine Arduino Uno for cheap, preferably with cheap/free shipping?[/QUOTE] [url]http://oomlout.co.uk/[/url] is quite cheap when shipping to Europe.
[QUOTE=ddrl46;34049779][url]http://oomlout.co.uk/[/url] is quite cheap when shipping to Europe.[/QUOTE] Thanks! I wonder, is [url=http://www.oomlout.co.uk/budget-pack-for-arduino-ardb-p-217.html]this[/url] or [url=http://www.oomlout.co.uk/arduino-experimentation-kit-ardx-p-183.html]this[/url] pack worth it for a beginner? Or should I go with the [url=http://www.oomlout.co.uk/prototyping-bundle-for-arduino-ardp-p-186.html]basic breadboard + Arduino kit[/url]? I never did any electronics, although I understand the principles of charge, static electricity, voltage, amperage, parallel and serial circuits, resistors, Ohm's Law, transformators, inductors, electromagnets, etc (didn't learn about transistors, though)...
[QUOTE=VistaPOWA;34050311]Thanks! I wonder, is [url=http://www.oomlout.co.uk/budget-pack-for-arduino-ardb-p-217.html]this[/url] or [url=http://www.oomlout.co.uk/arduino-experimentation-kit-ardx-p-183.html]this[/url] pack worth it for a beginner? Or should I go with the [url=http://www.oomlout.co.uk/prototyping-bundle-for-arduino-ardp-p-186.html]basic breadboard + Arduino kit[/url]? I never did any electronics, although I understand the principles of charge, static electricity, voltage, amperage, parallel and serial circuits, resistors, Ohm's Law, transformators, inductors, electromagnets, etc (didn't learn about transistors, though)...[/QUOTE] It's better to put together your own kit by buying parts from somewhere else, those kits are usually just a bunch of leds, resistors and a few other components but just never have the parts you need when working on something.
[QUOTE=Night-Eagle;34039303] Before I build it, any tips? [/quote] Firstly why don't you remove the 5V regulator and drive the comparator & thyristor from the 24V, even if the 24V droops somewhat under load it is no major issue and you get much lower RDS with the higher voltage. Also there is a major problem with your transistor, since the comparator is in continuous operation as soon as the voltage across the capacitor starts to drop below the reference voltage Q1 will switch on, which in turn provides current to T1 so it will never turn off. One way to fix this would be to [del]insert an inverter and a MOSFET between the wiper of R1 and the non-inverting input of the comparator so that the reference voltage is disconnected while S1 is closed, this will allow it to discharge fully and Q1 will remain off until S1 is opened.[/del] Just put a MOSFET with the drain connected to the gate of Q1 and the source to ground.
Took apart a Panasonic CRT TV today, lots of good stuff and dust inside. [img_thumb]http://i.imgur.com/1sMat.jpg[/img_thumb] [img_thumb]http://i.imgur.com/woJkO.jpg[/img_thumb] [img_thumb]http://i.imgur.com/PcXQS.jpg[/img_thumb] [img_thumb]http://i.imgur.com/e7a6E.jpg[/img_thumb] Lets see what we can do with this flyback...
Oscilloscope gogo
Trying to get my Digital to Analog converter working. All I hear is static but at least I can change the pitch of the static :p
[QUOTE=thisBrad;34054726]Trying to get my Digital to Analog converter working. All I hear is static but at least I can change the pitch of the static :p[/QUOTE] Atleast you know that your DAC has a good bandwidth. (If its like white noise)
Am I supposed to add some sort of filter on the DAC output or connect the speaker directly to it? :|
[QUOTE=thisBrad;34058927]Am I supposed to add some sort of filter on the DAC output or connect the speaker directly to it? :|[/QUOTE] You're asking questions without providing sufficient context. We don't know anything about this DAC or how it's being used.
[QUOTE=ROBO_DONUT;34060874]You're asking questions without providing sufficient context. We don't know anything about this DAC or how it's being used.[/QUOTE] Well, currently I'm just experimenting so I can learn. I bought an [URL="http://ww1.microchip.com/downloads/en/DeviceDoc/22248a.pdf"]SPI 8-bit DAC[/URL] to see if I could get it working. I got the SPI interface working, and then I fed the arduino PCM data which passed it to the DAC to convert to an analog signal which I connected directly to a speaker. All I could hear from the speaker was noise which changed as the audio progressed. I'm sure there are many factors that are not making it play correctly, but I was just wondering if I'm supposed to do anything after the analog signal is generated before connecting to a speaker.
[QUOTE=Chryseus;34051850]Firstly why don't you remove the 5V regulator and drive the comparator & thyristor from the 24V, even if the 24V droops somewhat under load it is no major issue and you get much lower RDS with the higher voltage. Also there is a major problem with your transistor, since the comparator is in continuous operation as soon as the voltage across the capacitor starts to drop below the reference voltage Q1 will switch on, which in turn provides current to T1 so it will never turn off. One way to fix this would be to [del]insert an inverter and a MOSFET between the wiper of R1 and the non-inverting input of the comparator so that the reference voltage is disconnected while S1 is closed, this will allow it to discharge fully and Q1 will remain off until S1 is opened.[/del] Just put a MOSFET with the drain connected to the gate of Q1 and the source to ground.[/QUOTE] Just so you know, I'm [url=http://forum.allaboutcircuits.com/showpost.php?p=440119&postcount=5]cross-posting[/url] this project on another forum. The 5V buck converter is removed! Makes sense. About T1 never resetting: I know about this, and it doesn't seem to be too big of a problem - the first thing you do after you do a spot weld is remove the electrodes, which breaks the current to reset the thyristor. The edge case where extended contact is maintained is why R2 has such a high power rating. I'm assuming that this is safe operation. Current schematic: [img]http://eagle.undo.it:8083/img/cdwelder_05.png[/img] I'm currently debating whether T1 should be on the other side of the electrodes - because if I decided to weld something that is grounded, it would seem this would cause premature dischargulation :downs:
[QUOTE=thisBrad;34060955]Well, currently I'm just experimenting so I can learn. I bought an [URL="http://ww1.microchip.com/downloads/en/DeviceDoc/22248a.pdf"]SPI 8-bit DAC[/URL] to see if I could get it working. I got the SPI interface working, and then I fed the arduino PCM data which passed it to the DAC to convert to an analog signal which I connected directly to a speaker. All I could hear from the speaker was noise which changed as the audio progressed. I'm sure there are many factors that are not making it play correctly, but I was just wondering if I'm supposed to do anything after the analog signal is generated before connecting to a speaker.[/QUOTE] You need to couple the signal through a capacitor to eliminate DC bias. Failure to do this may destroy whatever load you're driving, unless the load is specifically designed to tolerate some DC bias. Second, you're really pushing the limits of the chip if you're driving the speaker directly. For some 32ohm headphones it will [i]barely[/i] work, provided the signal has an amplitude <0.8V, but if you try to drive an ~8ohm speaker, you'll destroy the chip. I [i]highly[/i] recommend putting an amplifier/buffer/follower between the DAC and the load. The DAC is not designed to drive loads directly. Finally, there are tons of different possible PCM audio formats. You need to make sure you get the bit ordering right. If the device takes one bit ordering and you provide the opposite, the output will likely sound like noise.
Since everyone likes TV teardowns: [img]http://i.imgur.com/adRMy.jpg[/img] [img]http://i.imgur.com/hHNdT.jpg[/img] [img]http://i.imgur.com/v4bpI.jpg[/img] [img]http://i.imgur.com/RyHe1.jpg[/img] [img]http://i.imgur.com/LIFLD.jpg[/img] [img]http://i.imgur.com/aXXTC.jpg[/img] [img]http://i.imgur.com/r4YcG.jpg[/img] [img]http://i.imgur.com/6AdyK.jpg[/img] [img]http://i.imgur.com/HEzDo.jpg[/img] [img]http://i.imgur.com/nPzah.jpg[/img] [img]http://i.imgur.com/YM31V.jpg[/img] [img]http://i.imgur.com/mkrmu.jpg[/img] [img]http://i.imgur.com/ZsEDn.jpg[/img] [img]http://i.imgur.com/vYos6.jpg[/img] [img]http://i.imgur.com/QiE22.jpg[/img] [img]http://i.imgur.com/1b5Sh.jpg[/img] [img]http://i.imgur.com/OO3qP.jpg[/img] [img]http://i.imgur.com/hWLAq.jpg[/img] [QUOTE=Night-Eagle;34060978]post[/QUOTE] T1 is fine where it is. Your don't need a fancy ass gate drive circuit, the peak gate current should not exceed 2.5A so just use a switch. Everything else is fine. Oh and in that thread on the other forum you listed the 2N6027 as the SCR, that is a Programmable Unijunction Transistor (PUT) and totally different from a SCR.
[img]http://media.tumblr.com/tumblr_lsxz6sPN581qzozj1.gif[/img] RIP Photonicinduction In case you're not aware he has closed his youtube channel for some unknown reason.
That man was a genius. I wonder what happened to him. Apparently, he said on his facebook page, that he'd make a vid about explaining it all very soon... [b]Edit:[/b] This is where I got that information from: [url]http://www.youtube.com/watch?v=_mceUO6GVhw[/url] One of the youtube comments on that vid: [quote] Found a few posts on Facebook from "Photonicinduction Hydron" which seems to be a genuine profile as it dates back to well before he disappeared and he has made a couple of posts on the walls of groups telling* him to come back. For example: Add "facebook (dot) com (slash) permalink (dot) php?story_fbid=" in front of each URL below "It got too big, I lost my way, I will do a vid explaining all :(" - 334913043199361&id=26654160670*3172 "I closed it" - 303171219724915&id=30314671306*0699 [/quote]
When I read RIP I at first thought he died or something
[QUOTE=DrLuke;34076266]When I read RIP I at first thought he died or something[/QUOTE] It would not totally surprise me...
[QUOTE=benjojo;34076609]It would not totally surprise me...[/QUOTE] Exactly my point
Sorry, you need to Log In to post a reply to this thread.