Author Topic: Arduino like circuit verification  (Read 1966 times)

0 Members and 1 Guest are viewing this topic.

Offline Software DudeTopic starter

  • Contributor
  • Posts: 16
  • Country: il
Arduino like circuit verification
« on: December 02, 2017, 08:30:24 am »
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
« Last Edit: April 05, 2018, 08:58:33 am by Software Dude »
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: Arduino like circuit verification
« Reply #1 on: December 02, 2017, 09:53:29 am »
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.
 
The following users thanked this post: Software Dude

Offline Software DudeTopic starter

  • Contributor
  • Posts: 16
  • Country: il
Re: Arduino like circuit verification
« Reply #2 on: December 02, 2017, 10:04:16 am »
Thanks Westfw
Indeed, 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?
 

Offline Peabody

  • Super Contributor
  • ***
  • Posts: 2007
  • Country: us
Re: Arduino like circuit verification
« Reply #3 on: December 02, 2017, 04:51:49 pm »
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.

 

Offline Connoiseur

  • Regular Contributor
  • *
  • Posts: 104
  • Country: in
Re: Arduino like circuit verification
« Reply #4 on: December 02, 2017, 05:25:26 pm »

Where should I place the 2 by pass caps and which values they should have?


Place 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.
 
The following users thanked this post: Software Dude

Offline edgelog

  • Regular Contributor
  • *
  • Posts: 70
  • Country: se
Re: Arduino like circuit verification
« Reply #5 on: December 02, 2017, 06:33:32 pm »
Shouldn't AREF be connected to something more than just a cap? To Vcc?
 
The following users thanked this post: Software Dude

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3024
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: Arduino like circuit verification
« Reply #6 on: December 02, 2017, 09:02:23 pm »
Shouldn't AREF be connected to something more than just a cap? To Vcc?

ARef 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
~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 
The following users thanked this post: Software Dude

Online jbb

  • Super Contributor
  • ***
  • Posts: 1145
  • Country: nz
Re: Arduino like circuit verification
« Reply #7 on: December 02, 2017, 09:03:16 pm »
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.
 
The following users thanked this post: Software Dude

Offline rob77

  • Super Contributor
  • ***
  • Posts: 2085
  • Country: sk
Re: Arduino like circuit verification
« Reply #8 on: December 02, 2017, 09:21:29 pm »
I suggest using 2x AAA cells for power.  You'll avoid any noise troubles from the boost converter, and achieve better deep sleep current.

those 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.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: Arduino like circuit verification
« Reply #9 on: December 03, 2017, 06:08:14 am »
Quote
Indeed, pin 6 is PE1 and not Vcc
The 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.
 
The following users thanked this post: Software Dude

Offline IconicPCB

  • Super Contributor
  • ***
  • Posts: 1535
  • Country: au
Re: Arduino like circuit verification
« Reply #10 on: December 03, 2017, 06:22:15 am »
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.
 

Offline Software DudeTopic starter

  • Contributor
  • Posts: 16
  • Country: il
Re: Arduino like circuit verification
« Reply #11 on: December 03, 2017, 06:30:08 am »
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.
I am using a Pin Change interrupt, not INT0/1.
 

Offline alexanderbrevig

  • Frequent Contributor
  • **
  • Posts: 700
  • Country: no
  • Musician, developer and EE hobbyist
    • alexanderbrevig.com
Re: Arduino like circuit verification
« Reply #12 on: December 03, 2017, 11:36:11 am »
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 :)
« Last Edit: December 03, 2017, 11:38:25 am by alexanderbrevig »
 
The following users thanked this post: Software Dude

Offline Software DudeTopic starter

  • Contributor
  • Posts: 16
  • Country: il
Re: Arduino like circuit verification
« Reply #13 on: December 03, 2017, 09:26:04 pm »

Where should I place the 2 by pass caps and which values they should have?


Place 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.
Isn't C3 already doing that job (at least for one Vcc pin)?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf