A "simple" circuit

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
dragonuv
 
Posts: 235
Joined: Tue Dec 04, 2007 1:22 pm

A "simple" circuit

Post by dragonuv »

Hi, this year I have to hand in a project in the C language and I thought about doing the battleships game with electronics.
I thought about adding a feature of having 2 battleships boards that can play remotely from a network.
Because buying another arduino is a little bit expensive, I thought about buying a microcontroller, a few pushbuttons and a few leds and soldier it to a pcb.
My question is that wether such thing is possible, and how can i make such a board that connects to the usb, and reacts to user inputs like the arduino does using Serial.digitalread(number)

thanks very much for those who help :)

User avatar
Franklin97355
 
Posts: 23910
Joined: Mon Apr 21, 2008 2:33 pm

Post by Franklin97355 »

An Arduino will cost you less than all the parts and assembly and you will know it will work when you get it.

dragonuv
 
Posts: 235
Joined: Tue Dec 04, 2007 1:22 pm

Post by dragonuv »

franklin97355 wrote:An Arduino will cost you less than all the parts and assembly and you will know it will work when you get it.
hehe, nice thinking. but still want to learn how to do it without the arduino.
any suggestions?

The_Don125
 
Posts: 373
Joined: Tue Mar 06, 2007 11:51 pm

Post by The_Don125 »

Well, in parts, you'll need the same microcontroller and clock crystal that the arduino has at the very least, plus whatever parts you need for your project. Then, you'll need either the USB to serial converter used on the arduino (a surface mount chip) or a USB to serial converter cable (cost is usually between $15-$20) so that you can use the PC to talk to the microcontroller via USB.

You'll need to use your existing arduino to program the arduino firmware into the new chip first, but after that, the two things should share similar functionality.

User avatar
westfw
 
Posts: 2008
Joined: Fri Apr 27, 2007 1:01 pm

Post by westfw »

Because buying another arduino is a little bit expensive
How about one of the cheaper versions of the Arduino? The BoArdunino kit is about half the price of a full ardunio, and an MDC "Really Bare Bones Board" kit is about 1/3 the price. Or you could make a serial single sided PCB on your own, and populate it with just the bits you need...

dragonuv
 
Posts: 235
Joined: Tue Dec 04, 2007 1:22 pm

Post by dragonuv »

thanks people, my intention was to load to it only 1 program, and thats it.
i do not want a microcontroller as smart as arduino or boarduino, something like TV-B-Gone, it has only one program and it doesnt have to be reprogrammed, but it needs to have a usb connector because it needs to have input/output.

do any of you have a website that explains how to do that?
thanks :)

p.s.
i dont think i'm allowed to use the arduino/boarduino, i need to use something i made on my own.

The_Don125
 
Posts: 373
Joined: Tue Mar 06, 2007 11:51 pm

Post by The_Don125 »

For learning how to use the AVR microcontroller family, browse around this website & forum a bit, but also check out http://www.avrfreaks.net

As for what microcontroller you want, the Arduino's microcontroller is about as small as you can get to be able to have USB functionality without a converter cable/chip. If you get a USB to serial converter cable though, you can probably check out the ATtiny85. Unfortunately, you'll also need a programmer to get the code into the chip for the first time, since I think the Arduino is only meant to program the ATmega168.

hgds
 
Posts: 79
Joined: Sat Aug 23, 2008 12:14 am

Post by hgds »

The_Don125 wrote:For learning how to use the AVR microcontroller family, browse around this website & forum a bit, but also check out http://www.avrfreaks.net

As for what microcontroller you want, the Arduino's microcontroller is about as small as you can get to be able to have USB functionality without a converter cable/chip. If you get a USB to serial converter cable though, you can probably check out the ATtiny85. Unfortunately, you'll also need a programmer to get the code into the chip for the first time, since I think the Arduino is only meant to program the ATmega168.
IF he used serial for input output then he may be able to use the attiny13v-10PU because it is cheaper, but has a little less memory, it shoudl work though.

The_Don125
 
Posts: 373
Joined: Tue Mar 06, 2007 11:51 pm

Post by The_Don125 »

IF he used serial for input output then he may be able to use the attiny13v-10PU because it is cheaper, but has a little less memory, it shoudl work though.[/quote]

It will all depend on how many I/O ports are needed. Since the project is a "battleship game", I think more than the 5 pins a tiny13 can offer will be needed (and those 5 pins will be cut down to 3, since 2 are needed for serial communication (and I'm not even sure the tiny13 supports UART communication))

hgds
 
Posts: 79
Joined: Sat Aug 23, 2008 12:14 am

Post by hgds »

The_Don125 wrote:IF he used serial for input output then he may be able to use the attiny13v-10PU because it is cheaper, but has a little less memory, it shoudl work though.
The_Don125 wrote: It will all depend on how many I/O ports are needed. Since the project is a "battleship game", I think more than the 5 pins a tiny13 can offer will be needed (and those 5 pins will be cut down to 3, since 2 are needed for serial communication (and I'm not even sure the tiny13 supports UART communication))
Well then, maybe a ATtiny2313V-20PU woudl work, its not too big, its alot bigger but still, it woud work, as im sure you could fit it somewhere. Maybe a usb interface chip and a usb jack.

User avatar
keen101
 
Posts: 52
Joined: Wed Apr 23, 2008 8:51 pm

Post by keen101 »


Fratsen
 
Posts: 6
Joined: Thu Oct 16, 2008 11:15 am

Re: A "simple" circuit

Post by Fratsen »

If you want to go dirt-cheap on the hardware and you think the ATTiny85 has enough I/O ports, then have a look at my 1-key-keyboard. It cost me about 2 Euro to make.

http://blog.flipwork.nl/?x=entry:entry081009-142605

- No need for crystal because it uses the internal oscillator on the ATTiny85
- It implements Objective Development's AVR-USB so no need for USB to serial converter
- Since I use only 1 switch, 3 I/O's are still free

User avatar
waldo2020
 
Posts: 7
Joined: Thu Oct 23, 2008 4:16 pm

Re: A "simple" circuit

Post by waldo2020 »

what about building your own arduino?
well just an atmega168, reset resistor, 7805 regulator and crystal.
much cheaper than bough one (6$) wired on a perfboard.
you can expand the i/o using shift registers for led row/col driving
and 8 lines to read a scanned 4x4 keypad. use a pwm for sound effects.

Locked
Please be positive and constructive with your questions and comments.

Return to “Microcontrollers”