Show Posts
Pages: 1 [2] 3 4 ... 44
16  Using Arduino / Motors, Mechanics, and Power / Re: Motor fly back or something else? on: March 28, 2014, 02:24:49 pm
The 47uF cap for the 2N3904 transistors -- does it just go from 5V to Gnd, near the 2N3904?
17  Using Arduino / Motors, Mechanics, and Power / Re: Motor fly back or something else? on: March 27, 2014, 12:16:49 am
Add something like 47uF electrolytic decoupling close to the relay switching transistors -
the current pulses from turning on/off the relays is probably triggering reset.  The
ATmega should have 0.1uF caps on each supply pin, not just one of them.

Any wiring connected to the reset pin needs to be routed away from all the high-current
paths to the relays and motors, or perhaps change the 10k pull-up on it to 1k.

I just discovered I don't even have pin 6 (Vcc) of the Atmega328P-AU connected to anything! That could be causing a problem?  Pins 4 & 6 are Vcc, pins 3 & 5 are GND.  One cap in there would be as close to one Vcc as the other, but maybe that's what you meant-that you saw I didn't even have the one pin connected?  What about pins 18 & 21? They are AVcc & AGnd.  I have them tied to Vcc & Gnd, respectively.  Should I add a 0.1uF cap by them?

The 47uF cap for the 2N3904 transistors --I'm not sure where to put them.  Check out my picture, They are C7 & C8.  I'm guessing C7 is the right way to do it, but I don't understand transistors well enough to visualize how they work.
18  Using Arduino / Motors, Mechanics, and Power / Re: Motor fly back or something else? on: March 25, 2014, 09:41:02 pm
https://www.dropbox.com/s/m3ykh9c3pykipqj/Version%204.0.pdf
Here a PDF file of my schematic.   I can't seem to get a photo uploaded tonight.
19  Using Arduino / Motors, Mechanics, and Power / Re: Motor fly back or something else? on: March 25, 2014, 08:19:32 pm
Sorry about the poor photo. I'll upload a better one when I get home. The grounds are connected because they are the same. I have two 3 D cell battery packs wired in series. 4.5 + 4.5 volts. The Arduino is powered off one, the motor off both for 9 volts.   I wouldn't put a diode across the terminals, but rather 4 of them, 2 tying each motor terminal to gnd and 9 volts, to take care of fly back voltage, but I'm not sure that's the problem. Fly back should be affecting the 4.5 volt should it? It seems more like when the motor starts it drops the voltage for a split second. I didn't put any polarized caps in the system like I do when using a voltage regulator, I thought battery voltage would be constant, but I wonder if it's dropping out sometime when the little motor starts.
20  Using Arduino / Motors, Mechanics, and Power / Motor fly back or something else? on: March 25, 2014, 05:41:38 pm
My Atmega controls my motor via 2 double throw relays, to give me forward and reverse. The whole thing is battery powered, no voltage regulators.  (6) C batteries. The atmega runs on 4.5 volt, the motor on 9 volt. When the motor cuts on and off sometimes it resets my Atmega. I have a fly back diode on the relays' coil, but that is all. Do I need it on the motor, too?  I put a 0.1 uF cap across the motor terminals like someone suggests to help noise, and now my Atmega resets every time the motor turns on. I put a 1000uF cap across gnd and 9 volts, and that fixed my issue.  I'm just wondering if that's the appropriate fix?  Would the motor diodes fix this problem, or would I still need a large cap in the picture?
21  Using Arduino / General Electronics / Re: DS3234; Deactivating an alarm on: March 21, 2014, 09:35:19 am
Thanks!  I see how that works again.  I've tried wrapping my brain around it but it doesn't stick.  After rereading the arduino reference page on bitwise, I see that you are just adding the binary digits together.  I couldn't figure out how it knew what those things were, like DS3234_INTCN, and  DS3234_A2IE , but I found in the library's .h file that their defined, as 1, 2 4, etc, representing binary numbers.  So just putting in the INTCN will 'take out' the alarm values.  Kinda neat when you understand it!  Thanks again.
22  Using Arduino / General Electronics / DS3234; Deactivating an alarm on: March 20, 2014, 11:59:05 pm

I'm using the library for the DS3234 found here:https://github.com/rodan/ds3234

I've got alarms to work, but now I need to deactivate one.  This line is what activates, but I don't understand bits and stuff enough to figure out how to turn off Alarm 1.
Code:
// activate Alarm1
    DS3234_set_creg(cs, DS3234_INTCN | DS3234_A1IE);
Quote
Bit 1: Alarm 2 Interrupt Enable (A2IE). When set to logic 1, this bit permits the alarm 2 flag (A2F) bit in the status register to assert INT/SQW (when INTCN = 1). When the A2IE bit is set to logic 0 or INTCN is set to logic 0, the A2F bit does not initiate an interrupt signal. The A2IE bit is disabled (logic 0) when power is first applied.
Bit 0: Alarm 1 Interrupt Enable (A1IE). When set to logic 1, this bit permits the alarm 1 flag (A1F) bit in the status register to assert INT/SQW (when INTCN = 1). When the A1IE bit is set to logic 0 or INTCN is set to logic 0, the A1F bit does not initiate the INT/SQW sig- nal. The A1IE bit is disabled (logic 0) when power is first applied.
taken from the data sheet:
https://www.sparkfun.com/datasheets/BreakoutBoards/DS3234.pdf

When I activate alarm 1, I need to deactivate alarm 2, because it could fire off prematurely.  And vise versa--when I activate alarm 2, I need to deactivate alarm 1.  I know it must be simpleā€¦
thanks
23  Using Arduino / Microcontrollers / Re: Using a cheap USBasp with a TQFP programmer on: March 13, 2014, 05:20:01 pm
Sorry, I've only ever used the Arduino IDE to load sketches or burn bootloader to Atmega chips. I guess avrdude is a program?  It sounds like it might just be easier to use jumpers from my UNO's pins to my TFQP adapter when I want to program the Atmega328P -AU chips.
I thought this usbasp. Thing would just show up as a serial port that I'd select when I want to burn a bootloader.
24  Using Arduino / Microcontrollers / Using a cheap USBasp with a TQFP programmer on: March 13, 2014, 10:33:04 am
I got this TQFP32 programmer and have used it to boatload ATmega328P-AU chips by connecting the pinout to the appropriate pins on my UNO, and using my UNO as the ISP.  Since these USBasp's from china were so cheap, I thought I'd try one.  I just figured I could plug my TQFP adapter into it and viola!  But maybe not.  Is there a trick to using these on a macbook 10.7, or is it more trouble than it's worth?
See the photo of what I have, and also a couple links of the items:
http://www.ebay.com/itm/171201827956?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

https://www.hobbyking.com/hobbyking/store/__27195__Atmel_Atmega_Socket_Firmware_Flashing_Tool.html

25  Using Arduino / General Electronics / Re: Adding a FTDI to my project on: February 27, 2014, 07:35:39 am
Thanks. I should have checked that. 
I'm pretty sure I have the Rx & Tx connected wrong too.
26  Using Arduino / General Electronics / Re: Adding a FTDI to my project on: February 27, 2014, 06:55:53 am
Huh?
I don't know what VUSB is. Here's photos of the schematic I'm talking about in case you can't view the PDF files.
The before and after. Please read my first post to see my question.
27  Using Arduino / General Electronics / Re: Adding a FTDI to my project on: February 26, 2014, 10:56:12 pm
To visualize my question, here is the schematic after I made these changes.  Will this work? 
I'm wondering if the TX & RX pins are connected correctly, though.  Do I need the FTDI's TX pin to connect to the Atmega328's RX pin?
28  Using Arduino / General Electronics / Adding a FTDI to my project on: February 26, 2014, 10:48:24 pm
I want to add an FTDI chip to my project so it can be connected via USB, rather than a separate FDTI cable.
So I copied the schematic from the FTDI basic, from Sparkfun, and pasted it into my new project.  
Since I won't be using 3.3 volts, can I delete C1 and the net connected to pin 17 on the FTDI chip? And can I remove the solder jumper SJ2, and then connect pin 4 on the FTDI chip to 5V?  I think this is right, but want to make sure.
After doing this, the 2 schematics will just kinda merge together into one I believe, with the FTDI allowing the USB port to talk to the Atmega chip.
Thanks.


ps.  Also, I see CTS from the FTDI chip will not be connected to anything.  It's ok to leave it unconnected?  The DTR pin is what resets the Atmega chip during programming, right?
29  Using Arduino / Project Guidance / Re: disabling a MAX16910 with a DS3234 on: February 26, 2014, 11:57:29 am
I think the BSS138W is what I need, but I'm not sure of the schematic.  Here's a photo of an attempt.
The MAX16910 when powered up, will supply 5V to the DS3234, an Atmega chip, and other components like a LCD, etc.  When it's not powered up, the DS3234 will run on low quiescent current from it's coin cell battery, awaiting the next alarm trigger to power things back up.

MAX16910 datasheet
http://datasheets.maximintegrated.com/en/ds/MAX16910.pdf

BSS138W datasheet
http://www.fairchildsemi.com/ds/BS/BSS138W.pdf

DS3234 datasheet
https://www.sparkfun.com/datasheets/BreakoutBoards/DS3234.pdf
30  Using Arduino / Project Guidance / disabling a MAX16910 with a DS3234 on: February 26, 2014, 09:58:34 am
http://www.maximintegrated.com/datasheet/index.mvp/id/6336
this regulator uses only 1.6 uA when it's disabled. To enable to regulator, the EnablePin must to driven high. 
https://www.sparkfun.com/datasheets/BreakoutBoards/DS3234.pdf
The DS3234 can sleep, using only 1.5uA from it's coin cell battery.  So I want to shut down my project (Atmega328 is the base of it), by controlling the MAX16910 regulator with the INT pin from the DS3234.  But the DS3234 uses it's alarm to trigger the INT Pin to go LOW, but the MAX16910's enable pin is active high, so to startup the regulator, i have to pull its enable pin HIGH.  Is it possible to have the DS3234's INT pin do this with minimal extra components and quiescent current?
Pages: 1 [2] 3 4 ... 44