Skip to main content

Messages

This section allows you to view all Messages made by this member. Note that you can only see Messages made in areas you currently have access to.

Messages - fcobcn

31
Project logs / Re: TMP006 BOB free build
Thanks again AndThen,
I will take a look, hopefully I will be able to measure running zombies : )
Have seen a couple lately!!
32
Project logs / Re: TMP006 BOB free build
Not a library yet, but here's a simple code snippet to get started using the TMP006 with *duinos.
I'm pretty sure there must be better and more efficient ways to convert the sensor data to physical temperature.

Code: [Select]
#include "Wire.h"
#define tmp066address 0x40 //wire library uses 7bit adrresses, 8bit address is 0x80

void setup(){
  Wire.begin();
  delay(1000);
  Serial.begin(9600);
}


void getTMP006data(byte *a, byte *b){
  Wire.beginTransmission(tmp066address);
  Wire.write((uint8_t) 0x01); // tmp register
  Wire.endTransmission();
  Wire.requestFrom(tmp066address, 2); //request two bytes
  *a=Wire.read();
  *b=Wire.read();
}

void showTMP006data(){
  byte aa,bb;
  float temperature=0;
  int tmp;
  getTMP006data(&aa,&bb);
  if (aa>127) // check for below zero degrees
  {
   
  tmp = aa << 8;
  tmp += bb; //concatenate aa and bb
  tmp = tmp >> 2; //shift 2 bits to the right
  tmp = ~tmp; //invert bits
  tmp +=1; // add 1
  temperature = (float)tmp / 32; //transform to physical temp in Celcius
  temperature = -temperature; //change sign
   
   

  }  else // it must be above zero degrees
  {   
  tmp = aa << 8;
  tmp += bb; //concatenate aa and bb
  tmp = tmp >> 2; //shift 2 bits to the right
  temperature = (float)tmp / 32; //transform to physical temp in Celcius
}
 
 
Serial.print("Temperature = ");
Serial.print(temperature,2); //print with two decimals
Serial.println(" degrees C");
delay(500);
}

void loop(){
  showTMP006data();
}

Response to variations in temperature seems to be slower than a thought.

UPDATE: Code above is incomplete, it's returning the local temperature of the sensor, not the object been measured. That explains why I was getting such a slow response!
33
Project logs / IRtoy free build
Yesterday I finished building my free IRtoy V2, previously I did the trough hole version, but I sent it by mistake to my home country (wich is far from here).
The smd crystal came from an old hard disk drive, the right angle pinheader is from a floppy disk drive.
I love recycling!

[attachment=1]

Quick test, everything seem to be working ok!

[attachment=0]

I couldn't get it to work with three leds in series, so for the moment I'm using only one.

Thanks Ian for providing us countless hours of free fun!
34
Project logs / Re: TMP006 BOB free build
Thanks AndThen,
It shouldn't be a problem, as the graph shows, error is less above 0 C for 5v.
For temps below 0 C, error is less for lower VCC.
35
Project logs / Re: TMP006 BOB free build
Thanks Ian!
I plan to put together a library for *duinos.
I haven't got to much luck yet, but I promise to release it as soon as I have it working properly.
A have one doubt,
looking at the the page on ti: http://www.ti.com/product/tmp006&DCMP=h ... A+tmp006-b
The parametrics says that the max voltage is 3.6V
on the datashet: http://www.ti.com/lit/ds/sbos518b/sbos518b.pdf
on page 4, it says 5.5V
Anybody can confirm that the TMP006 it's 5v tolerant?
37
Project logs / TMP006 BOB free build
Just in time for today's blog post, I received and quickly built the TMP006 temp sensor board.
Had luck, it worked the first time, so my succes rate with BGA soldering is 100% at the moment. ; )

[attachment=2]

Here's the finished pcb having a ultrasonic bath in alcohol, got a cleaner last week very cheap on ebay. No more sticky boards!

[attachment=1]

Here's the board connected to my bus pirate

[attachment=0]

Quick test, it's working!

Thanks Ian!
38
Bus Pirate Support / Cheap DIY Bus Pirate v.4 cable
I wasn't using my free build Bus Pirate v.4 until now, because of the lack of cables and pinheader.
While browsing a junk box the other day I found this:

[attachment=3]

It came from an old compaq server I dismantled  years ago.
As the cables go out parallel to the connector, I decided to use an angled pinheader.
I didn't have any, so back to the junk box I found an old disk drive;

[attachment=2]

I had to cut it, here's how it ended up looking:

[attachment=1]

I personally prefer having the angled connector, it makes the Bus Pirate more stable over my desk.
I took a look at other desktop tools like the Saleae logic or USBee, they all have the pins coming parallel to the board.
This could be something to take into account for future DP designs.

[attachment=0]

The probe hooks are from ebay, they are really cheap, I got one hundred of them for less than 20 dollars.
39
Project logs / Re: Cygni free build
Thanks Brian,
Setting serialprog to 1 did the trick, unfortunately while trying previously, I screwed up the bootloader, so it gets stalled while running the sflash command.
Looks like I will have to wait until I get my Bus Blaster working to continue learning on the cygni board.
40
Project logs / Re: Cygni free build
Thanks Brian
I followed the mac guide on your site, in fact, yesterday I added two missing dependencies to it  : )
I'm stuck here at the moment:

Code: [Select]
B1:blinky fco$ make flash
arm-none-eabi-objcopy -Obinary blinky.elf blinky.bin
./do_flash.pl blinky.bin
problem connecting to "127.0.0.1", port 4444: Connection refused at ./do_flash.pl line 20
make: *** [flash] Error 61
 
Why does it try to open a telnet connection?
42
Project logs / Re: Cygni free build
Managed to upload the bootlader via UART and compile blinky with no trouble.
[attachment=0]
[attachment=1]
Unfortunately make flash is not working at the moment, I'm getting error messages.
Will report back as soon as I have blinky loaded...
43
Project logs / Re: Cygni free build
Thank you guys!
Brian, will give it try, otherwise I will have to see if I can use my Bus Pirate or wait until I finish populating a Bus Blaster V4.
Those pin headers have been difficult to find...
One important thing, the missing piece to get everything working easily on mac was this:
https://github.com/jsnyder/arm-eabi-toolchain
Still need to do more tests but all seem to be working good.
The bigest trouble now are my poor programming skills!

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01562448520session_write_close ( )...(null):0
20.01592580144ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01592580920Database_MySQL->query( ).../DatabaseHandler.php:119
40.05912719680Database_MySQL->error( ).../Db-mysql.class.php:273