Arduino like circuit verification - Page 1
Forum section: electronics / projects

author: Software Dude
author_rank: Contributor
timestamp: December 02, 2017, 08:30:24 am
content: Because I am a software dude, I would like some help verifying this minimal Arduino based circuit which I designed with some changes.It is single AAA cell operated (NiCd or Alkaline), needs to be very energy efficient.Both ATMega and the DC Booster can be configured to any voltage between +1.8v to +5.5v, so I can go higher than +2.2v.Input:4 push buttons, each can wake it up from sleep using Pin Change Interrupt on port D.Once awake the circuit should read which switch woke it,A visible light Phototransistor whose analog value can be read.A tact switch whose on/off value can be read.Output is done by blinking an LED using PWM.The software (including Arduino boot loader) needs to be burned over SPI using USBTinyISP.The FTDI port is for Arduino IDE debugging.Are there errors in the attached design? Anything missing? Anything can be improved?So I finally built it. And now I am having problems communicating with it over serial FTDI as described here.https://goo.gl/RE3Ubo

author: westfw
author_rank: Super Contributor
timestamp: December 02, 2017, 09:53:29 am
content: Should have ore bypass caps. (At least 2)Is your part library correct ? I thought 328pb had only two vcc pins?You could save some space by using internal pull-ups and having your switches go to ground.

author: Software Dude
author_rank: Contributor
timestamp: December 02, 2017, 10:04:16 am
content: Thanks WestfwIndeed, pin 6 is PE1 and not Vcc, I disconnected and I'll use internal pull ups.Where should I place the 2 by pass caps and which values they should have?

author: Peabody
author_rank: Super Contributor
timestamp: December 02, 2017, 04:51:49 pm
content: It may just not be shown in the schematic, but if the device isn't going to be always-on, you need a power switch.

author: Connoiseur
author_rank: Regular Contributor
timestamp: December 02, 2017, 05:25:26 pm
content: Quote from: Software Dude on December 02, 2017, 10:04:16 amPlace them between the Vcc and ground as close as physically possible to the Vcc pin. A good value is 100nF, if using smd, 805 or smaller is better. Make sure they are low ESR and low ESL type; ceramics are preferred for such applications.

author: edgelog
author_rank: Regular Contributor
timestamp: December 02, 2017, 06:33:32 pm
content: Shouldn't AREF be connected to something more than just a cap? To Vcc?

author: sleemanj
author_rank: Super Contributor
timestamp: December 02, 2017, 09:02:23 pm
content: Quote from: edgelog on December 02, 2017, 06:33:32 pmARef is selectable in code, it can be selected to AVcc Internally (and this is the usual way). You only need supply an external voltage there if you will supply an external reference voltage, otherwise it should just get a cap

author: jbb
author_rank: Super Contributor
timestamp: December 02, 2017, 09:03:16 pm
content: I suggest using 2x AAA cells for power. You'll avoid any noise troubles from the boost converter, and achieve better deep sleep current.However, the green LED will probably have a big change in brightness with the battery voltage, which could be a problem for you.I would also consider leaving connections available for a 32kHz crystal as this allows for accurate timekeeping.Note: I haven't reviewed the connector pinouts.

author: rob77
author_rank: Super Contributor
timestamp: December 02, 2017, 09:21:29 pm
content: Quote from: jbb on December 02, 2017, 09:03:16 pmthose microchip boosters have a very low quiescent current, so not a problem. and with 2 AAA cells without a boost converter you might run into undervoltage issues.

author: westfw
author_rank: Super Contributor
timestamp: December 03, 2017, 06:08:14 am
content: QuoteThe same is probably true of one of the GND pins. It looks like you have a 328P part library, even though you're using a 328PB. I think the power pins are the "big" difference (and it's sort-of ok as long as you don't use the GPIO that takes their place), but you might want to check to be sure.

author: IconicPCB
author_rank: Super Contributor
timestamp: December 03, 2017, 06:22:15 am
content: If the switches act aas active low ( you are using internal pull up resistors ) INT0 and INT1 are your only switch state sensing inerupt lines... two lines on four switches... need to implement a wake up interrupt so that any one of four switches will wake it up.

author: Software Dude
author_rank: Contributor
timestamp: December 03, 2017, 06:30:08 am
content: Quote from: IconicPCB on December 03, 2017, 06:22:15 amI am using a Pin Change interrupt, not INT0/1.

author: alexanderbrevig
author_rank: Frequent Contributor
timestamp: December 03, 2017, 11:36:11 am
content: Also make sure you use appropriate xtal. On mobile so can't be bothered to search your PN . As already mentioned, check that you have correct symbol for intended mega. Add decoupling and it looks good to me

author: Software Dude
author_rank: Contributor
timestamp: December 03, 2017, 09:26:04 pm
content: Quote from: Connoiseur on December 02, 2017, 05:25:26 pmIsn't C3 already doing that job (at least for one Vcc pin)?