Show Posts
Pages: [1] 2 3 ... 23
1  Using Arduino / Motors, Mechanics, and Power / Re: Controlling a Canon Printer on: April 12, 2012, 03:11:19 pm
@rocketgeek: not the same, I have seen it, Much lower resolution and it is much slower than printers are today.
it is easier for me to go to the store and buy IP3600 printer if I can get it to work as in the second video.
Plus the system can be used as Direct To Garment printer smiley-wink Full color (flatbed T-shirt printer)

I have a homemade CNC that I want to convert, if I can get away with using a pair of steppers for only driving the printer mechanism along the table and a pair for dropping the table, I would be happy (g-code for driving x(or y) and z axis only).
Then powder system...

In the video it seems that he captures the newline signal to trigger the stepper to forward the glass and then gives ok signal to print again after that.
If that is the case, then I could capture the pagefeed signal to prepare the table for next layer (powder and lower table) via Processing or custom Java or delphi program (my favorite choices of programming languages in reverse order).
The program would take STL file slice it to  image files and send each image page to the printer and control the Arduino (steppers).

2  Using Arduino / Motors, Mechanics, and Power / Controlling a Canon Printer on: April 12, 2012, 10:50:40 am
Hi there
I was surfing the other day and came across a cool Arduino controlled expresso maker

But the cool thing I saw was the to be the next addon to the machine namly:

Where he guts a Cannon printer, puts edible ink in the printhead and uses Arduino + stepper to controll the forward, axis withe coffee mug on it.

So the question is How Hard Is It To do This?

I was looking into building a 3D- powder printer, so this would be a perfect start for such a project
Printer spraying Water/binder onto Gypsum/printmaterial for one page and then lower the tray, rake new material over and start again.

Any Ideas??
3  Using Arduino / Programming Questions / Re: LCD Display problem on: October 06, 2011, 07:39:42 am
But the potentiometer could be replaced by a plane old resistor, try  a 1k ohm if there is no text try a smaller one.

You are meaning resistor divider right??.. don't think you would get the right effect otherwise smiley-wink
4  Using Arduino / Programming Questions / Re: LCD Display problem on: October 06, 2011, 05:12:32 am
You need the potentiometer to adjust the backlight to right level so.... Otherwise you don't see anything
the other solution is to send a PWM signal to mimic the potentiometer. it needs also to be on the right values, so make a loop going though all the pwm values with a small delay and print the value on the LCD, when you see the value on the LCD then you have the right intensity.
I have done that once when I ran out of Pots smiley-wink
It did work ok, small flicker but ok (but then I did use a shiftregister also smiley-wink )

5  Using Arduino / Programming Questions / Re: why don't 'while' work? on: October 06, 2011, 05:06:22 am
you could move your while loop in to the setup code, as it is intended to run once only...
then you can leave the loop empty or do some other useful work

Setup runs only once after reset of the arduino and is the right place for code that runs only once.

6  Using Arduino / Programming Questions / Re: The GY-26 Compass sensor module on: September 29, 2011, 03:21:30 pm
I was just ordering this module....
Using it in IIC mode, how would I get compass reading.
I mean it sais in the manual that reading 0x01 address gives the 8bit HIGH of the angle and address 0x02 gives the low 8bits
So how do I translate this into real degrees??

Is the output in steps of 0.1 or 0.01 degrees per bite or what (since serial response is in 0.1deg resolution) ? the manual is somwhat unclear on I2c response and only shows what to write to get response...
Do I need to map UART (serial) response against I2c response to decode this?
7  Using Arduino / Sensors / Re: A sanity check for ADXL335 50+ hours and no luck! on: September 22, 2011, 03:36:19 pm
just grab your multimeter and one rotary potentiometer and adjust, it will probably be the most painless operation. the chanches of the 5v mirroring the 3v3 fluctuations are big smiley-wink so if you connect the pot to 5v it should be ok. You should not overengineer this thing with too many of components, if doing that go for the big gun and use omp-amps and voltage offseting and bigger ADC smiley
My guess is that your thingy will be too fast to keep up with super fine resoloution and thus slower reaction arduino because of higher amount of data going through the processing....

8  Using Arduino / Sensors / Re: A sanity check for ADXL335 50+ hours and no luck! on: September 21, 2011, 05:09:30 am
Use a voltage divider to drop the 3v3 referance to about 2V, this is more than the internal voltage comparison (1.1V) so it should be ok.
this will increase the resolution to about 1/2 degree or so.

You could also use the internal referance of 1.1v and use voltage divider on the ADXL335 so it does not exeed the 1.1V, not sure what is better

9  Using Arduino / Sensors / Re: faster ds18b20 temp sensor readings on: September 19, 2011, 06:24:58 pm
as  the sensor pulls the line low when converting,  you would test for it geting high not low smiley
boolean sensorConversionIsReady()
  return digitalRead(DS_PIN) == HIGH);

Regarding availableDevices:
The best way is probably to make a function that returns the next available ready sensor's index number or selecting the nearest ready sensor
like nextReadySensor() or something like that, and while there are more sensors in the array, would return the next ready sensor having a higher index number than that is selected.
Having all available ready sensors would probably be harder to use and require multiple calls to use, and then more devices are probably ready smiley-wink
the Array would yes be  more space eating and more complex to use
for (i=0 ; i < getReadyDeviceCount() ; i++) {
Serial.print("device: ");
Serial.print(getReadyDevice[i]);  // getReadyDevice[i] would then give the sensor address of the ready array
Serial.print(" Temperature: ");
Serial.print(sensors.getTempC(getReadyDevice[i]));  // and get the temperature

There are traps using the line pulled low, as it is not done just for temp conversion but still it is the best indication smiley
10  Using Arduino / Sensors / Re: faster ds18b20 temp sensor readings on: September 18, 2011, 03:56:45 pm
Thanks for the reply,it is appreciated. I rather not change your library as you now it better than I do.
That being said, starting the Async routine by checking if reading is ready would be nice.
Mabye adding a new function to the library would not be as hard as changing the old ones?
then it would be 3 things I would like to see:

1: boolean sensorConversionIsReady();
      Just one test showing if line is pulled low or high on selected sensor.
      A flag to indicate if Async procedure can be completed.
        If sensor is not ready,then prosess some more loops of the program.
        If sensor is ready, then we can end the Async by asking for the temperature from the scratchpad.

2: waitForConversion();
      A call to make prior to ending Async transaction
         this is my while loop I posted, the program has done its processing and
         there is nothing left but wait for the temperature to show up.
         So we wait and then ask for the reading

3: show availeble ready sensors
    just return an array of the sensor addresses that  have the conversion completed.

First two would be rather nice to have, and in two formats, one taking adress referance and the other using the selected sensor.

If you could implement this, It would ease the uncertanty of knowing if sensors have new data to send...


btw, when I say I saved 110ms in my first post it is in reality more, as the call to ds18b20 to take a new reading takes about 20ms
So, the hardcoded delay is after that call so it is more like 130ms savings as I timed the whole loop, not just the conversion part...
Your 600ms loop would probably just need 20-30ms more wait to complete the conversion not 150ms smiley-wink
11  Using Arduino / Sensors / Re: How to move a servo with an analog input on: September 18, 2011, 03:44:35 am
why not map in just another way:

if pot is giving a value over 511 (2.5 volts at input) then map the values from 511 to 1023 to coordinates 0-180 of the servo

void loop()
  val = analogRead(potpin);            // reads the value of the potentiometer (value between 0 and 1023)
  if (val >=511) {  // if analogRead is equal or over 2.5V
    val = map(val, 511, 1023, 0, 179);     // scale it to use it with the servo (value between 0 and 180)
    myservo.write(val);                  // sets the servo position according to the scaled value
  delay(15);                           // waits for the servo to get there

This is untested code, so .....

12  Using Arduino / Sensors / Re: faster ds18b20 temp sensor readings on: September 17, 2011, 08:50:51 pm
The post is more of a solution than a question though, to share my findings to the community. I needed to know the actual time that goes into the conversion call because of it connects to PID regulation routine. I do not want to call PID regulating routine more often than I have a new real temperature reading to use, as it serves no purpose...

My project is a seperation of few liquids with similar boilingpoints so I need the extra decimals of 12bit resolution.
I need one particular temp. reading to be fast, as the valve opening acts quite fast on the temperature (less than a second).

I will ofcourse test less resolution against quality, but 110 ms off the standard reading in 12bit mode is nearing my goal.

Why I use DS18b20 is my attempt to run my project on a single UNO smiley-wink

If I can run the project of one of my newly bought NANODES, it will be great,as then I will have internet access to my d********t*** c****n i.e. use my phone or tablet to watch and set parameters

currently I have hoocked up 4x DC SSR, 2x AC SSR ( 3 solenoid-valves, 2x pumps, 2x heaters ), LCD  (running in 3-wire), 4 potentiometers, 6-leds, 1-button, 8x 1-wire-ds18b20.

So I do not have many pins left............ If all fails I revert to using my Mega1280,
13  Using Arduino / Sensors / Re: Multiple temperature sensors. on: September 17, 2011, 07:55:43 pm
I use 8 pcs DS18B20, in a star network, NON-PARASITIC i.e. I use 3 wires (pwr, gnd, data) on all sensors total (only one pin used for data for 8 sensors, all wires of same colour just connected together with a screw-terminal + 1 resistor between data-and-power)
My sensors are encased in a stainless-probe-tube, actually idendical to Adafruit's sensors but cheaper smiley-wink
( )
about $4 a piece...

I did test all my 10 sensors together (bought spares) and it worked just fine. Only problem is that the sensors need some time to digitalize the temp readings (how much, depends on the accuracy you need or think you need)

I use address based calling to the sensors opposed to just ask for next, next....
the drawback is of course that if one sensor has to be replaced, I need to recode my program with the new sensor address...

14  Using Arduino / Sensors / faster ds18b20 temp sensor readings on: September 17, 2011, 06:54:23 pm
Hi, there
I have a project that uses 8 dallas ds18b20 sensors for PID controlling
I ran into trouble with the dallas temperature library as the value of 750ms is hardcoded into the library....
Calling it Async poses the question when the sensors are ready......
Reading the datasheet for the sensor reveals that the dataline is pulled low when concersion is being made and then high again
so ditching the dallas library and going for the OneWire instead I wrote  a test to read one sensor :

float getTemperature(byte addr[8]){
 byte i, dat;
 byte present = 0;
 byte data[12];
// alle sjekk er slettet
 // Start conversion
 // TEST TEST==========================================
 dat =;
 while (!dat){
  dat =;
 // END TEST **********************************************'
 present = ds.reset();;
 // Issue Read scratchpad command
 // Receive 9 bytes
 for ( i = 0; i < 9; i++) {
 data[i] =;

so with 1 variable that is not needed really but for ease of reading the code and 1 small while loop, the program waits only as long as needed.

So how much time did I save then??
Using milis() variable before the call to the temperature readings and subtracting the variable from millis() after the reading...
(Output from my serial monitor; temp in deg C, followed by milliseconds taken to ask for a new temp reading + converting)
--Search started--
Device is a DS18B20 : 28-3E-81-4B-03-00-00-76
Device is a DS18B20 : 28-BE-BD-4B-03-00-00-39
--Search ended--

Temperaturen er: 23.3750

Temperaturen er: 23.4375

Temperaturen er: 23.5000
The serialmonitor is only sent a message if the reading is not the same as the previous, to make it easier for me to follow...

so my readings  from that session took about 637-639 ms to complete (12bit mode test)
savings of over 110ms average pr. call !!

that is almost a full second less spent if I call my sensors seperatly and not ASYNC

@Author of Dallas Temp Library: could you skip the CASE test for the delay of the sensors and just test for low/high line
    // TEST TEST ==========================================
   dat =;
   while (!dat){  // while the line is low, the conversion is not ready...
    dat =; 
   // END TEST **********************************************'

Enjoy less time waiting for a new temp-reading

15  Topics / Science and Measurement / Re: Binary Equation on: September 04, 2011, 12:44:17 pm
try this:
(this is a 10bit conversion scheme)

in an arduino sketch you would use / (division) and % (modulo)  on integers in a while loop (or for, or any flavour of loop you desire)

you would not find an algebraic function that is not recursive, to do your work.

Pages: [1] 2 3 ... 23