Fan control prototype, unsure of some parts of the circuit.

Go To Last Post
34 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi, i was earlier asking about the atmega to do the job, did decide to go 328PB because of fair amount HW pwm's.

today had some time to draw "final" schematic and almost routed the board, but im really unsure of couple of things and might need some help / verification.

 

First of all the fets, how do i choose correct ones after i know amp/voltage requirements, there is so much stuff in those tiny datasheets that im completely lost in that department..

 

i was looking at these fets-> http://www.mouser.fi/ProductDetail/NXP-Semiconductors/PSMN1R0-30YLC115/?...

from what i understand i can drive that one with 5v logic, but can it do 12v +4amps as on/off switch and when i PWM it to drive fan speed on DC voltage incase no real pwm control is available for fan attached.

(first attachement is how i was going to use them in circuit)

 

Second, Does "FTDI FT232RL usb-uart chip" need some kind of external clock? and do i need some extra pin attached if i want to use bootloader, would certainly make sense to have bootloader with this board.

(second attachement)

 

Third thing, im going to use RXD1/TXD1, which are shared pins with MOSI0/MISO0 which i believe are used to program this chip by default, Does this matter since when programmer resets the chip, pins are not initialised for UART anymore, so it shouldn't cause proplems right?

 

and as last, even thought i did not yet finish routing every wire on the board, someone can propably allready say if its just going to fail no matter what, because i did thing X which i should not do.

 

Edit: forgot to say, I'm going to switch crystal for resonator, as I have not read too good stuff about the PB models and crystals.

Attachment(s): 

Last Edited: Wed. Jan 18, 2017 - 09:43 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would use a standard USB connector, and add a 2x3 isp pads, after all how will you put the first bootloader on the chip?   Buy them with a bootloader already programmed? 

 

Jim

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ki0bk wrote:

I would use a standard USB connector, and add a 2x3 isp pads, after all how will you put the first bootloader on the chip?   Buy them with a bootloader already programmed? 

 

Jim

Im going to install this inside PC case, wires directly to motherboard USB header, no connector for typical USB cable is needed, I'm still looking for correct connector to do this, always easier to plug in than plug wire by wire and cause short circuit :P

There is 2x3 connector for programming, left side of the board.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Non speed controllable fans don't like being pwm'd i think you'll find.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JoniS wrote:

i was looking at these fets-> http://www.mouser.fi/ProductDeta...

from what i understand i can drive that one with 5v logic, but can it do 12v +4amps as on/off switch and when i PWM it to drive fan speed on DC voltage incase no real pwm control is available for fan attached.

(first attachement is how i was going to use them in circuit)

That device should be fine. However, I strongly recommend putting a diode across the load to reduce voltage spikes.

 

JoniS wrote:

Second, Does "FTDI FT232RL usb-uart chip" need some kind of external clock? and do i need some extra pin attached if i want to use bootloader, would certainly make sense to have bootloader with this board.

No external clock required. I don't know what bootloader you intend to use, but obviously there needs to be a way to get into it. Holding a pin low at reset is a popular way to do it, but there are other methods.

 

JoniS wrote:
Edit: forgot to say, I'm going to switch crystal for resonator, as I have not read too good stuff about the PB models and crystals.

 

Check that the resonator is accurate enough for your UART baud rate. +/-2% is a recommended tolerance.

 

Kartman wrote:
Non speed controllable fans don't like being pwm'd i think you'll find.

They might not like it, but everyone does it :)

 

With or without PWM, is there a better way?

 

Bob. Engineer and trainee Rocket Scientist.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

donotdespisethesnake wrote:
That device should be fine. However, I strongly recommend putting a diode across the load to reduce voltage spikes.

 

Nice, maybe I just go with these fets then, how can i calculate how much current(@12v) I can make go througth the fet before it overheats and in worst case destroy something else while doing so.

 

Also, I was thinking of adding 5v pullups for the fet gates, to make sure it's open in scenario the avr decides to hang/freeze/broke, this should not cause issues right?(an safety mechanics that if no control is given by avr, fans are at maximium speed to avoid damage on PC end).

 

donotdespisethesnake wrote:
I don't know what bootloader you intend to use, but obviously there needs to be a way to get into it. Holding a pin low at reset is a popular way to do it, but there are other methods.  

 

I haven't still decided, I'm not writing my own atleast at beginning, but instead will go with some known to work, it seems I have to decide which before I can order PCB's to have all needed connections?

 

Kartman wrote:
Non speed controllable fans don't like being pwm'd i think you'll find.

Might not like it yes, but this is what 99% of motherboards do, even when they claim that PWM control is used which is just a lie.(usually those keep PWM pin @5v and just alter input voltage....Great way to break the new magnetic levitation fans btw)

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JoniS wrote:

Nice, maybe I just go with these fets then, how can i calculate how much current(@12v) I can make go througth the fet before it overheats and in worst case destroy something else while doing so.

That's a very good question :) The answer is a bit long and complicated.

 

The theoretical method: take the on resistance (RDSon) at your gate voltage. Use ohms law to calculate the power loss. Use the thermal equations to calculate temperature rise inside the chip. You will need to calculate or measure the heat dissipation of your PCB inside its intended enclosure at max ambient condition. Also, if use PWM, you need to consider extra heat generated as the MOSFET is switched on/off. I don't even know how to calculate that.

 

Practical method: build a prototype (or mock up) and measure the case temperature with a thermocouple. Allow a good margin between case temp and junction temp.

 

Quick and durty method : pick a MOSFET with a package and spec massively overrated for your application. PSMN1R0-30YLC has a continuous drain current of 100A, which is 25x your max needed current. Even with no significant heatsinking, it will probably barely get warm :)

 

JoniS wrote:

Also, I was thinking of adding 5v pullups for the fet gates, to make sure it's open in scenario the avr decides to hang/freeze/broke, this should not cause issues right?(an safety mechanics that if no control is given by avr, fans are at maximium speed to avoid damage on PC end).

That's a good idea, that can handle the case where the AVR is stuck in reset, the GPIOs are set to input, which is a weak high voltage. To handle the case where the AVR sets the GPIO to output and then freezes, you would need an external watchdog (charge pump or timer).

 

Quote:

donotdespisethesnake wrote:
I don't know what bootloader you intend to use, but obviously there needs to be a way to get into it. Holding a pin low at reset is a popular way to do it, but there are other methods.  

 

I haven't still decided, I'm not writing my own atleast at beginning, but instead will go with some known to work, it seems I have to decide which before I can order PCB's to have all needed connections?

You can plan ahead a little, by placing a footprint for a switch or jumper. Also put test pads on unused GPIOs, so you can more easily wire by hand later . If you have the board space, adding footprints is basically free, you don't need to ever place the components.

With the FTDI, you have some spare outputs you can connect to the AVR, so you can signal over USB, e.g. with DTR or CTS. Arduino use this method to reset the AVR and put it into the bootloader. There are also general purpose IOs on the FTDI you can use, but that might require programming the FTDI EEPROM, and also need a special driver on the host side.

 

Quote:

Kartman wrote:
Non speed controllable fans don't like being pwm'd i think you'll find.

Might not like it yes, but this is what 99% of motherboards do, even when they claim that PWM control is used which is just a lie.(usually those keep PWM pin @5v and just alter input voltage....Great way to break the new magnetic levitation fans btw)

Well, it is worth considering. We shipped a design with PWM control of cheap off the shelf DC fan, I did ask the question of the hardware team if the PWM was ok (I wasn't involved in the original design), I'm not sure we ever got a definitive answer. The usual answer: "it worked ok in testing".

 

I would be interested to know if there was a cheap way to create a better output, but I generally leave analog stuff to the experts.

Bob. Engineer and trainee Rocket Scientist.

Last Edited: Thu. Jan 19, 2017 - 10:26 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

donotdespisethesnake wrote:
Quick and durty method : pick a MOSFET with a package and spec massively overrated for your application

 

That is pretty much what i did, as you propably can see, reason to do so was because i didn't know any better.

 

I did do some calculations based on the 4-wire fan documentation, in calculations I assume 6x fans behind single fet, as that is the amount of headers I will split outside the enclosure from the spots you can see 3x headers in row.

  • Power on == 12v12A for 1 second period.
  • Max. Allowed == 12v6A under full speed.
  • My fans == 12v ~1A under full speed.

 

My fans take about 0.15A each, while I've seen some to take 0.4A, never any higher that I can remember, I don't know if at some point fans actually did eat the full 1A to run, or is that just a magical number as an limit so.

 

Maybe I try later do some calculations regarding the fets.

 

funny things is, when I use more amps, fans will move more air making the ambient temperature lower same time most likely, but in same time the fet gets hotter which might be hard to take account too.

 

Last Edited: Thu. Jan 19, 2017 - 11:50 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

donotdespisethesnake wrote:
Holding a pin low at reset is a popular way to do it, but there are other methods.
The Optiboot (Arduino) way of doing it is probably very popular. That is simply to have the bootloader stop and wait for a while (a second or two) at power on to see if anyone is trying to get in touch over the UART. To facilitate this avrdude uses the DTR signal of the FTDI (which is connected to the AVR _reset) to momentarily pull it into reset just before the conversation begins.

 

Unless you have other requirements I think just using Optiboot "as is" would be the way to go as it's very widely used and there's a lot of support available (not least of which is because active user "westfw" on Freaks is the current maintainer of the code). Optiboot used to have the limitation that you cannot use it to send/program EEPROM contents but I think that may have been added more recently than when I last looked. Anyway, maybe you have no requirement for remote programming of EEPROM anyway? The code image itself can always write "default values" to EEPROM if it needs to (often identified by a missing "cookie" value).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JoniS wrote:
donotdespisethesnake wrote: I don't know what bootloader you intend to use, but obviously there needs to be a way to get into it. Holding a pin low at reset is a popular way to do it, but there are other methods.

 

I haven't still decided, I'm not writing my own atleast at beginning, but instead will go with some known to work, it seems I have to decide which before I can order PCB's to have all needed connections?

 

I'd go with the Arduino bootloader as it's the most common one today, for obvious reasons. It is also very well documented, so I'm not going to elaborate any further on this.

 

 

As for your schematic and PCB design: It looks OK to me. Since you didn't include any resistor values, we can't comment on this.

 

About the FTDI: there are schematics in the datasheet, I suggest you use them. Maybe you already do, in this case ignore this. I haven't crosschecked them.

 

About the AVR: you said you're going to change the crystal for a resonator. But in case you don't: the traces between crystal and AVR should be as short as possible and more or less equally long, which could be done better. It should work nonetheless, I've done a lot worse routing in the past with traces about 5cm long and connectors in between. And it still worked flawlessly. But better save than sorry, right?

 

About the MOSFETs: as you're not going to mass produce this thing, I'd go with previously mentioned approach of overrating that part. I guess a few cents more for a better FET don't make much of a difference here. So decide on a package and then take the beefiest one available. The only really important number from the datasheet are the following:

on resistance -> as  low as possible

threshold voltage -> as low as possible, certainly well below 5V, better even below 3V

maximum voltage between drain and source -> well above 12v, but otherwise unimportant

Also, you shold follow donotdespisethesnake's suggestion of adding diodes across the FETs. Use fast types here.

 

-Patrick

 

"Some people die at 25 and aren't buried until 75." -Benjamin Franklin

 

What is life's greatest illusion?"  "Innocence, my brother." -Skyrim

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:

donotdespisethesnake wrote:

Holding a pin low at reset is a popular way to do it, but there are other methods.

 

Anyway, maybe you have no requirement for remote programming of EEPROM anyway? The code image itself can always write "default values" to EEPROM if it needs to (often identified by a missing "cookie" value).

 

At the moment I can't think of any reason I would need remotely write into eeprom, also I should have way more program memory than what I will ever need, so I can always use that to carry the new values if needed. 

 

Optiboot seems to be safe choice then.

 

Hmmn, still aref/avcc to connect and the reset signal from ftdi, I hope the resistors I could not nicely fit anywhere last night have moved to nice positions during the day :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

donotdespisethesnake wrote:
... and measure the case temperature with a thermocouple.

Mouser

FLIR Systems

FLIR ONE Thermal Imaging Attachment

http://www.mouser.com/new/test-measurement/thermal-imagers/flir-one/n-9hnotZ1vdc1j

FLIR Systems FLIR ONE™ Thermal Imaging Camera Attachment for iOS and Android attaches to smartphones and tablets, allowing the device's screen to display thermal images.

...

http://www.mouser.com/new/fluke/fluke-59max/ 

Thermocouples via thermal epoxy are more accurate and are used for sensors in data collection (automotive, industrial, etc)

donotdespisethesnake wrote:
... which is 25x your max needed current.
Could consider a 10mohm Rds NFET.

Or, reduce the max current from 4A to 2A and use a protected FET as a high-side switch; there are a plethora to choose from for 12V (due to automotive, high current, etc)
https://www.fairchildsemi.com/products/power-management/advanced-load-switches/advanced-current-limited-load-switches/FPF2700.html

Tiny 3mm*3mm DFN or easy to prototype SOIC.

For if or when the installer mis-wires or mis-indexes a pump or fan cable; might not be likely that a pump or fan would short.

Would not use a protected FET for fast PWM of a load.

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Thu. Jan 19, 2017 - 03:24 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

pawi777 wrote:
The only really important number from the datasheet are the following: ...
and Cgs for that's a part of RC which will limit the PWM frequency; too high and the FET's Rds will increase.

Could add a gate driver :

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

gchapman wrote:
and Cgs for that's a part of RC which will limit the PWM frequency; too high and the FET's Rds will increase. Could add a gate driver :

 

very good point, I totally forgot.

 

A cheap and easy although not the most elegant way is to use a bus buffer like 74HC(T)245, 74HC(T)244 or 74HC(T)125 or others. The outputs can be paralleled to get more current.

Should you use the HCT versions you can also use them as level translators. You can feed them 3.3V signals and they deliver 5V outputs. I use this when I use FETs with xmegas as they only allow for up to 3.6 VCC.

"Some people die at 25 and aren't buried until 75." -Benjamin Franklin

 

What is life's greatest illusion?"  "Innocence, my brother." -Skyrim

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Wow that's alot of stuff written since my last visit, need to read this couple of times to understand everything :)

 

So far I've managed to do couple of things

  • Route everything I have on board so far
  • Add test points for gnd, USB 5v, VCC(avr), +12v.
  • Caps for ftdi, also the reset signal to avr.
  • Thicker leads than PCB manufactor asks as min.
  • Fet gate pullups

 

And to do///I don't understand list.

  • Diodes to fets(?), how do I connect these?
  • Clock source, mostly unable to find anything I could solder by hand easily.(expect these big crystals which will work or not based on what I have find from internet)

 

Thx everyone!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JoniS wrote:
Clock source, mostly unable to find anything I could solder by hand easily.
Through-hole resonators are common.

SMD resonators are about 4 or 5mm square or rectangle and solder similar to no-lead packages.

There are videos on how to solder QFN; IIRC, HASL PCB, tin device pads, flux, either hot air or heat from soldering iron through an extended pad.

Some USB bridges can supply a clock to a MCU other than during USB suspend; could evaluate these clock frequencies for your application.

http://www.ftdichip.com/Products/ICs/FT232R.htm

http://www.ftdichip.com/FT-X.htm

 

Edit : IIRC

 

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Thu. Jan 19, 2017 - 05:16 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That is simply to have the bootloader stop and wait for a while (a second or two) at power on to see if anyone is trying to get in touch over the UART.

Optiboot is not invoked at power on.  Only when EXTRF is set.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

joeymorin wrote:
Optiboot is not invoked at power on.
Eh? are you saying the BOOTRST fuse is not set? If it is then if you reset or power cycle the AVR then it will jump to BOOTSZ base and execute from there - thus executing Optiboot. Not sure of the point you are trying to make?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JoniS wrote:

Diodes to fets(?), how do I connect these?

 

You connect them between the power pins of your loads so that they do NOT conduct during normal operation.

 

The reason is as follows:

Your load might be inductive. And it is the main property of an inductance to resist any change in current.

It's a bit similar to a long garden hose: The water in it has a certain mass and thus a certain momentum. If it is a rest, you need to push it hard to set it in motion. And once it flows, it doesn't want to stop abruptly.

The reason why current in an inductance behaves this way has nothing to do with momentum, it's a consequence of the magnetic field in it. But the outcome is similar.

 

So now you do PWM, that means you let the current flow for some time and then stop it again. This process is repeated thousands of times per second. And each time you want to stop the current, the inductance will want to keep it flowing. And the diode now allows for this. If it wouldn't, the voltage increased until the current found a way. And this increase (actually decrease when referenced to ground) in voltage is what you want to avoid as it might harm your FET.

 

This whole illustration is contains many oversimplifications and scientific inaccuracies, but I hope it sheds some light on why there should be a diode. I assume the fans already contain diodes. But they're not that expensive so I'd add them anyway.

Better save than sorry, once again.

 

 

JoniS wrote:
Clock source, mostly unable to find anything I could solder by hand easily.(expect these big crystals which will work or not based on what I have find from internet)

 

Maybe a crystal oscillator in a DIP package? They're rather large though. And they're expensive.

http://www.digikey.ch/short/3r255j

 

-Patrick

"Some people die at 25 and aren't buried until 75." -Benjamin Franklin

 

What is life's greatest illusion?"  "Innocence, my brother." -Skyrim

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The di/dt is going to be significant and therefore significant EMI.

Using only as big a FET and as strong gate drive as is necessary eases this problem.

The advantage of a PWM motor is all that is inside the motor, ideally magnetically shielded, with decoupling capacitors.

Two designs? (PWM motors, motor driver ICs)

ON-Semiconductor

ON Semiconductor

Motor Drivers, Brushless

http://www.onsemi.com/PowerSolutions/parametrics.do?id=17060

(Control Type = PWM)

http://www.onsemi.com/pub_link/Collateral/LV8862JA-D.PDF (LV8862JA: Single-phase FAN Motor Driver, 16V max, 1.5A max, input PWM frequency = 20 .. 50KHz

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Thu. Jan 19, 2017 - 06:12 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Eh? are you saying the BOOTRST fuse is not set? If it is then if you reset or power cycle the AVR then it will jump to BOOTSZ base and execute from there - thus executing Optiboot. Not sure of the point you are trying to make?

Poor choice of words on my part, I suppose.

 

  uint8_t ch;
.
.
.
#if !defined(__AVR_ATmega16__)
  ch = MCUSR;
  MCUSR = 0;
#else
  ch = MCUCSR;
  MCUCSR = 0;
#endif
  if (ch & (_BV(WDRF) | _BV(BORF) | _BV(PORF)))
      appStart(ch);

The above is from the latest version of Optiboot on github.

 

Below is how some earlier versions did it:

  uint8_t ch;
.
.
.
  // Adaboot no-wait mod
  ch = MCUSR;
  MCUSR = 0;
  if (!(ch & _BV(EXTRF))) appStart();

In the earlier versions, a bootload operation is initiated only if EXTRF is set i.e. if the reset was initiated by pulling /RESET low.  In the current version, a bootload operation is initiated only if none of the other reset sources (PORF, BORF, WDRF) caused the reset.  This will also try to bootload in the case of a 'software' reset.

 

In both cases, of course, the bootloader code is run after a reset, but a bootload operation is not initiated at power-up.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

pawi777 wrote:
You connect them between the power pins of your loads so that they do NOT conduct during normal operation.

 

I did not really find right key word to search on this subject, besides being fast what other specs do i need from the diode?(there are quite many available when looking digikey catalog).

 

Some USB bridges can supply a clock to a MCU other than during USB suspend; could evaluate these clock frequencies for your application.

It would be 12mhz what the ftdi could output, while that might be good choice and fast enought, i dont know if i feel comfortable losing those few mHz since im not as good programmer as most of you guys here :)

i need to look at the soldering of those small resonators, would rather not go for throught hole variants as everything else is SMD, but will consider it as it might save me couple of grey hairs.

 

 

Also i was looking at the FTDI guidelines, rt232rl datasheet dont show 47pF caps on usb datalines, but newer design's show that its typical to place to those caps, are they needed? aswell as the ferrite bead, which i dont see on my arduino atleast, but its still used in the datasheet from where i could not find any information regarding the specifications of it.

 

 

still managed to squeeze couple of vias from the board by swapping pins, i think on that department its starting to look pretty solid atleast to me.

 

 

Attachment(s): 

Last Edited: Fri. Jan 20, 2017 - 04:39 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JoniS wrote:
Also i was looking at the FTDI guidelines, rt232rl datasheet dont show 47pF caps on usb datalines, but newer design's show that its typical to place to those caps, are they needed?
Yes for EMC and if marketed; no for a prototype.

JoniS wrote:
aswell as the ferrite bead, which i dont see on my arduino atleast, but its still used in the datasheet from where i could not find any information regarding the specifications of it.
There's one paragraph :

http://www.ftdichip.com/Support/Documents/DataSheets/ICs/DS_FT232R.pdf (bottom of page 23)

via

http://www.ftdichip.com/Products/ICs/FT232R.htm

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Was looking at the resonators, this type** does look like it could be hand soldered really easily, atleast the two outer pins.

 

This would need no external capasitors aswell or have I mistaken?

 

** http://www.digikey.com/product-d...

Last Edited: Fri. Jan 20, 2017 - 07:31 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As the description says... "16MHz Ceramic Resonator Built in Capacitor 5pF" (my underlining)

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

valusoft wrote:
As the description says... "16MHz Ceramic Resonator Built in Capacitor 5pF" (my underlining)

 

i take this as no external caps needed, internet is funny place from the fact that you can find anything, so when googling one of the first hits did show this type of resonator with added external caps and i was quite confused and had to ask.

 

im going to take that kind of resonator then, just unsure of the capasitance, im starting to be lost with the clock too, people complain all over places that they dont get +12mhz work with this 328PB model, then again there are boards sold which have this MCU and run 16mhz.

 

Also do i really need 4A diode to protect the fets, these things are huge https://www.digikey.fi/product-d...

 

 

Last Edited: Fri. Jan 20, 2017 - 12:49 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JoniS wrote:
Was looking at the resonators, this type** does look like it could be hand soldered really easily, atleast the two outer pins.
This should work for soldering by hand because the resonator's pad wraps around :

http://www.digikey.com/product-detail/en/abracon-llc/AWSCR-16.00MTD-T/535-9362-1-ND/675774

At Digi-Key, might be able to search on :

Package / Case

3-SMD, Non-Standard

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thx will most definatly check if i could fit that kind of resonator,  since i did shrink the board earlier a bit and move MCU more towards top to even out length of the invidual tach/pwm leads so it will be close, could not find footprint guess i have to make one more.

i assume 22pf is good value for the resonator? atleast datasheet seems to agree with that.

 

still need to fit the diodes too, those i linked earlier are so huge that i need to lay components again on the other side of board to make room.

 

(newest version of the board layout as attachement)

 

 

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JoniS wrote:
... if i could fit that kind of resonator, ...
The datasheet for that Murata CSTCE resonator states how to solder with an iron; also states reflow (hot air) is less stressful on the resonator.

If by soldering iron, extend the pads "a bit" such that heat will transfer from the iron's tip to the resonator's lead frame through the pad's copper.

A reflow soldering station is good to have; in lieu of, a hot air gun from a hardware store.

An advantage of that Murata resonator over the Abracon resonator is the Murata resonator can be washed; that Abracon resonator cannot be washed (not sealed, no conformal coating)

For that Abracon resonator, the Digi-Key datasheet is not current; current datasheet :

http://www.abracon.com/Resonators/AWSCR_MTD.pdf (added was CAUTION on page 3 of 3)

JoniS wrote:
i assume 22pf is good value for the resonator? atleast datasheet seems to agree with that.
The center terminal is the common connection for the 2 capacitors within the resonator.

The Murata datasheet shows how that resonator is connected to MCUs and to GND.

An example for a mega328PB :

https://github.com/watterott/wattuino/blob/master/hardware/Wattuino-Pro-Mini-PB_v10.pdf (grid A2)

via

https://github.com/watterott/wattuino

via

http://www.watterott.com/en/Wattuino-pro-mini-PB-5V-16MHz

 

To answer your question :

http://www.atmel.com/Images/Atmel-42397-8-bit-AVR-Microcontroller-ATmega328PB_Datasheet.pdf

(page 44)

12.3. Low Power Crystal Oscillator

...

For ceramic resonators, the capacitor values given by the manufacturer should be used.

 

Edit : answer

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Fri. Jan 20, 2017 - 07:49 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OFFTOPIC:

 

i might get my hands on reflow oven tomorrow, maybe a too high hopes, but still a small change. Old teacher of mine did contact me that they will clean the old school tomorrow(there is electronic lab) and they could use some more hands, with the benefit of getting stuff that would be getting in the garbage can otherwise, now if i did just know what to look for, besides the stuff i know i need.

 

E: shame no reflow oven, but got function generator(TOE7741), 2x oscilloscope(hung chang 3502, instek GOS-620) and some weird device to me from könig "tv pattern generator F610", honestly i have idea what im supposed to use it for, but it was in unopened box so i did save it from getting trashed.

Last Edited: Sat. Jan 21, 2017 - 02:23 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Finished the design of prototype, now just waiting for the PCB and components to arrive at some point, hopefully soon.

 

Thx everyone for the suggestion and help!

 

 

EDIT: did play little with kicad, redraw the whole schematic and added buffers for PWM signals for safety,  was fun until i realise this is going to be hard without multi layer board...(still more transistors to lay in there if i also want drivers for fet gates...

 

 

 

 

 

Attachment(s): 

Last Edited: Thu. Jan 26, 2017 - 09:45 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

After "long" waiting, because of chinese new year and courier losing the packet, finally got the proto PCB. Now if  i just was on holidays :)

 

Lessons learned about always double and triple checking gerbers and not doing anything else meanwhile.

  • Silkscreen is bit of on some points.
  • Voltage test points I added, covered by solder mask..

 

Overall the board looks fine, apart from my mistakes.

 

If the design itself is working I got updated version almost ready for order, fixing couple of things I did overlook at first time.

 

Attachment(s): 

Last Edited: Thu. Feb 16, 2017 - 10:04 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

May you have joy!

JoniS wrote:
... and not doing anything else meanwhile.
One's life is full of irons in the fire.

JoniS wrote:
... test points I added, covered by solder mask..

Scrape It

by Dr. Howard Johnson. First printed in EDN magazine, April 28, 2008

http://www.sigcon.com/Pubs/edn/ScrapeIt.htm

...

... you must remove some of the solder mask covering the trace. I know six ways to do it: ...

...

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

gchapman wrote:

May you have joy!

JoniS wrote:
... and not doing anything else meanwhile.
One's life is full of irons in the fire.

JoniS wrote:
... test points I added, covered by solder mask..

Scrape It

by Dr. Howard Johnson. First printed in EDN magazine, April 28, 2008

http://www.sigcon.com/Pubs/edn/ScrapeIt.htm

...

... you must remove some of the solder mask covering the trace. I know six ways to do it: ...

...

 

 

thanks, i was kinda unsure if it was vice to just remove the mask off with anything without harming the PCB. 

 

minimal components added to PCB and my programming tool can read the avr so i got atleast something right. Next step is to verify if this resonator will please the avr and give proper clock.

E: resonator is co-operating, based on PWM signal applied to pins, which is what it is supposed to be.

 

E2: Apart from usb comms which i still haven't tested, everything seems to be working as expected even the PD2 pin which needs to be manually driven high to output PWM from OC4B.

Last Edited: Thu. Feb 16, 2017 - 06:26 PM