Show Posts
Pages: 1 [2] 3 4 ... 86
16  Using Arduino / General Electronics / Help me understand what's going on with the reset circuit in this simulation. on: March 30, 2014, 12:57:15 am
I was trying to understand how the Arduino's original reset circuit worked so I could get a better grasp on why it was changed and how those changes affected the behavior of it, when I found this thread:

It mentioned that the voltage would jump up to 10V when DTS went high again.  Come again?

I decided to simulate the circuit, and I confirmed it was true:


But I don't understand what's going on. 

When I flip the DTS to high, both sides of the capacitor are at 5V.  When I flip it to low, the voltage on the reset line drops to 0V momentarily, then rises back to 5V.  The side of the capacitor connected to it is now at 5V, and the side connected to DTS is at 0V.  So far so good.  The capacitor is charged.

But when I flip DTS back to high, the reset line jumps to 10V.  I'm having a hard time grasping why that happens.
17  Products / Arduino Due / Re: Arduino Due 2 SPI Interfaces? on: March 07, 2014, 05:35:08 am
Oh, and that ICSP header that looks like a second SPI port is actually for programming the Atmega16U2 on the board which assists with programming the SAM3X chip through the second USB port.
18  Products / Arduino Due / Re: Arduino Due 2 SPI Interfaces? on: March 07, 2014, 05:30:55 am
The hardware has two separate SPI buses but the Arduino SPI library supports just the first one of them out of the box.

I just took a look at the datasheet, and that doesn't actually appear to be the case.  There is indeed a second SPI port mentioned, but the port it is on does not exist on the 144 pin package.  It only exists on a 217 pin package that isn't yet commercially available.  

Page 48:
11.3 Peripheral Signal Multiplexing on I/O Lines
The SAM3X/A series product features 3 PIO (SAM3A and 100-pin SAM3X) or 4 PIO (144-pin
SAM3X) or 6 PIO (217-pin SAM3X8H(1)) controllers, PIOA, PIOB, PIOC, PIOD, PIOE and PIOF,
which multiplexes the I/O lines of the peripheral set.

Note that some peripheral function, which are output only, might be duplicated within both
Note: 1. This device is not commercially available. Mounted only on the SAM3X-EK evaluation kit.

And then on page 54:
PE28 SPI1_MISO 217 pins
PE29 SPI1_MOSI 217 pins
PE30 SPI1_SPCK 217 pins
PE31 SPI1_NPCS0 217 pins

Indicating those ports are only on the 217 pin package.

So I guess if you can't use multiple devices on a single SPI bus for whatever reason, you've either got to put one of the USARTs into SPI mode or bit bang it.
19  Using Arduino / General Electronics / Re: Why are these diodes able to handle less current at lower PWM duty? on: March 01, 2014, 06:11:53 pm
Thanks guys, makes perfect sense!

Wouldn't running the diode at lower duty cycles give it more time to cool down?

Yes but it would also give it longer to heat up and that heat will build up too quickely and get too hot at the junction and damage it.

I don't see what you're getting at.  Unless there's something else going on that I'm unaware of, a 100% duty cycle should give the diode 10x as long to heat up as a 10% duty cycle.
20  Using Arduino / General Electronics / Why are these diodes able to handle less current at lower PWM duty? on: March 01, 2014, 01:38:16 pm

Page 7 figure 9 shows the forward current handling at different PWM duty cycles.  But the labels seem backwards to me.  Wouldn't running the diode at lower duty cycles give it more time to cool down?

Or is there some kind of initial resistance that drops after a moment, kind of like when you have a MOSFET turned on partway, and the lower PWM duty keeps it in this region?
21  Using Arduino / General Electronics / Re: Suggestions on how to limit current from LiPo battery? on: February 28, 2014, 02:30:42 am
Actually, I think I'll go with the polyfuses after all. 

I got excited about specs and wasn't thinking straight.  The pin headers are only good to 2A or so, so I wouldn't want to exceed that anyway, and my traces are gonna be relatively thin. 

I found some polyfuses which take 0.5s to trip at around 2A, but at 10A will blow in 1/100th of a second.  They can handle a constant current of 1A.  That seems like a decent option.  There's also  one which can handle 1.5A and trips in 0.8s with 3A.  If I use that one I could put one fuse for every two outputs and still have an impressive 4.5A total constant current handling capability across my 6 outputs.  Far more than I ever expect will be needed.
22  Using Arduino / General Electronics / Re: Suggestions on how to limit current from LiPo battery? on: February 27, 2014, 09:37:40 pm
You can buy "battery protection PCBs" (intended for incorporation directly into the cell or battery pack) with a very wide range of overcurrent and undervoltage cutouts quite cheaply from

Yeah, I've seen those, but two problems:

1. They don't list how many they have in stock.  I will need at least a couple hundred of these a year, and I have been waiting forever (literally, like over a year) for them to get more of their high capacity 11.1v LiPos in stock, so I have no faith in their ability to keep these boards in stock either.  (Too bad for them; I had 200 customers last year I would have recommended buy their batteries because the crappy China made CCTV ones  on ebay are often not of the advertised capacity and take forever to charge.  And the one time they did have a battery in stock, they told the customer in New Zealand that they couldn't ship it to him because apparently the USPS won't allow it, and they couldn't be bothered to ship via FedEx.)

2. They're $8-$10 a pop.  I could recommend my customers buy them, but if I include them with my product I have to eat that cost because I can't raise the price of my product by $10 for a battery protection circuit.  It's $195 already.

23  Using Arduino / General Electronics / Suggestions on how to limit current from LiPo battery? on: February 27, 2014, 07:08:16 pm
I'm designing a board which a user may power from a LiPo battery.  There are pins for input and pins for output, and the output pins have mosfets on them to allow for high current devices to be attached.

I'm concerned about the user destroying the board if they accidentally plug a switch into the output pins and turn it on.  But my mosfets can handle 15A peak and 2.7A continuous and I'd prefer not to limit their output too much.  I don't anticipate needing more than 1A on each output, but I'd like to keep the option there.

I don't want to resort to a constant current regulator.  Too costly, too complex..  And I want to make this board as small as possible.  Also, if it's gonna generate a lot of heat, then it's probably not gonna do for this application.

I've been looking at polyfuses on Digikey, and I found these:

But while these can handle higher constant levels of current (1A-3A) they can take over a second to trip at current levels as high as 10A.  That's a long time to be putting 10A through a small switch and 28awg wire.

And again, I need to point out, these boards may be powered by LiPo batteries designed for RC cars which have no overcurrent protection circuity built in and which can definitely put out that much juice.

I'm not dead set against the idea of using some kind of current regulation circuit, but I have no experience with them, and like I said, the board is small.  If the regulator put out a lot of heat it's a no go, so I suspect any simple linear one would be no good.  And I know a 3A 5V switching regulator for an RC car is pretty large, and I suspect a constant current version of the same would be as well., so that may not be an option.  And putting the regulator on a separate board isn't an option either, I've been doing that with my previous board design and my users hate it.  So this board needs to have all the regulation built into it.

So, any suggestions?
24  Using Arduino / General Electronics / Re: Chip Quik - What to buy? on: February 24, 2014, 03:03:58 pm
Oh. and the package I need to remove is a 44 pin TQFP Atmega1284.  I don't own a heat gun capable of heating it sufficiently, and don't want to spend a large sum of money on one which may not do the job.  Besides, this board is already assembled, and I can't see how I could successfully heat the chip enough to remove it without also screwing up some of the tiny capacitors and such I have surrounding it.   Plus I fear I would rip a pad off the board by mistake.  This stuff seems nice and simple and cheap.
25  Using Arduino / General Electronics / Re: Chip Quik - What to buy? on: February 24, 2014, 02:54:57 pm
Riva, you are correct, that special alloy is what I was looking for.  Thanks!
26  Using Arduino / General Electronics / Chip Quik - What to buy? on: February 23, 2014, 10:30:09 am
So I've got some SMD chips on some boards that I need to remove.  I've heard about this Chip Quik stuff, but their website is terrible and I can't figure out what I actually need to order from Digikey to get the job done:

What do I order?  The stuff at the digikey link appears to be normal solder, and the composition listed is that of normal solder, so I'm thinking that isn't it.
27  Using Arduino / Audio / Amplifier power + efficiency on: February 20, 2014, 03:19:41 am
Hey guys, I have a few questions about an amplifier IC:

First, are the filters between the outputs and the speaker necessary?  I found this bit in the datasheet on page 20 which seems to indicate they are not:

The main reason that the traditional class-D amplifier-based on AD modulation needs an output filter is that the
switching waveform results in maximum current flow. This causes more loss in the load, which causes lower
efficiency. The ripple current is large for the traditional modulation scheme, because the ripple current is
proportional to voltage multiplied by the time at that voltage. The differential voltage swing is 2 × VCC, and the
time at each voltage is half the period for the traditional modulation scheme. An ideal LC filter is needed to store
the ripple current from each half cycle for the next half cycle, while any resistance causes power dissipation. The
speaker is both resistive and reactive, whereas an LC filter is almost purely reactive.

The TPA3131/32D2 modulation scheme has little loss in the load without a filter because the pulses are short
and the change in voltage is VCC instead of 2 × VCC. As the output power increases, the pulses widen, making
the ripple current larger. Ripple current could be filtered with an LC filter for increased efficiency, but for most
applications the filter is not needed.

An LC filter with a cutoff frequency less than the class-D switching frequency allows the switching current to flow
through the filter instead of the load. The filter has less resistance but higher impedance at the switching
frequency than the speaker, which results in less power dissipation, therefore increasing efficiency.

Is this referring to the LC filter on the speakers?    And what is "efficiency" referring to here?  The amount of heat generated?  Or the wattage into the speaker?   And if I leave the LC filters off, how will it impact the efficiency?

I also want to know how much power the amp will output and how much it can feed into a particular load.   I need to know how much power I will get with two speakers (BTL) and with one (PBTL) with a 6V and/or 12V supply, and 4 ohm speakers.

If I understand correctly figure 16 on page 11 shows  that with a 6V supply I can push around 5W into a 4 ohm speaker, and with 12V I can push around 20W. 

However, if I switch the amp into PBTL mode...  Will I see any benefit?  It won't raise the voltage, so I assume the load into a single 4 ohm speaker would be the same.  The only "benefit" I imagine would be that I could connect twice as many speakers to that single output channel.  But if I can connect speakers to both channels, and according to that chart each channel could output a max of 42.5W into a 4 ohm speaker w/ 1% THD @ 20V, then that would seem to jive with what the datasheet says about PBTL mode enabling up to 85W of power output.  85W into a 2 ohm load.  So two 4 ohm speakers in parallel.... versus two 4 ohm speakers, one per channel.  No actual increased power output capacity here, right?

Lastly, what's the real minimum load impedance per channel?  The recommended values indicate 4 ohms minimum in BTL mode.  But is that really the minimum?  What is the limiting factor here?  If I input 6V I can put 5W into a 4 ohm speaker, but if I input 12V I can put 20W into a 4 ohm speaker.  Figure 15 and 16 seem to indicate that if I halve the oms, I double the power, so why can't I connect 4 speakers in parallel per channel... a 1 ohm load... with a 6V supply and still have the amp put out 20W?  Is there a limit on the maximum current? 

Ohm's law says: I = P / E
So if I put in 20W and 12V I get 1.7A
and if I input 20W and 6V I get 3.3A

So I guess there is more current flowing... 

But 10W @ 6V is 1.7A.  So could I at least connect two 4 ohm speakers in parallel on each channel when running at 6V?  That would be a 2 ohm load and should be 10W.   

Hm... I just did the calculation for 20V input as well.  42.5W max with a 4 ohm load translates to 2A per channel.   That's much lower than I expected.  But it raises a new question.  With two channels, that's only 4A total.  But on page 7 under "AC ELECTRICAL CHARACTERISTICS" it indicates the overcurrent will trip at 7A.  What's up with that?  Is the 42.5W value an average and the actual power output could be nearly twice that at some points?
28  Using Arduino / Motors, Mechanics, and Power / Re: Mosfet capacitance? on: February 17, 2014, 04:45:38 am
Not a motor driver per se, but I found this interesting chip:

It's a low side driver with 7 inputs and 7 outputs.  Each output is capable of sinking up to 16V and 140mA @ 5V logic input, or 100mA @ 3.3v logic.  There are built in flyback diodes as well, so it's great for driving small motors and relays.   Outputs can be paralleled too, so you could combine two to get 280mA sink capability.

Not sure if it can be PWM'd at high frequency though.  Says 140ns to switch low which indicated a max switching speed of 7mhz, but there's a 3K resistor on the input and if I what I've learned about mosfets recently is correct that would limit the gate current and slow the switching speed drastically, and I had calculated at 3.3v that a 300ohm resistor would supply 9mA to a particular mosfet and that would only be 20x my desired 47khz switching speed in that example which would likely still generate a fair amount of heat.  So a 3K would presunably only allow me to switch around 2x 47khz or 94khz. 

So I don't know which calculation is correct, but the Arduino's standard 490hz PWM would be no problem I'm sure.
29  Using Arduino / Motors, Mechanics, and Power / Re: Mosfet capacitance? on: February 15, 2014, 02:57:55 pm
One of the motors is 150mA, but another larger motor I need to drive requires 1A.

I'm trying to design a board that's flexible.  I could use a motor controller but I was hoping I wouldn't have to dedicate some outputs to a motor.  I guess it would be beneficial to have a motor controller though, seeing as it would allow for braking and reverse.  But I have yet to find a motor controller I like which is small and can handle a wide enough voltage range.  I'd like to be able to run the boards off 3 or 4 AA's (4.5-6v), or 2-4 LiPo cells (7.2v-14.4v).  Found some that can do 8-36v, and some which can do 4.5-11v but none I like yet which are in the sweet spot.

And even if I ultimately did go for a motor controller, I still need some mosfets on the board to PWM some 12v LED bulbs, so I may as well learn what all these parameters mean so I can choose the best one for the job.
30  Using Arduino / Motors, Mechanics, and Power / Re: Mosfet capacitance? on: February 15, 2014, 05:16:46 am
I just found this post in another thread:

I tried to do the calculations...

The gate voltage I think is 0.8v for this mosfet, and the "driver" voltage I assume is the 3.3v from my pin.  That gave a difference of 2.5v and 0.8v for on and off. 

Rather than divide this by the gate resistor, which I didn't know the value for, I divided it by the 9mA max current I wanted the pin to source.  That gave me 278 ohms and 89 ohms.  So I went with 300 ohms, though 270 would probably have been safe.

That then gave me two different gate currents.  83mA and 26mA. 

And with the gate charge of 6.8nC, I got swithcing times of .000000819s and .00000265s.  I averaged these to get .0000017345s.

Then, since my load is inductive I used this equation:
0.5 * voltage * current * switching_time

Which using 12v and 1A, gave me .000010407

Finally I multiplied by 2x my switching frequency of 47khz, and got .978W, which seems like a sane result, and it seems to be within tolerances for the mosfet I was doing the calculations for:

Of course I have no idea if this is actually right.

If it is though, then presumably if I dropped the PWM frequency to half that it would still be ultrasonic and I could handle up to 2A of current.  I'd be pretty happy with that.


Of course why settle for 2A?

This mosfet has half the gate charge.  That translates to faster switching times and half the power dissipated right?  So if my calculations above are correct, and that other FET could handle 2A at 23khz then this one ought to handle 4A.  It's rated for a little over 4A too.  The Rds is a bit higher but I guess that's why the current rating is lower?
Pages: 1 [2] 3 4 ... 86