Show Posts
Pages: [1]
1  Using Arduino / Motors, Mechanics, and Power / Re: 6 small dc motors scrambling screens on: September 11, 2012, 03:02:46 pm
Your power supply is totally undocumented.

yeaaa... sometimes I'm impressed and slightly scared that we were able to get Engineering degrees with this project... A lot of the documentation is plain wrong. Plus, we were mostly software guys so in the hardware spectrum we stuck with what we knew. I believe we did add some decoupling to the power supply but that did not solve the issue, I will retest once the thing is up and running again. I figured in the worst case, I could reset the lcds after each run(but I cant imagine we didn't think of that initially)

I do like your idea of the voltage divider... seems like that would simplify a lot of my input logic.

I will try to get to this soon, I'm hoping to have it working by holoweenish.
2  Using Arduino / Motors, Mechanics, and Power / 6 small dc motors scrambling screens on: September 10, 2012, 11:42:12 am
SO about a year ago I finished my senior project - a liquer dispensing machine and graduated college.

we got the thing working for exactly the demo and then it sat in my basement for the year. I'm contemplating redoing it but trying to figure out a pouring mechanism better than the original.

I attached the design review, page 17 has the pumps schematic, these were small 3v motors from battery powered fish tank air pumps, I would pump air into the bottles which would force liquid out. the system had its issues but was cheap and simple and worked.

All the problems could be tolerated except for 1. everything was powered by a pc power supply, capable of a couple hundred watts. When the pumps were activated they would turn the lcd display into garbage output, and recovering was impossible without restarting the machine. we found that running the motors off the power supply and powering the arduino and lcds off of a usb drive connected to a PC would work and we would be able to have multiple runs without problems (although occasionally the issue would be seen) our conclusion was that it was some sort of electromagnetic interference, but we had slacked off to long and slapped it together in the last days  so we never solved the problem.

is there anyone out there that can hypothesize what the problem may be. My plan is to get the thing up and running again, the control system, and the UI were pretty solid, so I will reuse that, I would like to use the pouring mechanism but I'm willing to redesign that if I cant solve this(any redesign ideas also would be appreciated) its pretty hard to find parts unless I want to get booze dispensors and scrap them, but that gets expensive.
3  Using Arduino / Programming Questions / Re: SD Card Question(Although possibly a pointer problem or Serial problem) on: October 25, 2011, 07:53:24 pm
This is correct. It was a memory issue, I think. I was using a duelmilove with 30k of ram. 12k was used for the code and  the structs that needed to hold the data came to about 8k. while this is only about 20k, when I switched to an arduino mega, everything works great.
Im not sure what the other 10k of memory was filled with.
4  Using Arduino / Programming Questions / SD Card Question(Although possibly a pointer problem or Serial problem) on: October 25, 2011, 11:32:23 am
So I have this code below. i'm trying to read a series of bytes for a file on an sd card. The card reader checks out and works great on the demo files that are with the arduino and a few small read, write, read etc... files I wrote. Here is the issue I'm seeing. When the readIngredients() function is called, nothing prints to serial, not even the initial initialization print lines. When I remove the parameters to readIngredients, everything prints finr. but I think thats a sign of something failing.

the structs look like this they are in a header file that is included. all the constants are defined in the file too but, that is quite long so I wont bother posting it unless it makes a difference.
typedef struct {
  char name[NAME_SIZE];
  short amount;
} ingredient;

/* Drink data structure
    name - name of ingredient
    ingredient - list of ingredients in recipe
    numIngreds - number of ingreds for this drink

typedef struct {
  char name[NAME_SIZE];
  ingredient ingred[MAX_INGREDS_PER_DRINK];
  int numIngreds;
} drink;

typedef struct {
  int pinNum;
  int state;
  } pin;


And here is the file. pretty much the read ingredients funcition calls the readData function which reads a number of bytes from the file and places them into a string which then in readIngredients gets placed into the array of ingredients

Any comments or help are greatly appreciated.. Ive been banging my head on this for many hours. I did write  a similar program in C to just test my pointer logic, and it seemed to work, but removing all the code except for the function decleration still leads to the issues I'm experiencing.
#include "defs.h"
#include <SD.h>
#include <string.h>

// list of all possible ingredients 
  ingredient _ingredients[MAX_INGREDIENTS];

  // list of ingredients in the ingredient holders
  ingredient _selectedIngredients[MAX_INGREDS_PER_DRINK];

  // list of all possible drink recipes
  drink _drinks[MAX_DRINKS];

File myRecipeList;
File myConfig;
// drinkIndex -- currently selected Drink
// ingredIndex -- currently selected Ingredient holder
// numDrinks -- Number of Drinks that have been read from the SD Card
// numIngreds -- Number of Ingredients that have been read from the SD Card

 int drinkIndex = 0, ingredIndex = 0,
          recipePageIndex = 0, numDrinks = 0,
         numIngreds = 0, recipeIndex = 0;
//This should be moved to main so you can call all the crap with direct pointers         

void setup() {
  for (int i = 0 ; i < NUM_PINS; i++) {
    pinMode(PINS[i].pinNum, PINS[i].state);


     // Initialize SD Card
  if (!SD.begin(4)) {
    return; // fail if we can't

    myRecipeList = ("recipe.dat",FILE_READ));
    if (myRecipeList) {
    // Read ingredients first, then read recipes
    //Serial.print("File opened... reading ingredients \n");
    // Serial.print("File opened... reading recipes \n");
   // readRecipes(_drinks,_selectedIngredients);

  // Close file

void loop() {

void readData(char * myString, int len) {
  for (int i =0 ; i < len; i++)
    myString[i] =;

void readIngredients(ingredient * selectedIngredients,ingredient * ingredients) {
  Serial.print("reading ingredients..");
 boolean done = false;
 ingredient * myIngred;
 while ( numIngreds < MAX_INGREDIENTS && myRecipeList.available()) {
    myIngred = (ingredient*)&ingredients[numIngreds];   
    readData(myIngred->name, NAME_SIZE);   
    char amnt[AMNT_SIZE];
   myIngred->amount = atoi(amnt)/100.0;   
  // Default to first ingredient in list (should be water)
  // Load this ingredient into all six ingredients holders
int i = 0; 
for (; i < MAX_INGREDS_PER_DRINK; i++){}

5  Using Arduino / Project Guidance / Can someone check and maybe give some tips to a fairly fresh electronics guy. on: May 16, 2011, 12:26:27 am
I want my Arduino to control 6 different small electronic motors. They are from battery powered fish tank air pumps that run off 2 AA batteries. I only need 1 of them to run at a time so I figured a Demux would work nicely. in reading through other peoples demos and ideas it was apparent that the arduinos ports did not put out enough current to power the motor. so I put together this schematic. My problem is selecting the correct transistor. my guess is that 100mA is enough current to get these guys running, they are you''re standard can shaped motors that get used in every basic project.

Is there any good way to measure the current draw? What transistor should I select?

Once that is selected, I figured I could use PWM to control the speed of the motors, essentially my program would select a particular pump and the pwm would control the speed. This seems reasonable to me if its only getting high pulses for 80% of the time, it will run slower (probably not 80% speed, but precision is not an issue here). any problem with that logic?

any issues with my schematic?

Pages: [1]