#avr | Logs for 2016-11-29

Back
[00:27:19] <ewong> Casper: thanks.. will look them up.
[02:06:45] <gjm> ewong: DuPont Jumper Wire
[02:07:31] <gjm> To be exact.
[02:07:31] <ewong> gjm thanks
[02:51:27] <skz81> female-female DuPont Wire :)
[02:58:11] <hnlinn> This circuit: http://turl.ca/rsmgx should produce a 3000 Khz tone on the attached piezo speaker. The program is OK, it registers a 3000 Khz signal on the logic analyzer , but for some reason the speaker won't produce sound.
[03:01:04] <hnlinn> The speaker is rated for the voltage 1.5-3V (1.8V, 14,6mA measured on the collector)
[03:27:11] <Haohmaru> 3000kHz, eh?
[03:28:54] <hnlinn> Haohmaru, sorry, that would be 3 Khz :-)
[03:29:13] <hnlinn> Yes, verified on the analyzer, just a typo.
[03:30:09] <Haohmaru> is that circuit meant to drive a normal magnetic speaker?
[03:30:50] <hnlinn> Haohmaru, it is meant to drive a miniature piezo speaker, also sold as a "passive buzzer"
[03:31:13] <hnlinn> Basically, it is a metal sheet actuated by a magnetic coil.
[03:31:47] <hnlinn> Without any oscillating hardware built-in, like in active buzzers.
[03:32:50] <Haohmaru> is it possible that your "piezo" is not exactly a piezo?
[03:33:21] <hnlinn> They look virtually the same: just a 9mm black plastic cylinder with a hole on the top and two leads out of the button.
[03:33:35] <Haohmaru> afaik there are black cylindrical things that are used to make sounds but they are not all the same, quite not
[03:34:11] <Haohmaru> i know some are based on piezo, others have coils
[03:34:12] <hnlinn> Haohmaru, you are correct, it's a metal sheet speaker, sold as a piezo, because it has the same package.
[03:34:30] <hnlinn> So, it's coil actuated.
[03:34:46] <Haohmaru> ahumz, thus you need a slightly different circuit to drive it
[03:35:40] <hnlinn> Haohmaru, could you give some suggestions on how to proceed here? I'm not exactly an electronics wizard ;-)
[03:36:02] <Haohmaru> neither am i
[03:36:18] <hnlinn> The amps and volts rated for the thing match with the specs though.
[03:37:03] <hnlinn> And the frequency is very close to the optimum in the datasheet.
[03:37:03] <Haohmaru> if you know the part number, you could try finding its datasheet and hope that there is an example schematic in it
[03:38:34] <hnlinn> Haohmaru, got a phone call, ...
[04:47:06] <skz81> <gnom> sorry , this im problem http://gnome.xonotic.in.ua/dl/pwm-sine.zip >> It's already for avr-gcc. You have a good Makefile, just setup the various path to the toolchain.
[04:47:20] <skz81> Will be a bit more tricky when coming to flash your device !
[04:49:00] <skz81> At a first glance, you should be able to compile by changing all the DIR* variables.
[05:29:08] <hnlinn> Haohmaru, lots of calls, thank you for the suggestion, My supplier for these speakers did not deliver a specific part numer and the part itself is alas, unmarked
[05:30:04] <Haohmaru> that's not too cool :/
[05:30:20] <hnlinn> Hang, on, I've got it: http://www.ario.com.tw/comm/upfile/p_131024_02866.pdf
[05:31:40] <hnlinn> Haohmaru, The coil resistance in particular is bang-on, I measured 42.6 Ohms which is well within +/- 5% specifications
[05:33:24] <Haohmaru> no idea then.. but wtf.. the datasheet doesn't actually say what dafuq this thing is.. is it a piezo? a potato? ... huh
[05:33:26] <hnlinn> At 62 dB (according to the graph for freq. response ) the sound should clearly be heard, so that's not the issue.
[05:34:16] <Haohmaru> well it could be broken too, try another one if you have more
[05:34:31] <Haohmaru> i'm just guessing here
[05:34:40] <hnlinn> Haohmaru, I have already tested 2 out of three, none give any response.
[05:35:19] <Haohmaru> then there must be something wrong with the driving circuit
[05:35:28] <hnlinn> I suppose so.
[05:35:34] <Haohmaru> or i don't know what
[05:35:51] <skz81> <hnlinn> The speaker is rated for the voltage 1.5-3V (1.8V, 14,6mA measured on the collector) >> You're really near the max amp ! Is this peak current ? Or a mean value ?
[05:36:26] <hnlinn> skz81, that would be max Amperage.
[05:36:37] <hnlinn> ie. Peak
[05:38:16] <hnlinn> As Measured on the scope. I tried higher vales for the emitter resistor and ramped it up gradually.
[05:38:36] <skz81> okay, they it should do.... -- if it was mean value, it would imply a x2 peak (assuming square wave, 50% duty cycle) ==> could maybe "fry" the buzzer
[05:39:50] <skz81> Also, 2k as a better gain response than 3k, but it's not the problem
[05:40:40] <skz81> Haha ! : "Resonant Frequency ( Hz ) : 2048" >> so "geek" :) :p
[05:40:52] <hnlinn> skz81, true, but for my purpose I specifically ned 3Khz
[05:41:32] <skz81> ok no prob. Read above about optimal response... Was a side-thinking, though
[05:42:09] <hnlinn> skz81, I tried with higher values first, with 10,81 mAmps measured on the peak
[05:42:59] <hnlinn> Not optimal, but the sound should still be within hearable levels.
[05:43:51] <skz81> Agreed. Ho, just thinking : did you try to "flip" them ? Maybe there is some king of polarity ?
[05:44:05] <skz81> kind*
[05:45:09] <hnlinn> The polarity is clearly marked and "should" not matter as it is a coil.
[05:46:55] <hnlinn> coil-based device that is.
[05:47:02] <skz81> U'r right.... If you're sure it's a coil ! Okay, I've no more idea left, sorry. I'm neither an electronics wizard !
[05:48:30] <hnlinn> Well, it does say "coil resistance" on the datasheet
[05:54:28] <hnlinn> skz81, btw, I have looked up the suggested driver circuit, which is a 1 on 1 match to what I have made. So, it's puzzling why it doesn't work
[05:55:01] <hnlinn> skz81, http://www.puiaudio.com/images/whitepaper_transducer_circuit1.jpg
[05:57:17] <hnlinn> The optional diode would reduce the voltage below operating levels, so that is not an option for me
[05:57:46] <skz81> hnlinn, yup... At that point i'm puzzled, too.... Lets wait for a Guru
[05:58:30] <skz81> hnlinn, nope, the diode if for current "escape"/leaking when the transistor switch off
[05:58:53] <skz81> leak out the inductive load
[05:59:11] <skz81> (look closer at the polarity)
[05:59:45] <skz81> It is useful when you drive electromechanical relays for instance
[06:00:02] <hnlinn> Yes, the diode is reverse biased.
[06:00:57] <hnlinn> Well, the transducer is similar in design, so it just might work. The induced current can cause voltage spikes which could fry the coil...
[06:01:41] <GeneralStupid> i use a xmega and want to use it as a SPI Slave... and iam doing anything wront (i dont know what :))
[06:02:14] <skz81> GeneralStupid, do you have a logic analyser ?
[06:02:34] <GeneralStupid> skz81: yes, the data looks good on the wire
[06:02:56] <hnlinn> skz81, I'll try again with the added optional diode, it might just make the crucial difference :-) If it fails catastrophically, I can always replace the parts and try again... They are not that expensive ;-)
[06:03:51] <skz81> hnlinn, for me the diode does nothing when transistor is on, as it should have a negative voltage
[06:04:34] <hnlinn> Because it is reverse-biased. True, but in the off-state, the current discharges to ground.
[06:05:02] <GeneralStupid> hm pull down DIODE?
[06:05:16] <hnlinn> Wait a second... when the transistor is off, there is no path to ground, my bad...
[06:07:06] <skz81> GeneralStupid, what do you mean "pull down diode" ? ON your SPI bus ? WTF ?
[06:07:48] <skz81> cehteh, do you still have the falstad simulation of driving a relay with a leaking diode ? It would help hnlinn to understand its role
[06:07:50] <GeneralStupid> skz81: no. i just wanted to ask what hnlinn is trying to do with a diode.
[06:08:53] <hnlinn> GeneralStupid, protect the circuit from induced current from the coil when the transistor is in the off-state
[06:10:32] <GeneralStupid> skz81: http://paste.ubuntu.com/23552984/ this is everything what i do ATM. but i tried a lot of different stuff-.-
[06:10:39] <GeneralStupid> hnlinn: hm
[06:14:16] <hnlinn> GeneralStupid, skz81, this is the source I used for the info on driving Magnetic Transducers : http://www.puiaudio.com/resources-white-papers-electromechanical-transducers.aspx
[06:17:20] <skz81> http://tinyurl.com/hdjg2em
[06:17:34] <hnlinn> GeneralStupid, skz81, in that article, Circuit option 3 is the best match to my actual circuit
[06:17:50] <skz81> close the switch to load the coil, open it to unload into the diode.
[06:18:00] <skz81> Then, remove the diode, and start again
[06:18:45] <hnlinn> skz81, Thank you! I've reduced the voltage to 3V DC to match my circuit
[06:20:05] <hnlinn> skz81, that humble diode makes a huge difference in the signal !
[06:21:02] <skz81> yup and you can see the current "loops" between coil and diode instead of frying the rest of the circuit :)
[06:21:29] <skz81> but once again, with your little coil, unsure you'll fry anything
[06:21:42] <skz81> (that's why it's optionnal)
[06:22:37] <hnlinn> skz81, true, but it might be just enough to push it over the 15mA max and thereby frying the poor AT...
[06:22:49] <hnlinn> AT => MT
[06:25:32] <hnlinn> skz81, your simulation circuit uses a huge 1H inductor though, so the actual results should be less dramatic ;-) I'm still waiting for my LRC meter to arrive, or I could just meter the thing...
[06:26:21] <skz81> hnlinn, I just pulled a library exemple and added a diode :)
[06:26:22] <hnlinn> The correct sequence is of cource LCR, but you get the idea
[06:26:38] <skz81> didnot tune the value. I agree with you anyway, it's huge
[06:27:02] <skz81> yup got it :)
[06:29:38] <hnlinn> I think I'll submit my last MT to the test *with* the diode and insert a 50k-potmeter just behind the fixed resistor on the collector to safely increase the current.
[06:36:20] <cehteh> skz81: not at hand, just draw anew
[06:38:04] <skz81> cehteh, managed to share a stuff don't worry
[06:44:47] <hnlinn> skz81, GeneralStupid , thank you for your input!
[06:46:28] <GeneralStupid> i did nothing :) skz81 did a good job
[06:47:25] <skz81> :)
[06:47:45] <GeneralStupid> skz81: is there a possibility to check if my SPI configuration is correct? on blackfin there is a "ssync()" makro to be sure everything is written to the registers
[06:49:30] <skz81> GeneralStupid, don't know perfectly SPI, but don't even know the name of that "blackfin" thing...
[06:49:59] <GeneralStupid> skz81: its a DSP from analog devices -.-
[06:50:15] <GeneralStupid> skz81: try to let it speak to my atmel... thats everything, should be simple :D
[06:50:22] <skz81> On AVR your reg is set as soon as the set instruction is executed. *sync() are not useful here, there is nothing that buffers request (like a linux kernel)
[06:50:29] <cehteh> possibly some really stupid error, forgot to set some flag or so?
[06:50:42] <GeneralStupid> cehteh: thats what i expect -.-
[06:50:45] <cehteh> check some example code if it works and then compare with yours
[06:50:54] <cehteh> or read datasheet again
[06:51:28] <GeneralStupid> cehteh: i already tried that -.- fixed a lot "small" issues on that way ...
[06:51:51] <GeneralStupid> maybe USART funcionality is enabled (due to some ASF stuff?!)
[06:52:02] <GeneralStupid> (USART and SPI share that Port)
[06:53:44] <skz81> GeneralStupid, i'm a bit puzzled, no clue from what I read... Yeah, check that UART thing
[06:54:08] <skz81> GeneralStupid, I believed I said it but can't find the sentence back so :
[06:54:29] <GeneralStupid> skz81: oh -.- maybe i was at launch :D sorry
[06:54:39] <skz81> check for the phase/polarity mode of the matser matched what the slave expezcts (see datasheet for that)
[06:55:03] <skz81> <GeneralStupid> skz81: oh -.- maybe i was at launch :D sorry >> You're reaching space, now ? :p
[06:55:42] <skz81> I maybe though of that, but forgot to state it
[06:55:56] <skz81> so, I go for "launch" myself too.
[06:56:02] <skz81> See you @ the ISS !
[06:56:05] <skz81> BBL
[06:56:25] <GeneralStupid> i hope i dont need to use spi there :D
[06:57:11] <hnlinn> skz81, please say hello to her while you are whizzing through space : http://spaceflight1.nasa.gov/gallery/images/shuttle/sts-110/hires/sts110-353-012.jpg
[06:57:37] <hnlinn> mind the speed limit though...
[06:58:05] <hnlinn> You wouldn't want to be pulled over by the space police, eh?
[06:58:26] <specing> hnlinn: she looks like she got some 28000 km/h winds to her face
[07:00:17] <GeneralStupid> i disabled USART but does not help
[07:02:22] <GeneralStupid> maybe iam accessing SPIE.DATA not correctly?
[07:02:28] <GeneralStupid> iam doing SPIE.DATA :D thats all
[07:05:33] <hnlinn> specing, in that case she uses some pretty strong hair gel...
[07:08:08] <specing> hnlinn: rad hard gel
[08:39:56] <GeneralStupid> is the SPIx.CTRL Register Read Only?
[08:42:56] <LeoNerd> I'd hope not, it being a "control" register
[08:47:26] <GeneralStupid> LeoNerd: but i want to verify its values
[10:05:12] <GeneralStupid> SPIE.CTRL is always 0, but it should not.
[10:16:56] <GeneralStupid> my SPI problem is related to ASF i guess.
[10:17:25] <GeneralStupid> i need to call "spi_master_init(&SPIE)" first... IMHO its very confusing to call "MASTER" init for a SPI SLave
[11:33:32] <sebus> Has anyone played with DRAM chips in your project? What will happen, if I won't strobe ras/cas pins on dram but only R/W lines? I want to add extra parallel chip on same addr and data bus without additional 74' stuff for doing memory/io access. Here's the dram chip http://www.alldatasheet.com/datasheet-pdf/pdf/125857/SAMSUNG/KM44C256A.html
[11:34:43] <sebus> Sounds to me like memory should not respond at all, but just want to be sure that I'm correct with this
[11:37:54] <skz81> sebus, can't imagine it working neither
[12:21:57] <arij> hello. i am trying to read atmega32u2 over avr and i receive this error: http://puu.sh/syvWp/ffc4d1eb4a.png
[12:22:04] <arij> any suggestions to get past it?
[12:22:58] <LeoNerd> What do you mean "over avr" ?
[12:23:08] <arij> avr programmer
[12:23:12] <LeoNerd> ISP ?
[12:23:53] <arij> ah, yes, isp
[12:23:57] <arij> like this one: http://puu.sh/syw65/60b2ab5c22.jpg
[12:24:44] <arij> everything is connected to the correct pin. i verified it multiple times
[12:24:50] <Eszett> Leonerd: im not sure what this error means ("cannot set sck period"). Has it to do with the fuses for the external crystal not set? or has it tto do with that the SCLK line is not connected to the ISP programmer?
[12:24:55] <LeoNerd> That message is just the generic "I didn't seem able to talk to it"
[12:24:59] <LeoNerd> Oh ignore that bit
[12:25:04] <LeoNerd> my usbasp *always* says that
[12:25:11] <Eszett> ok?
[12:25:20] <LeoNerd> The problem is just it can't talk to the chip
[12:25:26] <LeoNerd> Check that the pins are in the right places
[12:26:41] <arij> they are in the correct place. ive checked this many times
[12:27:01] <Eszett> desolder the wire from col5 and try it again with every single col
[12:27:11] <Eszett> col4, col6, everything
[23:34:34] <ferdna> guys i really need your assistance i a asus motherboards however i dont get signal on my hdmi port unless i turn my hdmitv first then my pc... do you guys know why?
[23:37:51] <ferdna> hmmm i might have found the solution
[23:38:08] <ferdna> change power settings