157Views24Replies

Author Options:

Tiny Programable board for 2 LEDs? Answered

Greetings,

I'm looking for advice on how to make and get and effect on a project I'm working on. Basically what I'm wanting is to have 2 LEDs (which will be a set of eyes) that will have random sequences of blinking and change at random intervals. Something that isnt constant and overly repetitive, more natural and subtle.

I've never done something like this to this level quite before so I'm looking for something intuitive and simple if possible. The space I have to work in is extremely small too, like less then 2 inches squared. It also needs to be run by battery, however that part doesn't have to be within the small space if need be, although it would be preferred.

Would raspberry Pi, work/be a good option? I've NEVER used it before. I've also heard about "Arduino". Would that possible work? Are their better options/suggestions? I really dont know what I'm doing here. Hhahaha

Thanks

-JXZ

24 Replies

user
wesm4 (author)2016-09-15

i second the attiny85 chip its amazing and use an uno to program it. It would fit your project perfectly

Select as Best AnswerUndo Best Answer

user
JXZ (author)wesm42016-09-23

Why would I need one board (uno) to program another board(attiny85)?

Select as Best AnswerUndo Best Answer

user
caitlinsdad (author)JXZ2016-09-23

You essentially need something to handle the communication between the bare chip, that attiny85 and the computer to load the code on. You can either get a dedicated chip programmer unit or use that arduino and its user-friendlier interface to load the code when the chip is wired to the arduino. You then detach the chip from the arduino to use.

Select as Best AnswerUndo Best Answer

user
caitlinsdad (author)caitlinsdad2016-09-23

the bonus is that you can also prototype your circuits on the full size arduino and adapt the code for a smaller attiny85 chip. Useful in situations where you want to lower the cost of a finished product when you pass it on or duplicate it for mass production.

Select as Best AnswerUndo Best Answer

user
JXZ (author)caitlinsdad2016-09-23

Haha, I barely understand alot of this but I think I get the point. The attiny85 is not what I thought it look like. I like what you're saying tho about prototyping as I may mass produce what I'm creating later on a bit more and whatever I can do to lower the price and whatnot would be good.

For now tho I'm thinking the Trinket (or something similar, like this digispark PKM suggests) is more then small enough. More then enough. Seems like anyways programming a attiny right now is probably too complex for me at a beginner stage anyways. Plus, the trinket is pretty flat and has the usb to program directly from the computer. I can use the Arduino program to program it right?

Select as Best AnswerUndo Best Answer

user
caitlinsdad (author)JXZ2016-09-23

The Trinket is really small. It's really an attiny85 chip with the extras. Look at the Adafruit tutorial to download the software(arduino IDE) to program it. You can actually install all that before you get a trinket and grab sample code and compile it. A few drivers to load and little things to watch out for when you actually use it(use good usb cable, usb2.0 ports, press the reset button if not loading, signs that it is connected to the PC - check their Trinket forums for help). Have fun.

Select as Best AnswerUndo Best Answer

user
JXZ (author)caitlinsdad2016-09-23

I also want a tiny standard on/off switch and a small LiPo battery pack; Adafruit's LiPo 3.7v 500mAh battery seems the perfect size for this. Apparently I'll have to solder a JST connector for this from what I can tell? Would a Gemma v2 perhaps work better?

Again, I really just want 2 LED "eyes". They gotta be red diffused 10mm. I might want 2-3 more little 3mm ones, but their option at this point or might be just powered by a button battery. Like an LED throwie.

Later down the round I might, -MIGHT-, want to throw a small speaker on the play some short sound bits. Obviously the trinket couldn't hold the files for that. I'm already curious how much "space" the coding would take up. And if it could even fit that many things on it. Is there a another trinket sized board that has alot of space or might be able to fit like a micro SD card and would work for this project?

I know I ask alot of questions haha, but thanks so much already for your help, seriously, its really been a HUUUUGE help.

Select as Best AnswerUndo Best Answer

user
JXZ (author)JXZ2016-09-23

Also, if I go with a trinket would I want the 3v or 5v one?

Select as Best AnswerUndo Best Answer

user
caitlinsdad (author)JXZ2016-09-23

Since it sounds like you can/will be soldering stuff up, either one will do. The 3 volt version is for hooking up to more advanced sensors later that work at 3 volt signal levels. You might want to get the 3v Trinket to run with that lipo pack and you can also drive neopixels with it too.

You can get beeps and tones out of a basic arduino but need an add on board for sound playback/sd card storage and the whole amp/speaker thing for sound bytes. Look at adafruit's FX audio board all in one unit for sound effects.

Select as Best AnswerUndo Best Answer

user
JXZ (author)caitlinsdad2016-09-26

Well unless I am missing something...I think I'm going with this one.

https://www.adafruit.com/products/2795

Select as Best AnswerUndo Best Answer

user
caitlinsdad (author)JXZ2016-09-26

sorry, where were we...

You have to think along the lines that in order to play sound bytes you need an MP3 player. A small arduino doesn't have enough processing power to do it. Even though that Feather board has an sd card for storage and lipo charger, it is not for playing back sound files stored on the card. It's ok to do all the blinky stuff to start out with. Yeah, the market is full of arduino variants that make it a confusing choice for the beginner.

Select as Best AnswerUndo Best Answer

user
JXZ (author)caitlinsdad2016-09-28

AHH. I see. Well that makes sense; about processing power for sound files.

Guess I'll have to go with the gemma or the trinket then....do you know of any other boards that have an on-board charger for the lipo? The more i can consolidate the better.

Haha, I wouldnt even call myself a beginner, sounds to high for me, more like complete and total ignorant n00b. haha xP

Select as Best AnswerUndo Best Answer

user
caitlinsdad (author)JXZ2016-09-28

We all have to start somewhere. Get a board and run with it. Don't get too hung up on how you will be charging a lipo battery. I still prefer my 3xAAA regular battery pack to quickly change out batteries since I get AAAs in bulk pack from the warehouse club stores.

Select as Best AnswerUndo Best Answer

user
JXZ (author)caitlinsdad2016-09-28

Still gravitating to these feather boards, simply for the fact that they have built in charging for lipo and it doesn't seem any others do. Would this work just as well?


https://www.adafruit.com/products/2771

Select as Best AnswerUndo Best Answer

user
caitlinsdad (author)JXZ2016-09-28

Go for it. Once you get familiar with it, you can get and easily add on the other compatible boards(wings) to do more things.

Select as Best AnswerUndo Best Answer

user
JXZ (author)caitlinsdad2016-09-29

Mkay, final question, I'm pretty sure haha, besides the price could you think of any other possible advantages of one of the Trinkets over this one?

Select as Best AnswerUndo Best Answer

user
caitlinsdad (author)JXZ2016-09-30

You will probably get hooked on electronics once you see what the feather board can do. The Trinkets have a smaller processor chip/less control pins and are a little quirky to program. You should go with the feather which has the same chip as full size arduinos so that entire world is open to you without needing to modify existing code. A Trinket would be used when you've got everything figured out/only need basic functions and want to embed it something to maybe give away or use for a one-off project cheaply. Both the Feather and Trinkets are really small but you make a decision more on functionality.

Select as Best AnswerUndo Best Answer

user
JXZ (author)caitlinsdad2016-09-28

3xAAA really wouldnt work with this project. Or at least would complicate it and its practicallity. Too big and takes up too much room.

Select as Best AnswerUndo Best Answer

user
Downunder35m (author)JXZ2016-09-27

Hefty pricetag just to make to LED'S blink....

Select as Best AnswerUndo Best Answer

user
JXZ (author)Downunder35m2016-09-28

Price tag on the project is already a bit hefty, haha, but its all about how much you're willing to pay for what you want.

Select as Best AnswerUndo Best Answer

user
JXZ (author)caitlinsdad2016-09-23

Definitely want the lipo pack, I guess neopixels could work in place of any 3mm leds I would use. So defiantly go with the 3v if I go trinket?

What about this board?
https://www.adafruit.com/products/2795

Seems like this might work possibly? Got the lipo JST connector and on-board charger (which would be SUPER convenient), plus the SD card thingy. Could I just attach a speaker to it or would I still need a soundboard or something else?

Seems I'll still have to soldering a JST to the FX audio board all in one, seems its discontinued too??

Select as Best AnswerUndo Best Answer

user
caitlinsdad (author)2016-09-14

Raspberry pi is overkill to just blink a few LEDs. You might want to take a look at the Adafruit Trinket or get a full size Arduino like the UNO to program an Attiny85 chip.

But if you are not ready to gear up, buy your board and components and learn to program, you can do what I did when I wanted to embed blinking LEDs in things. I hacked things like bicycle flashers and electronic tea lights from the dollar store. I resoldered the LEDs on longer wires so they could be placed anywhere I needed them. The bicycle flasher has a few different modes and best of all it was a self contained unit with all the circuitry. Good luck.

Select as Best AnswerUndo Best Answer

user
JXZ (author)caitlinsdad2016-09-23

You can't program a attiny or trinket without an uno?

I thought about using other thinks like bicycle flashers and what for expense's sake, but I am assuming hacking probably wouldn't work unless I could hack the programming too so I could get the kind of flashing i want, which sounds WAY to complex for a first timer.

Select as Best AnswerUndo Best Answer

user
PKM (author)2016-09-16

The Digispark may be what you need. It's Arduino compatible, so there will be a ton of tutorials on how to write simple code that blinks LEDs. It's cheap ($8), about an inch square, and simple to assemble as long as you can solder a few through-hole components or know someone who can.

If space is absolutely vital you could use a naked ATTiny chip, but programming those is a lot more complex than programming an Arduino so maybe isn't suitable for a first project.

Select as Best AnswerUndo Best Answer