Source for electronic small parts

Talk anything non-beer related
Post Reply
andrewtrsmith
Verified User
Verified User
Posts: 211
Joined: Mon Mar 14, 2011 8:48 pm
Name: Andrew Smith
Location: Dartmouth

Source for electronic small parts

Post by andrewtrsmith » Tue Mar 15, 2011 12:55 pm

Hey everyone,

I'm wondering if anyone has a local source for small parts like resistors, transistors and diodes. I've got a small project that i've been meaning to start for a while now thats an automatic temperature controller for my smoker. It could also be used as a keezer temperature controller but the Arduino is a little overkill for that purpose, both in terms of computing power and cost.

A link to the project that i'm looking at doing is as follows (I hope this isen't against any URL rules)

http://hruska.us/tempmon/

Thanks
Andrew
Sign's your not quite awake yet ... "Where the heck is RIS?"

User avatar
LiverDance
Award Winner 6
Award Winner 6
Posts: 4013
Joined: Fri Sep 24, 2010 4:50 pm
Name: Brian
Location: Sprybeeria

Re: Source for electronic small parts

Post by LiverDance » Tue Mar 15, 2011 12:56 pm

The guys in this thread will be able to help you out.

http://www.brewnosers.org/forums/viewto ... ?f=3&t=315" onclick="window.open(this.href);return false;
"Twenty years ago — a time, by the way, that hops such as Simcoe and Citra were already being developed, but weren’t about to find immediate popularity — there wasn’t a brewer on earth who would have gone to the annual Hop Growers of American convention and said, “I’m going to have a beer that we make 4,000 barrels of, one time a year. It flies off the shelf at damn near $20 a six-pack, and you know what it smells like? It smells like your cat ate your weed and then pissed in the Christmas tree.” - Bell’s Brewery Director of Operations John Mallet on the scent of their popular Hopslam.

User avatar
Jimmy
Site Admin Award Winner
Site Admin Award Winner
Posts: 6984
Joined: Wed Sep 22, 2010 6:35 pm
Location: Halifax, NS

Re: Source for electronic small parts

Post by Jimmy » Tue Mar 15, 2011 1:05 pm

andrewtrsmith wrote:A link to the project that i'm looking at doing is as follows (I hope this isen't against any URL rules)

http://hruska.us/tempmon/

Thanks
Andrew
No specific link rules here. The only request I have is don't post anything that will get me in trouble. As far as the club is concerned, I'm guessing nothing offensive would be a good guideline.

Garak
Registered User
Registered User
Posts: 195
Joined: Tue Feb 08, 2011 10:22 pm
Location: Dartmouth

Re: Source for electronic small parts

Post by Garak » Tue Mar 15, 2011 1:09 pm

Not a whole lot available in Halifax. I just order everything online.

dipmicro.ca is really cheap and fairly fast. There resistor kits are a great deal.

For breakout boards and other electronics sparkfun.com and seeedstudio.com(HK)

I can give you any resistors, caps, diodes you need as I have a pretty good stockpile of that stuff. I'm kind of short on transistors.

I haven't bothered with Arduino, I just write from scratch in ASM or C with AVR-libc, compile with AVR-GCC and program using a usbtiny based programmer. I'm currently using Atmega168 which is what the original arduino is based on.
--
Garak

andrewtrsmith
Verified User
Verified User
Posts: 211
Joined: Mon Mar 14, 2011 8:48 pm
Name: Andrew Smith
Location: Dartmouth

Re: Source for electronic small parts

Post by andrewtrsmith » Tue Mar 15, 2011 1:26 pm

You've sparked my interest with avoiding the arduino (i.e. expensive) platform. I'm going to have to learn a new language anyways so whether i learn C or the deriviative that the arduino tool uses i guess won't make that much of a difference.

Are there are lot of resources for C around? I'll put this into perspective, i am an accountant but I do a lot of excel automation coding in VBA and took a few courses in university that focused on Java programming so i get coding logic, but is C difficult to program in? I've got the calculations already worked out for how to convert the analog input from my temperature probes into degrees kelvin mathmatically, i just need to put that into C. the rest of the programming is pretty basic from a logic point of view, just put in upper and lower limits where a 12V source turns on when it hits or is below the lower limit and shuts off when it hits the upper limit. I could get fancy and print that to an LCD display but i'll save that discussion for another day.
Sign's your not quite awake yet ... "Where the heck is RIS?"

User avatar
ratchet
Verified User
Verified User
Posts: 491
Joined: Thu Sep 30, 2010 10:35 pm

Re: Source for electronic small parts

Post by ratchet » Tue Mar 15, 2011 4:07 pm

if you're only looking for a couple things... try RAE in burnside.

if you've got a longer shopping list... try digikey.ca (IIRC, it's $8.00 to ship within Canada)

I prefer robotshop over sparkfun... no duties (robotshop is Cdn), although they have much less selection.

User avatar
John G
Award Winner 2
Award Winner 2
Posts: 651
Joined: Fri Sep 24, 2010 4:34 pm
Name: John
Location: North End Halifax

Re: Source for electronic small parts

Post by John G » Tue Mar 15, 2011 4:28 pm

Jentronics in Burnside is a good source too, although probably not as cheap as ordering from an online source.

Garak
Registered User
Registered User
Posts: 195
Joined: Tue Feb 08, 2011 10:22 pm
Location: Dartmouth

Re: Source for electronic small parts

Post by Garak » Tue Mar 15, 2011 7:31 pm

Most of what programming the Atmega's directly is about is dealing with the hardware. Flipping the right bits to get the hardware to do what you want. Arduino does most of this for you. Your going to have to learn about the hardware. The hardest part is figuring out which mode to run the hardware devices in for your task and then figuring out which bits to flip to get it in that mode. The atmega168 datasheet contains everything you need to know. Its a pretty dense document that describes every way possible that each of the hardware devices can be used.

C has been around for a very long time, most modern programming languages are based on C. In c everything is a function as in f(x) unlike VB and Java where everything is an object. Java's syntax is loosely based on c. C is a fairly strictly typed language, the programmer is left to deal with converting from one data type to another. Every variable must be declared and have a type before it is used. On an 8bit processor your standard int is only 16bit and most operations are only 8bits at a time(the compiler hides this from you but you will see it in the program size).

With the atmega there is no floating point support in hardware, you can do floating point in software but it chews up CPU cycles and program memory. On the Atmega 168 you only have 16k to work with. My temperature controller is up to 5k using fixed point math. In my program for example I need to correct the output by multiplying by 1.079, so I multiply by 1079 and then divide the result by 1000. As far as the processor is concerned its doing math on integers. I should also make it clear that about 3k of that 5k goes towards the serial user interface, around 500bytes is the LCD code and around 1500 bytes currently deals with reading in temperature from the analog sensor and doing a little math on it.

I'm kinda drifting off into specifics. There is alot to writing this stuff from scratch. I've been at this stuff for a long time. My first project was 14 years ago when I was 13, written in qbasic using the parallel port to control an RC truck. Since then I've done around 5 programming courses and 3 years of electronics in college, spent countless hours learning this stuff on my own. I must admit after the 5 programming courses I did, I still didn't know squat about programming. A course called Programming paradigms from Stanford university on youtube really pulled it all together or rather sorted out all the confusion. I'm also the kind of person who doesn't take anything on face value and must know exactly what every line of code does in hardware. That means I'm a little slow to write code but my code has very few bugs. This is also why I could never write code for business where there is pressure to just get it done.

ratchet: I forgot about robot shop, there is also hvwtech in Alberta. Duties are minimal, the most I've ever paid has been HST. With the CND dollar so high right now it is so much cheaper to buy outside of Canada. Shipping from the US is dead slow right now, I'm waiting on a sparkfun order for almost a month. The SSR and heatsinks from China that I ordered the same day showed up last week. Just got the heating element for my heatstick today. I always ship via postal system, its slow but its cheap or even free from most sellers I deal with in China.

andrewtrsmith
Verified User
Verified User
Posts: 211
Joined: Mon Mar 14, 2011 8:48 pm
Name: Andrew Smith
Location: Dartmouth

Re: Source for electronic small parts

Post by andrewtrsmith » Tue Mar 15, 2011 9:22 pm

This sounds like a fun project and a great way to learn. If it takes me 6 months to build a controller but I learn enough to help me build projects for a life time it could be well worth learning C.

You may or may not know this, but if the arduino used the Atmega 168, could you not use the arduino language and the associated resources to program a homebrew atmega based controller?

27 and from Dartmouth, you didn't happen to go to PA for high school did you? Class of 03 myself
Sign's your not quite awake yet ... "Where the heck is RIS?"

Seanstoppable
Award Winner 1
Award Winner 1
Posts: 134
Joined: Tue Sep 28, 2010 11:29 am
Location: Brooklyn, NY

Re: Source for electronic small parts

Post by Seanstoppable » Tue Mar 15, 2011 10:05 pm

Like Garak, I buy a lot of my electronics outside of Canada. For base components, the best prices are still from the states, especially since some of the companies handle brokerage fees up front (I think mouser does that). For kits and such, there are a few good places in Canada, such as robot shop and hvwtech (which was acquired by Solarbotics a while ago, and I think the Solarbotics.com website has 'full' selection of products now).

I've played around with both Arduino and bare atmega chipsets. I would say that the Arduino provides an easy introduction, and lets you get started without having to know a lot of C or reading through a lot of chip documentation or having to pay $20 for a separate piece of hardware to program the chip. It provides plenty of input, and there are shields designed for a lot of things (ethernet controller, data logging, lcds, midi, speech processing, usb, etc). I think it is pretty decent for prototyping. If you find yourself needing better performance/better memory usage, an Arduino still runs off an Atmega 328, so you could always rewrite your code in C and reflash the chip.

In terms of brewing, it is the difference between extract and all grain. Extract might get the job done and get decent results in a short amount of time. All grain will take a little bit longer, but will increase your understanding that much more and give you more control over the final product.

Garak
Registered User
Registered User
Posts: 195
Joined: Tue Feb 08, 2011 10:22 pm
Location: Dartmouth

Re: Source for electronic small parts

Post by Garak » Tue Mar 15, 2011 10:07 pm

Your welcome to use my circuit design and code from my controller build. I may release it open source once its good enough to show the world. I'm planning on getting a printed circuit board(PCB) made for it in the next few months. I'm trying to keep it general purpose as possible so that it can be used for everything brewing related, from keezer control, fermentation chambers, to electric HLT and Boil Kettle control.

You can use the arduino boot loader and associated tools with the atmega168 and a number of other Atmel chips. I've already invested the time into getting to know this chip and I like writing my own stuff from scratch. I've had my share of bad experiences with Arduino like environments and I like to know every detail of what the hardware is doing. Arduino hides alot of the hardware details, adds a layer of abstraction which I don't like.

I would highly recommended http://www.adafruit.com/index.php?main_ ... a2b1fd7e83" onclick="window.open(this.href);return false;

I'm not from here I just live here. I'm from Stephenville, Newfoundland. Been living here for nearly 2 years.

Jmac00
Verified User
Verified User
Posts: 533
Joined: Tue Oct 26, 2010 9:27 pm
Location: Cape Breton, NS

Re: Source for electronic small parts

Post by Jmac00 » Thu Mar 17, 2011 3:34 pm

Garak wrote: I'm not from here I just live here. I'm from Stephenville, Newfoundland. Been living here for nearly 2 years.
i know some ppl from there....how old are ya?

Garak
Registered User
Registered User
Posts: 195
Joined: Tue Feb 08, 2011 10:22 pm
Location: Dartmouth

Re: Source for electronic small parts

Post by Garak » Thu Mar 17, 2011 3:57 pm

I'm 27, yea there are a lot of people from Stephenville living around Halifax. I've been to parties in the city where everyone is from back home. Its a little strange, it use to be like that in St. John's, now I go back and I everyone from around home has moved on. Now I run into a lot of the same faces here in Halifax. I think its just that there is nothing for my demographic back home, pretty much everyone has left for greener pasture.

Post Reply

Return to “Off Topic”

Who is online

Users browsing this forum: No registered users and 0 guests