Show Posts
Pages: 1 2 [3] 4 5 ... 15
31  Development / Other Software Development / Re: 1-Wire Slave on: June 25, 2013, 05:45:28 am
Some new Sketches to play with for the 1-Wire-Slave:

1nd Analogread for temper

2st Serial in for temper
32  Development / Other Software Development / Re: 1-Wire Slave on: June 18, 2013, 12:49:17 pm
Now support for Teensy 3.0 and Arduino Due added.

For proper work with the T3 some changes must be done:

Add this on the void setup()
Code:
pinMode(12, INPUT);

And this on the void DS18B20() change this line
Code:
if (difference >= 380 && difference <= 800) {
to
Code:
if (difference >= 325 && difference <= 500) {

Thanks to Paul.

For the Due the Sample must be changed read this page about the interrupts.

http://arduino.cc/en/Reference/AttachInterrupt

Update:

Allowing to set resolution from Master or per command from slave side
33  Development / Other Software Development / Re: 1-Wire Slave on: June 15, 2013, 03:36:10 pm
Some improvement with support for the 44h command and set the "power supply" from the outsite the library.

Code:
ds.attach44h(temper);

-----------------------------------------

void temper() {
  scratchpad[1] = scratchpad[1] + 1;
  ds.setScratchpad(scratchpad);
}

Sometimes the "Slave did something wrong think he didn't get the Master reset.

Code:
ROM = 28 AD DA CE 0F 00 11 5B
  Chip = DS18B20
  Data = FF FF FF FF FF FF FF FF FF  CRC=C9
  Powersupply = Parasite Powered
  Temperature = -0.06 Celsius, 31.89 Fahrenheit

All FF so there is some miss.

New added:
34  Development / Other Software Development / Re: 1-Wire Slave on: June 15, 2013, 10:44:26 am
Surprise to my self.

Now an expedition into interrupts.

Quick an dirty with interruptsroutine for recognizing the Master Tx Reset Pulse...

But now the  DallasTemperature Library from Miles Burton works too, for it on the other side, and recognize it as well.
35  Development / Other Software Development / Re: 1-Wire Slave on: June 15, 2013, 05:15:57 am
1st the Hardware
 Black-Board an Vinciduino, Powered by an supply
 Blue-One an Arduino Nano Powered by USB
 And 3 real DS18B20 Powered from the Nano external.

2nd the Serial from the Nano
 4 DS18B20
 The last is the Arduino-Slave what you can see parasite Powered and burning@155°C
36  Development / Other Software Development / Re: 1-Wire Slave on: June 15, 2013, 05:09:12 am
It's about time to move some dust.

Moving from this http://robocraft.ru/blog/arduino/302.html way there to this https://digistump.com/board/index.php/topic,887.0.html. Thanks to all that Guys what they did.

I was able to start this. Files in the Attachment.

DS18B20_Slave.ino                        --> the Slave in Arduinostyle
OneWireSlave.cpp/.h                    --> the library for it
(did not work on Due or Teensy 3)

DS18x20_Temperature_edited.ino   --> an little edited Version of Paul Stoffregen's File from the last OneWirelib (2.2)

The Arduino pretend on with the DS18B20_Slave to be an DS18B20 with an temp of 155°C (clearly above the capabilities of the DS18B20 (125)) parasite powered. But under heavy duty.

What didn't work is the DallasTemperature Library from Miles Burton there are some problems with reset_search and the reset at the end of some parts.

Code:
// reads the device's power requirements
bool DallasTemperature::readPowerSupply(uint8_t* deviceAddress)
{
  bool ret = false;
  _wire->reset();
  _wire->select(deviceAddress);
  _wire->write(READPOWERSUPPLY);
  if (_wire->read_bit() == 0) ret = true;
  _wire->reset();     --> this line is not good fore the cloned DS18B20 without it works
  return ret;
}

May someone can help drive this forward to getting an working and universal library. Perhaps an interrpt driven Initiaization Timing can bring success but I'm not an expert for that.

This is really experimental. Nothing is convenient on this.

Pictures below:
37  Products / Arduino Due / Re: Amplify DAC output to 0v-12v on: June 05, 2013, 03:19:44 am
I've recently been experimenting with something similar. I need to convert the DAC output range 0.55V-2.75V (approx.) to 0V-5V. So the DAC output needs to be offset by -0.55V and have a gain of about 2.3 applied. The best results so far are with a differential op amp circuit. I can feed the DAC into one input, +0.55V into the other and get an output in the range 0V-2.2V. The overall gain of the amp can be adjusted to give a maximum of 5V. There are lots of examples of differential op amp circuits online.

I prefer this to the summing circuit because I don't have -0.55V available.

BTW, I would recommend buffering the DAC output when experimenting with it. I managed to kill one of mine somehow. I think I've read that they are not very robust.
Did you have a schematic for us to look at?
38  Products / Arduino Due / Re: from arduino due prototype to production on: June 04, 2013, 04:50:35 am
hi everyone,
I ave a project in mind and i'm using arduino due to prototype. my question is how can i pass from the DUE schematic to the 'MyProject' schematic? what can i take off from the board? what do i need to leave instead?

For example is the ATMEGA16U2 necessary?
Necessary depence on what you want with the ATMega16U2 can you use the Arduino IDE for automatic programming with the nativ USB-Port you need to clear the SAM by hand.

But necessary is only the SAM the USB-Connector on the nativ port and some wires to ground, if I right the SAM also did not need an external crystal instead.
39  Products / Arduino Due / Re: Amplify DAC output to 0v-12v on: June 04, 2013, 04:39:04 am
I am trying to use an arduino due to control the following http://www.vellemanprojects.eu/products/view/?id=354314 dc dimmer for an ac fan.

As far as I understand it the dimmer requires a dc input between 0v and 12v to control the ac fan with 0v stopping the fan and 12v for max speed.

I thought about using the DAC output and amplifying the dac output from the due.

Is this the right way to do it and how do I amplify the signal?

A quick search on Google makes me think that I need an op amp circuit to amplify the signal.  Can somebody point me to a suitable circuit for this or suggest a better alternative?

Thanks

May really not what you looking for but whats about an sperate IC for it like the AD5501BRUZ (12bit) or the AD5412AREZ (12-16bit) used SPI and take an seperate Voltage for the Output.
40  Products / Arduino Due / Re: BMA020 is always 0 on: May 24, 2013, 07:04:51 am
@Chris,

thanks for your ideas, but unfortunately it does not help.
The module which carries the BMA020 has a level shifter.
I have no external pull-ups (I know they are included on DUE).
I use several other I2C chips single and combined on the DUE.

What's not clear to me, why helps the oszi probe?
Now I use a 33pF SCL to GND. And it works.  smiley-surprise

Sounds for me at all there is ground missing on the BMA020 may somewhere is the ground connection broken by some wire
41  Products / Arduino Due / Re: Due DS1307 circuit. on: May 22, 2013, 07:38:34 am
I've just done this on Eagle and will build it tomorrow as I'm off to work shortly.

Might be useful to other people. 



Did you take a look at this http://ics.nxp.com/support/documents/interface/pdf/an97055.pdf for Levelshifting with MOS-Fet's can save some Resistors and space.
42  Products / Arduino Due / Re: RTC cann't running well in arduino DUE, because DUE's reset connects NRSTB on: May 20, 2013, 08:56:40 am
What if i turn off taiji-uino by powering off and turn on again? Will doing this cause rtc reset?
Yes Sir.
43  Products / Arduino Due / Re: Arduino Due RTC Library on: May 14, 2013, 04:23:22 pm
It seems to happen at this line:

RTC_clock rtc_clock(XTAL);

You're saying that the delay is waiting for the crystal to settle? Shouldn't using the crystal take less than 2 seconds?

In my words NOOOOOOOO!!!

The internal RC is extremly unstable about counting on time he is too slow. You will loose time.

May use the Teensy 3 who sets faster up in combination with the time lib
44  Products / Arduino Due / Re: Arduino Due RTC Library on: May 14, 2013, 03:18:37 pm
One thing I noticed when using this library: Instantiating the rtc object seems to hang the program for about 2 seconds. This didn't work for me in the project I'm working on because it needed to start processing input right away. I didn't trace down why it took so long. Is that normal to take 2 seconds?

If you give me a hint may I can help is it this part?

Code:
// Select the Slowclock source
//RTC_clock rtc_clock(RC);
RTC_clock rtc_clock(XTAL);

or does it came from this line?

Code:
rtc_clock.init();

By the first part it happend about the external xtal to swing-in
45  Products / Arduino Due / Re: cannot set pin 13 mode when using while (!SerialUSB) in setup on: May 08, 2013, 12:42:08 am
Wondering if someone can help me understand what is going on with the code below??

Code:
void setup()
{
  // This seems to ignore the pinMode statement but commenting out the while statement below works fine.
  while (!SerialUSB);
  pinMode(13, OUTPUT);
}

void loop()
{
  digitalWrite(13, LOW);
}

When changing the line above to "while (!Serial);" it works just as if it was commented out entirely.  I read somewhere that you should put while (!Serial); in your setup as a first step to ensure the serial port hardware is initialized before doing anything else with it.  Wouldn't this also be the case for SerialUSB when using the native USB port??

If the while statement on SerialUSB is used at all the digitalWrite statement has no effect and LED always stays on.

Yes thats right.

The code lines
Code:
while (!Serial);
and
Code:
while (!SerialUSB);

let the Due what until there is an USB connection between Due and PC. If you use the programming port and set this line
Code:
while (!Serial);
The Due will walk over this line while the USB is connected but if you connect after the programming the due with the nativ USB-Port nothing will happend the Due waits for an plugin in the programming port.

Vice versa for both ports.
Pages: 1 2 [3] 4 5 ... 15