Go Down

Topic: Smallest Arduino-compatible IC? (Read 1 time) previous topic - next topic

x2dz

Hi guys,

I'm currently doing a project, which requires me to talk to a RHT-03 via OWI and read/send out IR signals, while being connected to the Internet.

I've got the Internet part down (I'll be using an Electric Imp module to get on the Cloud), the RHT-03 will be talked to via DHT22 library and the IR stuff will be done via the IRremote library.

Basically I'm using the Arduino as a bridge for the RHT-03 and IR Stuff, since it's either too complex or not yet possible to do that directly with the Imp. The Arduino <-> Imp communication will be done via Serial, as shown here - https://www.sparkfun.com/tutorials/397

I've got the whole setup running smoothly on a breadboard, but now I'm thinking about minimizing my design and possibly eliminating some external hardware and hence my question - what Arduino-compatible IC can I use in place of the AtMega328 to do the RHT-03 and IR Stuff for me?

Here are the requirements I initially see towards this IC:

- Arduino-compatible - I would need to use my existing code and programming interface (burn Bootloader and code via USB)

- 5V vs 3V3 - The Electric Imp runs off 3V3 and if the bridge IC is on 3V3 my life would be a lot easier, eliminating the level shifting. There's also the question whether the RHT-03 and IR components will run reliably off 3V3

- Minimal external components - integrated clock and caps would be optimal

- At least 5 IOs - IR RX, IR TX, Serial RX, Serial TX, OWI (RHT-03)

Can anyone suggest an IC for me to try?

Any help would be greatly appreciated!

Thanks in advance!


AnalysIR

I suspect you would be looking at:

Nano
Pro Micro
Mini Pro (If you only need USB for Uploading)

or alternatively the Teensy range

I haven't included the ATTiny range as I guess (You didn't say)  your code size would be too big for this range.
I also assumed you are looking for a finished board (vs a chip)
Visit our Blog about Infrared Remote Control >>>> http://www.AnalysIR.com/blog/  Twitter: @AnalysIR
First Read this PDF=> 10 common pitfalls with Infrared Remote Control >>> http://bit.ly/1cvd0at

x2dz

Hi and thanks for the lightning-fast reply! :)

I was more leaning towards a single-chip approach such as the AtTiny, but I've never personally used those in any of my projects and don't know whether the quoted libraries will work as expected...

All of the 'brains' in terms of code will be on the Imp so I hope I'll be able to fit the communication code into an AtTiny (wild guess).

Would you please propose some chips, which might work?

Thanks!

Robin2

How small is a piece of string?

Do you want a small CPU in a DIP package or can you use a surface mount chip. The surface mount 328 is very small.

If you have the space for a DIP 328 (as in the Uno) I would use that for the simplicity.

I don't know if there are DIP chips that are bigger than the Attiny and smaller than the 328. The disadvantage of the Attiny is that it doesn't have a hardware USART for serial comms - though you can do it with software. And when you move away from the 328 you may run into minor incompatibilities that cause annoyance and waste time while you figure out how to get around them. For example differences in pin numbering.

...R

x2dz

Thanks for the reply!

I can't use SMD components sadly... I'm planning to keep this on a breadboard for the time being.

The 'no hardware serial' isn't an issue - I can always go software for my needs. Furthermore, the baud I'm going to need isn't that high.

I thought about going with the 328 for ease of use, but I'd really like to keep the part count low... And when I think of all of the things the 328 needs to operate optimally - caps, resistors, oscillator, etc.

So basically I need the smallest (in terms of associated part count) non-SMD Arduino-compatible IC, which can run off 3V3 and plug into the IRRemote and DHT22 libraries. Any ideas?

Thanks again to everyone who replied!


CrossRoads

#5
Oct 10, 2013, 08:50 pm Last Edit: Oct 10, 2013, 09:14 pm by CrossRoads Reason: 1
Single 328P will do all this easily:
- Arduino-compatible - I would need to use my existing code and programming interface (burn Bootloader and code via USB)

- 5V vs 3V3 - The Electric Imp runs off 3V3 and if the bridge IC is on 3V3 my life would be a lot easier, eliminating the level shifting. There's also the question whether the RHT-03 and IR components will run reliably off 3V3
>> 3.3V, 8 MHz, no problem.

- Minimal external components - integrated clock and caps would be optimal
>> No problem, Internal 8 MHz oscillator. Two 0.1uF caps on VCC, AVCC pins. Need to change fuse setting in boards.txt.

- At least 5 IOs - IR RX, IR TX, Serial RX, Serial TX, OWI (RHT-03)
>> No problem: Twenty IO available. Hardware UART for Rx, Tx.

Or make an Uno compatible board:
DIP:  https://solarbotics.com/product/kardw/
or Surface mount with one of my cards:
http://www.crossroadsfencing.com/BobuinoRev17/
PL down at the bottom of the page. Populate as needed. Off board FTDI for programming serially, or go bootloaderless with ICSP programming.
http://www.crossroadsfencing.com/BobuinoRev17/
(typed this all up before I saw your no SMD post)

[/img]


Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

giantsfan3

#6
Oct 10, 2013, 09:39 pm Last Edit: Oct 11, 2013, 07:16 am by giantsfan3 Reason: 1
Quote

So basically I need the smallest (in terms of associated part count) non-SMD Arduino-compatible IC, which can run off 3V3 and plug into the IRRemote and DHT22 libraries. Any ideas?


Look into the AtTiny series chips (Attiny45, Attiny85, Attiny44, Attiny84) from Atmel.
Just google "Attiny arduino"

mirith

http://www.kickstarter.com/projects/digistump/digispark-the-tiny-arduino-enabled-usb-dev-board

I have bought one, but I haven't played around with it much yet.  Its sitting on my desk still.

MichaelMeissner

#8
Oct 10, 2013, 10:19 pm Last Edit: Oct 10, 2013, 10:27 pm by MichaelMeissner Reason: 1

http://www.kickstarter.com/projects/digistump/digispark-the-tiny-arduino-enabled-usb-dev-board

I have bought one, but I haven't played around with it much yet.  Its sitting on my desk still.

Well, I too had had my spark sitting on my desk, but last night, I finally got it running, but I can't find some of the shield/headers from the original order.

However, the issue of the small memory and small pin count in the ATtiny85 chips might be an issue for the OP.  There is no hardware serial support either, but software serial might work for the OP.  The digispark is 5v by default.

I was ordering some stuff from tindie.com recently, and I recall seeing the Femtoduino, if the OP wants a pre-built chip, and doesn't want to build it from parts: https://www.tindie.com/products/femtoduino/femtoduino-1/.

Another one is Arduino on a stick: https://www.tindie.com/products/Paulware/arduino-on-a-stick/

x2dz

Hi guys and thanks for all of the replies!

Here's my current sketch size as reported by the IDE just for reference in order to rule out chips, which might not have enough space to store the code: 14,188 bytes (of a 30,720 byte maximum)

Here are my options as I see them, based on the replies:

- 328P running @ 3V3 and 8MHz with internal oscillator -

This is probably my best bet for a couple of reasons:

1) I have a couple of chips laying around, which I can use without purchasing any additional hardware.

2) Programming and support will be optimal since this is the same hardware, which is in the Arduino board and I can use that very board to program the chip. Again, no additional hardware.

3)  Breadboard-friendly and easily available.

My only question is whether the IRRemote and DHT22 libraries will work correctly under 8MHz. Anyone have any ideas?

- Arduino Pro Mini @ 3V3 and 8MHz -

Pretty much the same as above, but is somewhat pricier and I have to order it (not readily available) in order to start working on this project.

The smaller footprint is a welcome plus, though.

Again the question about the IRRemote and DHT22 libraries under 8MHz remains...

- ATTiny? -

I don't really have enough experience with this in order to know the potential bumps I might run into... Some, which come to mind are:

1) 3V3 / 5V? I'd really like to run off 3V3 if possible in order to cut out level shifters from the design.

2) Issues with the IRRemote and DHT22 libraries?

3) ???

Thanks for any and all replies!

awjennin

Not sure if this will help, but..

I've used the ATtiny with arduino on it. Just programmed bootloader to it, and downloaded sketch to it by using "Ardiuno as ISP" (hook up ICSP and hold shift when pressing  "download")
http://hlt.media.mit.edu/?p=1695    <-MIT comes up with awesome stuff

I had to use AVR studio and go in with a ICSP programmer (I used Atmel Dragon) to set the fuses (specifically, turn internal oscillator to 1/8/20MHz, depending on which "board" you selected in arduino (i.e. ATtiny85 w/ internal 1/8/or 20mhz clock))

As long as you select the proper "board", telling the attiny what speed its running at, and you set the fuses properly, I don't see a reason why any library would have problems with it.

You may need to adjust the library's pins though (if it's expecting to use ports/pins that dont exist on the tiny45/85)


the 3.3v/5v operation depends on how fast you want to run the clock (please see page 1 of following summary datasheet)
http://www.atmel.com/Images/Atmel-2586-AVR-8-bit-Microcontroller-ATtiny25-ATtiny45-ATtiny85_Datasheet-Summary.pdf

K5CZ


what Arduino-compatible IC can I use in place of the AtMega328 ... ?

Very small is Cheapduino also. But uses Atmel AVR ATmega8 not ATmega328.
Arduino Uno R3, Arduino Mega 2560 R3, Ethermega (R3), and some Ethernet Shields (R3), Chronodots, TMP36 sensors, DS18B20 sensors, LCDs/TFTs, RS232C to learn and play...

x2dz

Thanks for the replies!

Those two are also viable options (ATTiny / Cheapduino), but what seems easiest to me (since I have a couple of chips lying around) is the 328 @ 3V3. My only question at this point is: has anyone tried out either the IRRemote lib or the DHT one at those specs (8 MHz)?

Thanks in advance!

dc42

#13
Oct 11, 2013, 09:56 pm Last Edit: Oct 12, 2013, 09:24 am by dc42 Reason: 1
If you are using serial comms, then you need to use a crystal or ceramic resonator unless you are prepared to calibrate the clock. Also, it will be easier using a chip that has on-board async serial I/O, which rules out the ATtiny25/45/85. Check out the ATtiny2313, which I think meets your requirements and is smaller than the atmega328p.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

x2dz

Thanks for the reply!

I'll check out the 2313 !

I may just end up going with a full-blown Arduino on a breadboard, but can I run it off 3V3, while keeping the clock @ 16 MHz in order to minimize possible timing issues with the libraries?

Also, why would I need the async serial I/O? Can't I use a Software Serial for this?

Thanks in advance!

Go Up