Jump to content

Jak

Members
  • Content Count

    8
  • Joined

  • Last visited

  1. When programming recently, I found that I had some trouble controlling a motor at the same time as several servo. The servos would go all crazy, and the motor wouldn't work. I guessed that this was because the timers were interfering, or not enough timers, or similar. Digging into the servo library, and the analogWrite function, I found that they're both trying to use Timer A. Thus, I modified the analogWrite function. In file energia/hardware/msp430/cores/msp430/wiring_analog.c , I commented out lines 110 to 123 (inclusive). Below is the code commented out. case T0A1: // TimerA0 / CCR1 TA0CCR0 = PWM_PERIOD; // PWM Period TA0CCTL1 = OUTMOD_7; // reset/set TA0CCR1 = PWM_DUTY(val); // PWM duty cycle TA0CTL = TASSEL_2 + MC_1 + analog_div; // SMCLK, up mode break; #if defined(__MSP430_HAS_TA3__) || defined(__MSP430_HAS_T0A3__) case T0A2: // TimerA0 / CCR2 TA0CCR0 = PWM_PERIOD; // PWM Period TA0CCTL2 = OUTMOD_7; // reset/set TA0CCR2 = PWM_DUTY(val); // PWM duty cycle TA0CTL = TASSEL_2 + MC_1+ analog_div; // SMCLK, up mode break; #endif This may only work using the G2553, but if you're stuck with a G2231 from a rev 1.4 board, just sample a new chip
  2. Hi. I've had a msp430 since it first came out, (which means I have a Rev 1.4 board, but I think i samples a G2553). I haven't done a heck of a lot beyond flashing LED's, but now I figured i may as well build a robot. My robot will have 3 ultrasonic sensors (SR04), two homemade (digital) bump sensors, 2 servos (one for steering), and a big drive wheel. The drive wheel will be controlled through 4 N-channel mosfets, IRF640's. Yes, I have some heatsinks on them. To control these mosfets, I have a HIP 4082 mosfet driver. This converts logic level up to 15V or so for the mosfets, as well as stopping the mosfets from blowing up due to user stupidity (both sides on). Also, it lets me control the motor through one pin only (i'm skipping a few features, coasting for example). I simply PWM that pin, invert it in hardware, and feed both to the chip. The bump sensors will be constructed similar to those shown http://www.projectsinterestsandetcetera.com/conestoga-pages-from-lockeblog/ , in particular http://www.lockeconsulting.com/lockeblog/wp-content/uploads/2012/01/100_1244.jpg Some work had to be done on the ultrasonic sensors, as they would return 5V outputs. However, I have accounted for this. See the attached document (pdf), for circuit diagrams. Where there is connections, they are labelled. These connect to like connections on other pages. Overview.pdf
  3. Jak

    IR detect.

    Hiya. Launchpad question. I'm looking for a way to detect a fast moving (30-40km/h) vehicle traveling past a stationary computer and sending a signal to the computer as it goes past. The vehicle can be modified, but the track cannot. A detector on the edge of the track is possible. For reference, this is about automatically timing a recumbent trike in a race. This race will at least 24 hours and hence will obviously occur under full sun and full darkness conditions, as well as possibly wet conditions (Through the trike and detector should easily be enabled to be waterproof). The track will be crowded and direct line of sight to a small location on the trike is unlikely to be possible. I was thinking of a smallish array of medium-low powered IR LED's on the trike and a detector system hooked up to a launchpad at the side of the track. The launchpad is connected to a laptop that lacks a serial/parallel/game port. I was thinking that the launchpad just sends a signal through, the software on the laptop does all the calculations, makes sure it isn't a duplicate, etc, and then does stuff with the value. The IR detector would be mounted fairly high up, perhaps on the roof of a marquee, so long wires will be necessary somewhere. What power IR LED's will I need? What IR LED setup works best (I was thinking a single strip along the top of the rollcage of the trike)? What detector setup is best? Will more detectors work better? Some sort of shielding from direct sunlight is preferable? Is any kind of trickery with a signal necessary, or would a brute force pickup work? How the heck do you wire a IR detector in anyway? Would it just be an IR LED acting as a photodiode? Would a filter made of photographic negatives be necessary/harmful/useful? The output from the msp430 launchpad should be readable in python, through i believe this is the smallest problem. Thanks for you help.
  4. Jak

    Hiya.

    Plastic clothes have a nasty habit of melting when heat, in the form of a soldering iron, is applied. Burns you and leaves unsightly holes in your clothes.
  5. Jak

    Dual 7-seg LED display.

    Alright, pin 1 and 2 (on the side, counting from bottom; see the writing on it), are anodes. So that means common anode i presume. Also, somehow i'm counting 12 free pins on my launchpad (14 total -2 power leaves 12). Thats probably a good thing, if i'm correct, as i'm planning on having a LED (or other analogue source, such as an LDR), and possibly a single pushbutton for input. At the moment i'm using the code found on GuShH website, the msp430 launchpad as photodiode page. If i do have to combine the LDR/Photodiode with a pushbutton, can i do that safely? Also, it runs on around 1v, so i most likely need wire and resistors. Thanks for your help.
  6. Jak

    Circuit Schematics

    I use TinyCAD. It can't really do any of the PCB design stuff i don't think, however it works fine for just circuit diagrams.
  7. I ripped a dual 7-segment display out of an old electronics item (which had two in it, the other is still working), and are planning to get my msp430 launchpad to show some numbers on it. I believe that i likely have the ability to do the code, however i cannot figure out how to actually connect the display to my msp430g2. Following are pictures of the display in the hopes that somebody will be able to help. My website has pictures, however i cannot link to them yet. Search blender airfoil plotter, click on the sourceforge one, go to electronics, add 7segDOThtml at the end. It also has "WK-D5210RBW" written on the side, but i have been unable to find anything via searching this.
  8. Jak

    Hiya.

    Not much to say, i'm a self-taught hack whose better at programming pc's than soldering. Also, i can use blender (not that great at it, but i'm ok) and i will never solder wearing plastic clothes again.
×