Offline
Newbie
Karma: 0
Posts: 37
|
 |
« Reply #30 on: September 24, 2011, 11:50:53 am » |
At this point do you think the 5V solution would be best/easiest? Updated schematic: 
|
|
|
|
|
Logged
|
|
|
|
|
United Kingdom
Offline
Faraday Member
Karma: 146
Posts: 4906
|
 |
« Reply #31 on: September 24, 2011, 01:31:39 pm » |
If you care about the LEDs not dimming when you turn the engine off, then yes, the 5v version is probably simpler. You'll need to find a 12v to 5v regulator that will handle the total current involved, i.e. the LEDs plus about 45mA for an Arduino Uno.
You've drawn the mosfet symbol the wrong way round - the pin with the arrow is the source (the one you need to connect to ground). You've correctly marked the gate pin.
|
|
|
|
|
Logged
|
Formal verification of safety-critical software, software development, and electronic design and prototyping. http://www.eschertech.com
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 37
|
 |
« Reply #32 on: September 24, 2011, 04:01:06 pm » |
Looks like this adapter may work: http://www.sparkfun.com/products/8638Also I noticed some of the resistor calculators say to use 1/8watt resistors? What's the difference between 1/8 and 1/4 watt resistors? Updated schematic: 
|
|
|
|
|
Logged
|
|
|
|
|
United Kingdom
Offline
Faraday Member
Karma: 146
Posts: 4906
|
 |
« Reply #33 on: September 24, 2011, 04:18:34 pm » |
Your schematic is now correct, except that the label "Source" is by the drain terminal of the mosfet.
The difference between 1/4w and 1/2w resistors is the maximum amount of power they can dissipate without damage. You can calculate the power P dissipated in a resistor using the expression P = V * I or P = V2 * R or P = I2 * R.
|
|
|
|
|
Logged
|
Formal verification of safety-critical software, software development, and electronic design and prototyping. http://www.eschertech.com
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 37
|
 |
« Reply #34 on: September 24, 2011, 05:06:04 pm » |
"Your schematic is now correct, except that the label "Source" is by the drain terminal of the mosfet." Not sure what exactly you mean there. The drains from MOSFET's are connected to ground right?
|
|
|
|
|
Logged
|
|
|
|
|
Florida
Offline
Sr. Member
Karma: 3
Posts: 431
hookedup!
|
 |
« Reply #35 on: September 24, 2011, 06:54:28 pm » |
I am using the 5v concept. The link you showed only provides 650mA of power. I would suggest going to e-bay and getting ones that have 1amp at least. I found some 1.2amp ones on e-bay and got the last few. You should be able to find something similar. http://www.ebay.com/itm/250838285454?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649I pulled the socket part off the adapter and connected the exposed black and red wires to the 12v lithium icon battery by adding a small metal adapter that fits snug into the battery slot. Then I plug a USB cable into the 5v adapter slot and splice the USB cable. In the cable, locate the black and red wires. IMPORTANT: Check with a tester to assure +/- (do not assume color is correct). I use 4 of these to run 70 RGBs.
|
|
|
|
« Last Edit: September 24, 2011, 07:01:07 pm by marklar »
|
Logged
|
|
|
|
|
United Kingdom
Offline
Faraday Member
Karma: 146
Posts: 4906
|
 |
« Reply #36 on: September 25, 2011, 01:55:11 am » |
Not sure what exactly you mean there. The drains from MOSFET's are connected to ground right?
No - source goes to ground, drain goes to the led/resistor strings.
|
|
|
|
|
Logged
|
Formal verification of safety-critical software, software development, and electronic design and prototyping. http://www.eschertech.com
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 37
|
 |
« Reply #37 on: September 25, 2011, 09:40:33 am » |
How's it look now? 
|
|
|
|
|
Logged
|
|
|
|
|
United Kingdom
Offline
Faraday Member
Karma: 146
Posts: 4906
|
 |
« Reply #38 on: September 25, 2011, 11:53:08 am » |
This time you've drawn the mosfets the wrong way round but labelled source and drain as if they are the right way round. See Fig. 3.1 in http://www.coilgun.eclipse.co.uk/switching_devices.html.
|
|
|
|
« Last Edit: September 25, 2011, 11:56:23 am by dc42 »
|
Logged
|
Formal verification of safety-critical software, software development, and electronic design and prototyping. http://www.eschertech.com
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 37
|
 |
« Reply #39 on: September 25, 2011, 12:10:16 pm » |
I think I got it now, found this figure to help me that's closer to the one I was using.  Updated, How does my schematic look overall? I've never drawn one before our used Eagle.  
|
|
|
|
|
Logged
|
|
|
|
|
United Kingdom
Offline
Faraday Member
Karma: 146
Posts: 4906
|
 |
« Reply #40 on: September 25, 2011, 01:22:02 pm » |
Yes, that looks right.
You've got your push button wired between +5v and pin D2, with a 10K pulldown resistor from D2 to ground. It's more usual to wire push buttons between a digital pin and ground. That way, if you turn on the internal pullup resistor, you don't need an external pullup or pulldown resistor.
|
|
|
|
|
Logged
|
Formal verification of safety-critical software, software development, and electronic design and prototyping. http://www.eschertech.com
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 37
|
 |
« Reply #41 on: September 25, 2011, 02:54:44 pm » |
Okay, will that also work using just an atmega328 with arduino optiboot? I plan on using this:http://www.sparkfun.com/products/10524 instead of an arduino UNO for the final solution to make things smaller.
|
|
|
|
« Last Edit: September 25, 2011, 03:11:48 pm by Silent »
|
Logged
|
|
|
|
|
United Kingdom
Offline
Faraday Member
Karma: 146
Posts: 4906
|
 |
« Reply #42 on: September 25, 2011, 03:42:06 pm » |
Yes, the internal pullup is in the atmega328.
|
|
|
|
|
Logged
|
Formal verification of safety-critical software, software development, and electronic design and prototyping. http://www.eschertech.com
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 37
|
 |
« Reply #43 on: September 25, 2011, 04:16:58 pm » |
So it would be like this correct? 
|
|
|
|
« Last Edit: September 25, 2011, 08:20:37 pm by Silent »
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 37
|
 |
« Reply #44 on: September 25, 2011, 10:29:10 pm » |
I decided it would be better to use the atmega328 TQFP ( http://www.sparkfun.com/products/9261), I added that to my schematic. I think I have it wired up properly, just not sure about the XTAL1 & XTAL2 pins. 
|
|
|
|
|
Logged
|
|
|
|
|
|