#avr | Logs for 2016-06-26

Back
[01:00:22] <inflex> given the clocking speed of the USB line, 100pF would be rather influential
[03:32:40] <_ami_> inflex: hmm
[03:33:26] <_ami_> how do we find that which value of caps is suitable for noise reduction with creating distortion in actual data?
[03:34:11] <_ami_> inflex: i have usbasp programmer and it also does not have any capacitor attached with D+/D- lines.
[03:34:30] <_ami_> so its wise to not add any caps on D+/D- lines.
[03:38:03] <inflex> correct
[03:39:16] <_ami_> how do we find that which value of caps is suitable for noise reduction without* creating distortion in actual data?
[03:39:21] <_ami_> inflex: ^
[03:39:28] <_ami_> is there any reference guide for this?
[03:39:58] <theBear> _ami_, simple r-c maths vs acceptable data roundage
[03:40:41] <_ami_> theBear: please explain a bit abt it? i know RC stuffs. its just i am not able to visualize it.
[03:40:45] <theBear> well, simple if you good at calc like i was long long long ago, or err, you know, able
[03:41:29] <inflex> _ami_, for data lines, you don't want capacitance
[03:42:03] <inflex> _ami_, we strive a lot to minimise the presence of it at all on data lines because it causes the edges to be rounded/delayed/skew which causes issues with the receiving end.
[03:42:05] <theBear> _ami_, with usb a guess would say you wanna math/check that you weren't lowpassing/rounding so far that a minimum "bit" still reached the proper on/off voltages (vs just wiggling up and down between them) and also that the "delay" caused by the same rounding wasn't unacceptable
[03:42:53] <theBear> mmm, a quick think suggests most "data lines" have enough parasitic/inherant capacitance to calm any major issues
[03:43:41] <inflex> Agreed.
[03:45:07] <theBear> sup my main man ?
[03:46:42] <inflex> meh... same ole :) Yourself?
[03:46:55] <theBear> meh, stiffer than usual, but aiiight :)
[04:49:26] <_ami_> thanks guys! theBear inflex ^
[04:49:59] <theBear> that's aiiiight
[04:58:54] <inflex> np :)
[05:25:54] <_ami_> :)
[10:50:37] <_ami_> is type B usb female connector easy to solder?
[10:50:57] <_ami_> i want to create v-usb based avr boards
[10:51:18] <_ami_> on perf board
[10:54:16] <theBear> fullsize old square B ? hell yeah it is
[10:54:21] <theBear> they're MASSIVE
[11:18:23] <_ami_> theBear: probably i need to make a hole in perf board for pins
[11:18:49] * _ami_ looks at type B usb female on uno
[11:19:09] <_ami_> make holes*
[11:19:11] <theBear> depends, there a few styles of them out there as i recall
[11:50:43] <Lambda-Aurigae> _ami_, many of them don't line up right but with a small drill you can make them fit.
[12:05:52] <phinxy> i got two transistors working. they're switching a solenoid on and off. However when the microcontroller was reset it would not boot.
[12:06:18] <phinxy> there are two solenoids, one set and one reset so thats why i have two transistors
[12:09:15] <phinxy> When the GND was removed from emitter its now starting
[12:11:15] <Lambda-Aurigae> need a schematic
[12:11:25] <phinxy> reconnected the GND and it runs fine
[12:11:41] <Lambda-Aurigae> do you have a resistor between the output of the microcontroller and the base of each transistor?
[12:12:19] <Lambda-Aurigae> I tend to use mosfets ripped out of old copiers and printers rather than BJTs
[12:12:22] <phinxy> Ok. its nothing special. one resistor from gpio to base. 120Ohm.
[12:12:35] <phinxy> its 2n2222
[12:13:54] <phinxy> ah, the issue is found
[12:14:44] <phinxy> when one of the gpio's are pulled low during boot it goes in to flash mode
[12:14:53] <phinxy> and i dont have more gpios
[12:14:59] <Lambda-Aurigae> oops.
[12:16:09] <Tom_itx> https://www.adafruit.com/products/732?gclid=CMmL-_SSxs0CFQcxaQodxpYMMQ
[12:16:55] <phinxy> is that a shift register?
[12:17:09] <phinxy> i see what it is, but is that what it is called?
[12:18:23] <Tom_itx> http://ww1.microchip.com/downloads/en/DeviceDoc/21952b.pdf
[12:19:46] <Lambda-Aurigae> phinxy, port expander.
[12:19:58] <Lambda-Aurigae> i2c interfaced.
[12:20:08] <Lambda-Aurigae> so you can use those 2 i/o pins to control many.
[12:20:11] <Tom_itx> magic problem solver
[12:20:52] <Lambda-Aurigae> other thing you might use there is an inverter or buffer chip.
[12:21:03] <Lambda-Aurigae> or even a nand or and gate chip.
[12:21:08] <Lambda-Aurigae> as a driver
[12:21:52] <Lambda-Aurigae> or use a uln2803 driver.
[12:23:17] <Tom_itx> i didn't read the whole problem just the immediate out of io one
[12:23:39] <Lambda-Aurigae> Tom_itx, basically his transistor is pulling the line low through the base.
[12:23:56] <Tom_itx> been slacking on my irc reading homework lately
[12:25:06] <Lambda-Aurigae> phinxy, other option is to do a darlington pair with two transistors...eliminates some of that issue.
[12:25:32] <Lambda-Aurigae> Tom_itx, I've been slacking on my homework by being on irc...
[12:27:09] <Lambda-Aurigae> phinxy, so, basically, there are multiple ways to solve your problem.
[12:27:22] <Lambda-Aurigae> simplest in my opinion would be use a FET rather than a BJT.
[12:34:38] <_ami_> Lambda-Aurigae: ok, thanks for the tip.
[12:35:47] <Lambda-Aurigae> or, use the fet to drive the bjt...or make a darlington pair...or use an intermediate driver chip of some kind....or use a port expander.
[12:36:28] <Lambda-Aurigae> get a 7400 of some kind...74ls00 or something..
[12:37:03] <Lambda-Aurigae> tie the inputs of each nand gate together, making a quad inverter..then tie the output of one to the input of a second and you get a buffer...can make 2 buffers on one chip that way.
[12:37:31] <Lambda-Aurigae> or get a 74125 and simplify it a bit..
[12:37:46] <Lambda-Aurigae> that being a quad buffer.
[12:38:43] <Lambda-Aurigae> which I've used for making multiple stk200 avr programmers over the years.
[12:50:13] <Lambda-Aurigae> just ordered some MCP23S18 and MCP23018 samples to play with.
[12:51:03] <LeoNerd> 18?
[12:51:09] * LeoNerd is aware of the 17s
[12:52:03] <LeoNerd> Ohright; these are like 17s but with opendrain rather than pushpull outputs
[12:52:53] <Lambda-Aurigae> yup.
[12:52:57] <Lambda-Aurigae> gonna order some 18 as well.
[12:53:03] <Lambda-Aurigae> err
[12:53:04] <Lambda-Aurigae> 17
[12:56:25] <Lambda-Aurigae> there...mcp23x17 order placed too.
[12:56:31] <LeoNerd> :)
[12:56:52] <LeoNerd> They're OK.. the S versions are a bit weird - they really are an I²C chip with an SPI frontend.
[12:57:01] <Lambda-Aurigae> hehe.
[12:57:05] <LeoNerd> One chip I really like lately is the PCF8563
[12:57:10] <LeoNerd> .. or do I mean 8574?
[12:57:12] <Lambda-Aurigae> pc8574 for me.
[12:57:18] <Lambda-Aurigae> 8 bit i2c port expander
[12:57:20] <Lambda-Aurigae> bit pricy though.
[12:57:43] <Lambda-Aurigae> TI sent me a box with like 4 of every package they make of the pcf8574 and pcf8574a
[12:58:40] <Lambda-Aurigae> the pcf8563 is an RTCC
[12:59:35] <Lambda-Aurigae> with the pcf8574 you can put up to 8 on an i2c bus..
[12:59:51] <LeoNerd> Yah; I forgot which is which, I have both here :)
[12:59:53] <Lambda-Aurigae> add the pcf8574a into the mix and you can add 8 more to the same bus as they have a different base address range.
[12:59:56] <LeoNerd> Yah
[13:00:14] <Lambda-Aurigae> 128 i/o pins from 2 microcontroller i/o pins!
[13:00:15] <LeoNerd> That bit me... my supplier didn't realise the A mattered. I ordered 8574s, they sent me 8574As
[13:00:32] <LeoNerd> The thing I like about them though is the basically configless operation of them
[13:00:37] <Lambda-Aurigae> yeah.
[13:00:44] <LeoNerd> They're *basically* the I²C version of putting a 74'595 on an SPI bus
[13:00:50] <Lambda-Aurigae> you just send a command to set to input or output...and another to read the port...
[13:01:04] <Lambda-Aurigae> they do have an interrupt line too.
[13:01:11] <LeoNerd> Mhm
[13:01:52] <Lambda-Aurigae> years ago I used a bunch of them to make a big light and switch control panel for a guy who was making a 747 flight simulator in his garage.
[13:11:28] <Lambda-Aurigae> ran 8 i/o expanders off a bitbanged i2c connection through the parallel port.
[13:13:06] <LeoNerd> I've never really tried bitbanging I²C - does it really require a 3phase clock?
[13:13:32] <Lambda-Aurigae> no.
[13:15:38] <Lambda-Aurigae> https://www.youtube.com/watch?v=8ZYMrcHm91s
[13:15:44] <Lambda-Aurigae> this guy does it with two buttons.
[13:16:35] <LeoNerd> Hrm.. So how do you clock it then? Does SDA update on rising or falling SCL edge?
[13:16:38] <Lambda-Aurigae> http://www.avrfreaks.net/forum/i2c-master-using-pcs-parallel-port
[13:18:32] <Lambda-Aurigae> http://oh3tr.ele.tut.fi/~oh4mvh/projects.html
[13:21:57] <Lambda-Aurigae> http://oh3tr.ele.tut.fi/~oh4mvh/project/I2C_C.TXT
[13:22:05] <Lambda-Aurigae> code is fairly simple.
[13:23:06] <LeoNerd> So that is threephase clocking
[13:23:24] <Lambda-Aurigae> ok..if you say so...I never heard it called that.
[13:23:47] <LeoNerd> setup SDA, raise SCL, lower SCL
[13:23:48] <LeoNerd> 3 phases
[13:23:55] <Lambda-Aurigae> aahh
[13:24:20] <LeoNerd> As opposed to SPI's two of either setup MOSI & assert SCK, deassert SCK, or vice versa
[13:24:22] <LeoNerd> in some order
[13:26:01] <Lambda-Aurigae> these days I use hardware i2c or spi on chip.
[13:26:18] <LeoNerd> Yah.. you mostly don't need to think about it
[13:26:23] <LeoNerd> It comes up from time to time
[13:27:08] <Lambda-Aurigae> I have a pic16f1454/5/9 project that gives me usb to spi/i2c/spi depending on how it's configured.
[13:27:15] <Lambda-Aurigae> err
[13:27:18] <Lambda-Aurigae> spi/i2c/uart
[13:30:55] <LeoNerd> So, kinda like a bus pirate then
[13:30:59] <LeoNerd> Or an FT232H
[13:31:07] <Lambda-Aurigae> like a limited bus pirate.
[13:31:18] <Lambda-Aurigae> as it only does one at a time..determined at compile time.
[13:35:50] <Lambda-Aurigae> I have another project hanging in the zombie zone to do similar with a pic32 and incorporate all 3 at the same time. Possibly even adding a 4th with another uart.
[13:36:05] <Lambda-Aurigae> lots more processor speed and ram to play buffer and such.
[13:36:17] <Lambda-Aurigae> so I can do more simultaneous endpoints.
[13:36:40] <Lambda-Aurigae> possibly even implement some on-chip scripting
[13:37:07] <LeoNerd> Eh; just get a 232H
[13:37:41] <Lambda-Aurigae> I have an ft245 chip here somewhere.
[13:37:49] <Lambda-Aurigae> used that as an avr programmer for a while.
[13:37:55] <Lambda-Aurigae> there was an avrdude patch for it at one time.
[13:38:44] <LeoNerd> The 245 is nowhere near as powerful
[13:38:52] <Lambda-Aurigae> is also much older..
[13:38:55] <LeoNerd> The 232H's "synchronous serial engine" is where the fun is :)
[13:38:59] <Lambda-Aurigae> I've had it for,,,10 years.
[13:39:13] <Lambda-Aurigae> got it from futurlec.com way back when.
[13:39:33] <Lambda-Aurigae> 232h would require me to buy it where I have pic32 chips sitting here already.
[13:40:16] <Lambda-Aurigae> 232h looks like a nifty toy though.
[13:42:57] <Lambda-Aurigae> cheapest board with that chip on it on amazon is 25 dollars!
[14:00:58] <phinxy> darlington transistor? why not just let the emitter connect to vcc and collector to gnd instead?
[14:01:09] <phinxy> should that not invert the operation?
[14:05:19] <phinxy> ah, so vcc to base and output line to emitter
[14:05:24] <phinxy> that should inverse operation
[15:27:18] <Lambda-Aurigae> phinxy, darlington pair gives you some isolation.
[17:05:26] <phinxy> when driving a transistor from a gpio, is it ok to flip C and E to have the base high instead of low?
[17:05:27] <phinxy> http://tinyurl.com/gv45zfq
[17:06:17] <phinxy> i see that its not ideal but there seems to go double the amperage on the emitter
[17:09:37] <liwakura> phinxy: the diode is int reverse and basically shuts the coil short
[17:10:09] <liwakura> this also explains the red flickering around the coil
[17:10:20] <liwakura> those will be the spikes that will kill your transistor
[17:10:33] <liwakura> phinxy: also, transistors dont work that way
[17:10:35] <phinxy> the diode is in the right way=
[17:10:56] <phinxy> oh wait no it was wrong
[17:11:15] <liwakura> im talking from experience ;P
[17:11:52] <liwakura> phinxy: you might be interested in looking up the difference between NPN and PNP transistors
[17:12:09] <liwakura> you have one, but you want the other
[17:12:27] <liwakura> no idea which one tho, i always mix them up in weird ways
[17:13:05] <phinxy> does a PNP transistor looks like GND to the base?
[17:13:37] <liwakura> not sure where a transistor has GND
[17:13:46] <phinxy> emitter ?
[17:14:38] <phinxy> yeah PNP sounds right
[17:14:47] <liwakura> NPN has the arrow to the emitter
[17:14:50] <liwakura> PNP from the emitter
[17:15:06] <liwakura> also, on PNP, C is the GND
[17:15:24] <Tom_shop> http://www.reuk.co.uk/OtherImages/simple-transistor-circuit.gif
[17:16:11] <phinxy> the issue im having is the microcontroller pin output to the transistor cant be low because on reset the pin has to be high or else it goes in to flash mode
[17:16:54] <liwakura> so, you want to have it high per default, and only pull low when you want to trigger the relais?
[17:17:29] <liwakura> sounds like PNP
[17:18:06] <Tom_itx> http://www.rason.org/Projects/transwit/transwit.htm
[17:18:50] <phinxy> Yes. This NPN works too, unless i reset micro and it gets stuck in flash
[17:19:07] <Tom_itx> last link shows example of both types
[17:19:11] <phinxy> i wonder why NPN is more popular
[17:19:30] <liwakura> i guess bc 1 for on, 0 for off seems more popular
[17:19:30] <Tom_itx> less gate voltage
[17:19:36] <liwakura> and high = 1, and low = 0
[17:19:55] <liwakura> oh, Tom_itx's explanation sounds more professionally
[17:20:11] <Tom_itx> same with mosfets
[17:20:28] <Tom_itx> pchannel require more voltage to switch and not too logic friendly
[17:23:11] <Tom_itx> didn't read it but it looks like that last link explains it rather well
[17:25:23] <Tom_itx> The secret to making a transistor switch work properly is to get the transistor in a saturation state.
[17:28:41] <phinxy> lots of uses for the transistors. regulating voltage on of them?
[17:30:40] <Tom_itx> undoubtedly
[17:35:03] <phinxy> transistor + sinewave source and a couple resistors can make A/C out of DC
[17:35:06] <phinxy> right?
[17:35:20] <phinxy> common emitter amplifier
[17:45:06] <rue_shop3> much better off with pwm
[18:24:25] <inflex> alx741, did you get it to build (OpenBoardView) ?
[18:30:17] <alx741> inflex: I still have to try the recursive cloning and see. Have being a little bit busy so haven't done that yet, will let you know if it works for me though
[18:30:46] <inflex> np, we're in #openboardview now anyhow. Just saw your comment this morning and thought I'd ask/check. Aaaaaah, Monday
[18:30:52] <alx741> haven't consider make a complete new repo for it? or at least make the fork branch the default branch...
[18:31:26] <inflex> ja, I should, problem I have is the lack of git knowledge right now
[18:33:27] <alx741> oh. Well a big immediate improvement will be make your branch the default one in the 'settings section'. I fail to understanding what was going on the first time just becouse i was using the master branch
[18:33:50] <alx741> s/understanding/understand
[18:33:57] <inflex> mm... wonder if I just need to merge it in to master, or if that's not what one should do
[18:34:01] <inflex> (ie, my fork of master)
[18:34:31] <inflex> Now there's some other new things in other people's branches that I want, so that's going to be fun
[18:35:08] <alx741> mmmh i think you could do that... but it will still be a forked repo, so in that case better open a new one (?) or maybe try to extend the original project so it support both win and GNU/Linux
[18:36:21] <alx741> in a way that it can be merged back to the original one as a contribution... in case that is a valid goal for you.. if not, better try a complete new repo (and another name? so it doesn't conflict with the original one)
[18:36:30] <inflex> ugh... so confusing, between just the technicals, there's also the workflow/ethics/proper-behaviour
[18:36:49] <inflex> for now we'r ejust trying to work within the original
[18:37:25] <inflex> sadly we're just having trouble raising the original person (Chlortite), they seem to be AWOL just as all the activity is happening, so no one can get their PR's approved
[18:37:48] <alx741> that's perfect, new repo, offial fork or whatever can be done in the future. But i really encourage you to make your branch the default one...
[18:38:50] <inflex> alx741, done.
[18:40:01] <alx741> aah, so much better
[18:40:37] <alx741> now is harder to take the wrong code and don't know what to do
[18:41:59] <inflex> agreed, thanks for that.
[18:42:13] <inflex> another branch has just added bdv support (as opposed to brd)
[18:42:20] <inflex> so I'm going to try add those changes in to mine as well
[18:43:55] <inflex> big problem I'm running in to is the timezone differences, so don't get a lot of time to collaborate with them
[18:54:16] <inflex> great.. new issue, when I did "git pull" it didn't pull down the new README
[18:55:49] <alx741> `git pull origin master`
[18:56:31] <alx741> oh no wait! the branch is no 'master' is 'inflex-ui-features'
[18:58:04] <alx741> hhmm.... it donesn't work for me either... let me check
[18:59:17] <alx741> ok, i forget to use the upstream remote
[19:00:11] <alx741> i think i know what you're problem is. While in your project dir, do `$ git remote -v` and show me (in #openboardview, we're poluting this channel already)
[19:03:38] <inflex> ok
[19:05:52] <Lambda-Aurigae> phinxy, http://cq.cx/interface.pl#12
[19:06:18] <Lambda-Aurigae> http://cq.cx/interface.pl#14
[20:22:26] <phinxy> <Lambda-Aurigae> one person earlier here today said that the diode in series with the inductor was the wrong direction
[20:22:40] <phinxy> it sure looks like its making a short
[20:23:17] <phinxy> no wait, im mixing up the polarities
[20:24:20] <Lambda-Aurigae> it's supposed to be backwards.
[20:24:35] <Lambda-Aurigae> it catches the reverse emf from the coil.
[20:50:40] <rue_shop3> I LOVE IT WHEN A PLAN COMES TOGETHOR
[20:50:57] <rue_shop3> even if it wasn't really a good plan to begin with and it went thru a lot of revisions
[20:52:11] <rue_shop3> :/ I just built something I cant lift
[20:56:07] <Lambda-Aurigae> hehe.
[20:56:11] <Lambda-Aurigae> I've done that before.
[20:56:22] <Lambda-Aurigae> have also built things that wouldn't fit out through the door.
[21:00:49] <rue_shop3> hehe
[21:02:42] <learath> Was that the plan?
[21:02:48] <learath> it's a strange plan.
[21:04:28] <Lambda-Aurigae> plans,,,,,,
[21:04:53] <Lambda-Aurigae> we don't need no steenkin plans!