Show Posts
Pages: [1] 2 3 4
1  Using Arduino / General Electronics / Re: Arduino error in light sensor circuit on: March 26, 2013, 08:44:03 pm
by setting your voltage references in physical proximity to each-other, with a divider between the photo-resistors, you can use the casting of shadows, and movement of the sun to let your circuit auto-calibrate.
see attached, an excerpt from John Iovine's "Robots, Androids and Animatrons" TAB books, pg 133.

2  Using Arduino / Microcontrollers / lua and servos? on: March 26, 2013, 07:51:59 pm
Hi all,
I just tried running a servo from an AtMega328 with the Lua boot-loader, running the 8MHz internal clock.
things seem to not be working exactly right.... Do I need to modify Servo.h to use it with the Lua boot-loader?
where can i learn more about the lua boot-loader, and what it is and isn't capable of?
3  Using Arduino / General Electronics / Re: High current 5A stepper motor driver on: March 26, 2013, 12:15:44 pm
might have what you want in single package form. I have seen some but 5A seems high, im sure it will get expensive, which makes us ask why not just add in some mosfets after using a package that gives you the diver options.

is this a unipolar or bipolar stepper?
anyhow, after using a STEPPER MOTOR CONTROLLER IC,
you can expect usually do things like set 1 pin to fwd/ rev.
1pin to en/disable, and then the rest is optional. Good ones (IMHO) will have micro-stepping, and homing logic.
I like to use opto-couplers to isolate high current devices from sensitive low power devices.
4  Using Arduino / General Electronics / Re: What's in your parts kit? on: March 26, 2013, 10:51:08 am
I hope your friend thanks you.
The "Base" kit to me depends on the user knowledge base, and what they are trying to do.

my basic projects kit is passive components, LEDs voltage regulators, logic gates, solder-less breadboard, and some transistors and a multimeter.

when I teach people electronics, i start out with test and measure, fundamental principles, and reading of data-sheets / schematics.
With those 3 skills a beginner can conquer most problems they will encounter, or be able to express their problems to someone who can help them.

( also just recalled a friend of mine who likes to throw broken parts back into stock.
The logic, is that building things that work, when everything works is easy.
when things don't work, then you can learn something. )

if your friend lacks tools, a multimeter, strippers, dykes, and safety glasses, I all consider mandatory.
5  Using Arduino / General Electronics / Re: routing power from solar source to consumers over a garden on: March 26, 2013, 10:27:22 am
Just 2 thoughts.
are your LEDs providing the wavelengths necessary to act as grow lights?  My understanding of sunlight, LEDs and the growth process is that 400-700nm is where its at for optimal growth.  going above or below, those limits is wasting energy.

my other thought, also regarding efficency of growth, and quality of light is to ask what if you PWM your LED output?
PWM can greatly improve your efficency, but for these purposes, i dont not know how it would effect quality of light pertaining to plant growth.  I mean plants dont have retnas, they dont see, but they do response bio-chemicaly to energy levels, which are effected if you use PWM.  using PWM LED output may still offer some charming results to efficiency in your application.
6  Using Arduino / General Electronics / Re: Arduino error in light sensor circuit on: March 26, 2013, 10:06:39 am
My OCD for schematic design is going crazy...
just some pointers.
Input on the left processing center, output on the right.
avoid crossing wires, it makes it confusing. 
for your design, fwd / reverse can be achieved with a single output, using an H-bridge.
an additional output could be used for enable / disable.
I am not sure why you have diodes on the base of your transistors? was that to give diode protection?
You will want to diode protect your h-bridge, (or transistors) and your arduino, but, that's not how its done.
here's a basic tutorial on diode protection

the arduino has no diode protection, or at-least my uno doesn't.
using source and ground labels independently instead of making loops to singular source and ground points, can make your schematics much neater.
attached is a drawing of 2 voltage divider references to the aruino. one reference shift to +voltage the other reference shifts to gnd voltage.
by comparing the difference, you can shift your motor accordingly.

by setting your voltage references in physical proximity to each-other, with a divider between the photo-resistors, you can use the casting of shadows, and movement of the sun to let your circuit auto-calibrate.
7  Using Arduino / General Electronics / Re: Ghostly push-button input on: March 26, 2013, 09:38:59 am
so many lulz in this thread... the problem at hand. lol
the pull up resistors are good points, but you may encounter issues after that. Human input isnt as binary as one might think. you may need to debounce you Inputs,  to prevent getting multiple false triggers. This can be done by strobign the input. As in checking and rechecking the Input lines to determine if there is change. having a few milliseconds wait between reading the input can help prevent false readings.

Additionaly, you might consider placing some small Mylar capacitors on you switching inputs to further eliminate noise. Given your glove closes on a mechanical structure of input, you can expect noise to come from there, anytime the contacts approach each other. 
8  Using Arduino / Microcontrollers / Re: avr to breadboard help? on: March 25, 2013, 12:30:19 pm
Thank you MR. Gammon, for all your help! How do I send pizza to your house?

I had some more difficulties after installing the boot-loader. When I read the atmega328 data-sheet, I assumed that D13 was pin 28  (ADC5/SCL/PCINT13) on the micro controller. That was wrong. So today, i traced the etches, and figured out where to place the corresponding wires, and all is well.

Thank you so much! Dead serious about the pizza too.

9  Using Arduino / Microcontrollers / Re: avr to breadboard help? on: March 24, 2013, 11:13:53 pm
This was referring to the page:
and trying to use that example. I cant get anywhere with that.

the programmer works fine until I try to upload a boot-loader

I want to write sketches to the ATMega328 which is using the internal clock, using the arduino Uno. Then I want to remove the chip and put it in a separate circuit, not needing to use a crystal oscilator.
I got the idea this was possible from

Am I wrong?

I'm confused about these two statements. You want to upload a bootloader, but you want to use the Arduino as a programmer? They are mutually exclusive.
10  Using Arduino / Microcontrollers / Re: avr to breadboard help? on: March 24, 2013, 10:37:47 pm
Atmega_Board_Detector returns:

Atmega chip detector.
Entered programming mode OK.
Signature = 1E 95 0F
Processor = ATmega328P
Flash memory size = 32768
LFuse = E2
HFuse = DA
EFuse = FD
Lock byte = EF
Clock calibration = 89
Bootloader in use: Yes
EEPROM preserved through erase: No
Watchdog timer always on: No
Bootloader is 2048 bytes starting at 7800

11  Using Arduino / Microcontrollers / Re: avr to breadboard help? on: March 24, 2013, 09:55:11 pm
So I finally got some new, never-before programed AVR Atmega328p-pu microcontrolers, and I re-tried the
when I use /dev/ttys0 I get an error: "avrdude: stk500_recv(): programmer is not responding"
ok fine,  I usually use /dev/ttyACM0 to program things. But thats an error too! "avrdude: stk500_getsync(): not in sync: resp=0x98"

I am confounded, nothing seems to work within that tutorial... I can program the original chip just fine, the programmer works fine until I try to upload a boot-loader
dmesg reads:
[105249.537906] usb 2-2: USB disconnect, address 10 //reset the arduino

[105694.916021] usb 2-2: new full speed USB device using ohci_hcd and address 11
[105695.147162] usb 2-2: configuration #1 chosen from 1 choice
[105695.150151] cdc_acm 2-2:1.0: ttyACM0: USB ACM device

Voltages on pins 7,8,9 are all 0volts.

So I got an 8MHz boot-loader on a microcontroler! using this:
but that forum goes on to say that
We can disconnect our breadboard from the Uno we used to program the bootloader, and using hook-up wire, connect it to the FTDI cable
but I dont want to do that, I still want to use the arduino as my programmer. but this tutorial doesnt seem to go there (maybe i am missing something?)
So I am looking back at the arduino to breadboard tutorial but it again doesnt work, I keep gettting the error:
avrdude: stk500_recv(): programmer is not responding

how can I continue to use the arduino to program this micro-controller?  I still want to upload and test sketches on it, even though I am going to put it into non-arduino circuits..

12  Using Arduino / General Electronics / Re: Audio levels go up when a relay is turned on on: March 21, 2013, 08:12:06 am
I don't know the explanation, but I do know that the separate analog pins (A0-A5) all share the same ADC on the ATMega328; maybe by virtue of this "sharing", attempting to use one of the analog pins as a digital output causes a pin that's an analog input to fluctuate somehow? Have you tried controlling your relay via a regular digital I/O pin?

Post a schematic, I bet we can figure this out. Im having a though time figuring why youd use a relay for audio(?)
if your driving the analogue output higher than [EDIT](My bad), 40ma your almost certainly going to encounter problems.

13  Using Arduino / General Electronics / Re: Two LM7805 in one circuit on: March 19, 2013, 01:47:16 pm
Is it possible to use two LM7805 in one circuit connecting their grounds together and powering parts of the project. I need more that 1A (for powering LEDs) and have a lot LM7805 lying around. Will using LM317 will be more efficient?

You could hook to lm7805 devices in parallel to provide more current, rather than purchasing a +5v regulator rated at more than 1Amp.  ill post a schematic if you like. you want to still include the decoupling caps in such a design.  it would be the lm7805 share VIN  and share GND. Then put decoupling caps from Vout to ground on both Vout1 & Vout2. Then... IDK, you might want to connect a fuse from Vout1 & Vout2 to the Vregout. I guess thats optional, an inductor might work, or a 0.5ohm resistor, or what ever. basically you want to make it so that if one regulator fails, it doesn't take out all your regulators, you blow a fuse or something. But you might decide you have numerous regulators to spare.

if you have a stable Vin, within the specs of an lm7805, save for the current, I wouldnt bother with an lm317. The efficiency is probably negligible. I would guess that a simpler circuit has greater efficiency. lm317 requires a voltage divider, so.. that's where I'm making the efficiency guess. In actuality, thy are vary similar regulators. i would guess that the lm7805 just has a  fixed resistor bridge inside the device.  data sheets may provide efficiency curves you can look at.

how much current do you need?
14  Using Arduino / Microcontrollers / Re: avr to breadboard help? on: March 19, 2013, 08:08:40 am
It's kind of a catch 22.
That was the part blowing my mind most. Thanks for pointing out Im not going crazy.

Stuff about breadboarding:

The pictures at this post made it so I can understand what is going on. I think the documentation on is most confusing.
So i guess I have to order some new ATMEGA micro-controllers, the one I have has a boot-loader on it, and its been programed. Thanks everyone, Ill post back when I get some more chips so i can try these solutions.

Add LEDs (plus appropriate resistors) on pins 7, 8, and 9 on the Uno. These will show the status of ArduinoISP, or at least provide a sanity check that you actually have ArduinoISP running on the board. Also check the output from "dmesg" to ensure your USB connection to the Arduino isn't going haywire -- I get that problem a lot.

Thanks Chagrin, I will try setting up indicator lights, and keeping a tail on dmesg, that's a good idea.  as for why things are setup as they are, Im not sure either....
Is /home/user/.arduino/hardware/breadboard/boards.txt' where the boards.text file should be? (provided my arduino home directory is at /home/user/arduino/

15  Using Arduino / General Electronics / Re: Using an LED driver to fire keys on a toy keyboard on: March 17, 2013, 08:05:04 pm
optoisolators aka Optocoupler would be my solution.
a whole lot of transistors would get messy.
Pages: [1] 2 3 4