beta:3950 thermistor table for marlin

here’s the thermistor table for the thermistors with a beta of 3950, 100k ohm type. These can usually be found for really cheap on ebay and such, but finding the table for marlin firmware is a bit difficult so here it is, just replace type 8 with this code in thermistortables.h.

#if (THERMISTORHEATER_0 == 8) || (THERMISTORHEATER_1 == 8) || (THERMISTORHEATER_2 == 8) || (THERMISTORBED == 8) // QU-BD silicone bed QWG-104F-3950 thermistor
const short temptable_8[][2] PROGMEM = {
         {1*OVERSAMPLENR,        938},
         {31*OVERSAMPLENR,       314},
         {41*OVERSAMPLENR,       290},
         {51*OVERSAMPLENR,       272},
         {61*OVERSAMPLENR,       258},
         {71*OVERSAMPLENR,       247},
         {81*OVERSAMPLENR,       237},
         {91*OVERSAMPLENR,       229},
         {101*OVERSAMPLENR,      221},
         {111*OVERSAMPLENR,      215},
         {121*OVERSAMPLENR,      209},
         {131*OVERSAMPLENR,      204},
         {141*OVERSAMPLENR,      199},
         {151*OVERSAMPLENR,      195},
         {161*OVERSAMPLENR,      190},
         {171*OVERSAMPLENR,      187},
         {181*OVERSAMPLENR,      183},
         {191*OVERSAMPLENR,      179},
         {201*OVERSAMPLENR,      176},
         {221*OVERSAMPLENR,      170},
         {241*OVERSAMPLENR,      165},
         {261*OVERSAMPLENR,      160},
         {281*OVERSAMPLENR,      155},
         {301*OVERSAMPLENR,      150},
         {331*OVERSAMPLENR,      144},
         {361*OVERSAMPLENR,      139},
         {391*OVERSAMPLENR,      133},
         {421*OVERSAMPLENR,      128},
         {451*OVERSAMPLENR,      123},
         {491*OVERSAMPLENR,      117},
         {531*OVERSAMPLENR,      111},
         {571*OVERSAMPLENR,      105},
         {611*OVERSAMPLENR,      100},
         {641*OVERSAMPLENR,      95},
         {681*OVERSAMPLENR,      90},
         {711*OVERSAMPLENR,      85},
         {751*OVERSAMPLENR,      79},
         {791*OVERSAMPLENR,      72},
         {811*OVERSAMPLENR,      69},
         {831*OVERSAMPLENR,      65},
         {871*OVERSAMPLENR,      57},
         {881*OVERSAMPLENR,      55},
         {901*OVERSAMPLENR,      51},
         {921*OVERSAMPLENR,      45},
         {941*OVERSAMPLENR,      39},
         {971*OVERSAMPLENR,      28},
         {981*OVERSAMPLENR,      23},
         {991*OVERSAMPLENR,      17},
         {1001*OVERSAMPLENR,     9},
         {1021*OVERSAMPLENR,     -27}
};

#endif 

PS2 IR Codes

I was trying to find the IR codes for the PS2 dvd remote control, but after a little research, I found these.

X – 0x7AB5B
O – 0xBAB5B
triangle – 0x3AB5B
square – 0xFAB5B
up – 0x9EB5B
down – 0x5EB92
left – 0xDEB92
right – 0x3EB92
L1 – 0x5AB92
L2 – 0x1AB5B
L3 – 0x8AB5B
R1 – 0xDAB5B
R2 – 0x9AB5B
R3 – 0x4AB5B
start – 0xCAB5B
select – 0xAB5B

DVD remote commands

Play – 0x4CB92
Pause – 0x9CB92
Stop – 0x1CB92

The codes are 20 bit sony codes, so can be used with the arduino IRlibrary by this command:

irsend.sendSony(0xXXXXX, 20);

The codes need to be sent twice with a 10ms pause in between the commands.

Hopefully this will help whoever to do what they want with thier projects. I thought about using this with an old psx gamepad and using a atmega328 and battery to make it wireless through IR for the ps2 since they dont have the joysticks anyhow.

Hex to Decimal Python Program

Here’s a clip of code to convert either a hex to decimal value, or decimal to hex.

copied from here:

http://www.daniweb.com/software-development/python/code/216638/hexadecimal-to-decimal-python

Just modify it for your needs, and it’ll help with sending the commands from the Robosapien arduino library.


# change a hexadecimal string to decimal number and reverse
# check two different representations of the hexadecimal string
# negative values and zero are accepted
# tested with Python24 vegaseat 11oct2005
def dec2hex(n):
  """return the hexadecimal string representation of integer n"""
  return "%X" % n
def hex2dec(s):
  """return the integer value of a hexadecimal string s"""
  return int(s, 16)
print "dec2hex(255) =", dec2hex(255) # FF
print "hex2dec('FF') =", hex2dec('FF') # 255
print
print "hex(255) =", hex(255) # 0xff
print "hex2dec('0xff') =", hex2dec('0xff') # 255

Robosapien/WowWee IR arduino library

I got another robosapien in the trash, but this time is a robosapien V1. I didnt feel like tearing this one apart to have to run a cable to it to inject it into it’s brain, so I started messing with the library used here:

http://daverobertson63.wordpress.com/2013/05/05/updated-robosapien-ir-control-arduino/

The issue was, when using his code, it only worked from the arduino only, and only worked with the original robosapien V1 robot, so I tore apart his code and modified it to add in support for other WowWee products like V2 and roboraptor.

The issue was, his code was locked so that it could only handle sending 8 bit codes(one byte), but the V2 and other wowwee products use 12 bit codes, so a little bit of it had to be changed to handle the 12 bit codes. The IR codes use the same type of data being sent, same 8 bit codes, but uses a 4 bit identifier code that makes that specific remote only work on that robot.

Just download the standard IRremote library here:

http://www.righto.com/2009/08/multi-protocol-infrared-remote-library.html

and replace the normal files with the ones in this archive:

http://www18.zippyshare.com/v/95213422/file.html

mirror here:

https://drive.google.com/file/d/0BwYG1PFb3ZByaTAxMlJZS2pIM1E/edit?usp=sharing

Here’s a bit of an example for transmitting the codes out from the serial connection/usb.

/*
Based on IRSend demo from ken Shirriffs library -
this sends simple commands to a RoboSapien V1 using
and IR Transmitter with Arduino
*/

#include <IRremote.h>
IRsend irsend;        // pin 3 as IR LED output
int data;
void setup()
{
  Serial.begin(9600);
}

void loop() {
  while (Serial.available()> 0) {
    data = Serial.parseFloat();
    // Serial.println(data);
    irsend.sendRSV1(data);
    irsend.sendRSV1(data);
  }
}

The send irsend.sendRSV1 command can be changed to irsend.sendRSV2 to send the alternative codes for V2, robo raptor, or almost any of the wowwee robots. You’ll have to convert the hex addresses to decimal to input them, but you can easily do that with a python script or whatever. To just mess around with it, I was using the calculator on windows/linux and setting it in advanced/programming mode and clicked the hexadecimal circle, typed in the command on the site, then clicked decimal and it would show the decimal number.

Here’s a list of all commands for a bunch of the wowwee robots:

Robosapien V1 codes:

http://www.aibohack.com/robosap/ir_codes.htm

Robosapien V2 and other wowwee robots:

http://www.aibohack.com/robosap/ir_codes_v2.htm

on the V2 page, the 3xx is the 0011, aka the robot identifier code, to change to another robot, just change the 3 to whatever robot you are trying to control.

I hope that everything works good for everyone, It’s experimental still, but it works for me at least.

Updated RoboSapien IR Control – Arduino

Originally posted on Davy's Blog:

There is a brilliant hack for these http://playground.arduino.cc/Main/RoboSapienIR.  I wired this up – but I ended cutting up the poor thing – so I thought I could try it with an IR transmitter instead to do the same thing.  Also means you dont have to ruin your soldering iron punching a hole through the body :)

I decided to use the Ken Shirriff IR library.  Its  work of genius.

http://www.righto.com/2009/08/multi-protocol-infrared-remote-library.html

But it didnt have one for Robosapien. The way it works is pretty cool – but you need a couple of days hack time to figure it out.  The codes from the sapien controller seemed to be in single bytes – so with some effort I managed to get it to transmit those codes.  I tried it on 6 sapiens I bought for a school project.

I updated three of the library files.  I have not included the whole…

View original 659 more words

Updating firmware on USBASP from eBay

I got a USBASP off of ebay over christmas, but when trying to use it, avrdude and arduino would complain about the sclock not being able to be set. After a while of looking it up online, I found out that the issue was with an old firmware, so after a little research, this is what I discovered and what I had to do to update it.

This guide is for linux, if you want a guide for windows, here’s one that is the equivalent of it:

http://www.rogerclark.net/?p=702

First, install the megaisp sketch on an arduino, then hook the arduino to usbasp by connecting the arduino’s pins, to the 10 pin header on the usbasp programmer, using this diagram to hook it up:

My connections were
 Arduino    USBASP
 5V ———– 2
 GND ——– 10
 13 ———— 7
 12 ———- 9 (MISO)
 11 ———- 1 (MOSI)
 10 ———  5 (RESET) 

Just make sure to have it unplugged from the usb port while doing all of this. Also, you’ll need to short the program pin, on mine, it was pin 2 but you may need to check yours to see what yours is. I used a piece of wire on mine shortly to short them together, just by putting the wire through the holes and wrapping the wire around the whole USBASP programmer.

Then try to use this command in the command prompt, if everything goes correctly, it’ll say something like “AVR: ready to accept commands” or something like that:

avrdude -c avrisp -P /dev/ttyACM0 -b 19200 -p m8 -v

If it complains about “AVR: not found” or something like that, then check your wiring, or check your programmer’s chip to make sure it has the ATMEGA8, and if not, change the “m8″ to whatever chip is used.

If everything works fine and it is ready to accept the commands, you can download the updated firmware from the site. Here’s the link: http://www.fischl.de/usbasp/

Just download, extract, and use this command to update the firmware:

avrdude -c avrisp -P /dev/ttyACM0 -b 19200 -p m8 -U flash:w:usbasp.atmega8.2011-05-28.hex

If everything went according to plan, you should be able to just unplug the USBASP from the arduno and plug it into the computer , all ready to go.

Here is the one that I purchased and that the pinout worked on:

usbasp programmer

Also, if you have one of these, and you notice that it doesnt work sometimes, just unplug it and wait a few mins, then try again, mine tends to misbehave if you unplug it and plug it in a few times, I think mine just spazzes out sometimes.

Setting up the Raspberry Pi to be a PS3 streaming server (DLNA server)

A while back, I kinda wished that I could stream the stuff from my raspberry pi server, which had torrent server, octoprint (3d printer server), NAS server, server for standard printers(cups), and many other servers, to my playstation 3, but no matter what I tried, I couldnt get anything to work. I finally discovered that what most systems use to detect media servers like ps3 media server programs is called a DLNA protocol, then after a little research, I discovered that the raspberry pi has a version of DLNA that can run on it easily called minidlna.

just do:

 sudo apt-get update
 sudo apt-get upgrade
 sudo apt-get install minidlna

Then edit the configuration file by typing this into the terminal:

 sudo nano /etc/minidlna.conf

you’ll see something like this:

media_dir=/home/pi/videos

at least starting with “media_dir”, just change the stuff after the = sign to where your files are that you want to stream.

You can also uncomment the line

 friendly_name=raspberrypi

to anything you want, and that is the name that will show up on the ps3/bluray players/media centers.

To get it to start up on boot, just run this command at the terminal:

sudo update-rc.d minidlna defaults

and reboot the raspberry pi. If you make any changes to the /etc/minidlna.conf file later on, you’ll have to have it update the library files manually. You do that by typing in this command into the terminal:

sudo service minidlna force-reload

After that, just start up your ps3, and within seconds, you should see a new icon under music, pictures, and movies that has the debian like logo. That will be the raspberry pi with all of your video files/music/pictures.

Ive also found that alot of bluray players and such that are hooked into the network, they’ll also have that same icon appear on them also with the same layout and everything as the ps3, and will be able to stream the media to them, assuming that the bluray players will actually support the said media in the first place.

thingiverse page

here’s the link:

http://www.thingiverse.com/cae2100/designs

Low Profile Printable Pibow

Well, I havnt really posted anything in a while due to the fact that Im not really much of a blogger type person, and that Ive been busy designing some ideas.

I made a case that was low profile for the raspberry pi B version, but it allows access to the GPIO pins and everything, just like as if you didnt have a case, so plates/shields fit on it perfectly and are still usable. I know you can access the GPIO on the normal raspberry pi B pibow version, but you need a cable, this one, you dont. This one is more for people who do the electronics and such, or just want a cool looking case.

here’s a pic, there’s more on my thingiverse page with the design files that you can just print out.

Image

Image

http://www.thingiverse.com/thing:214301

In the sources part, there’s a printable pibow, just print out parts 0-4 only, then print out my rpi5/rpi5_cam file, and it’ll fit all together just like the normal pibow cases, but my piece replaces part 5,6,7, and 8.

It’s the one I use now, and everyone loves the look of it, even more so than my other cases that Ive bought in the past.

Primer Tutorials for Arduino IR Remote Cloning and Keyboard Simulation

Originally posted on Hackaday:

ir arduino

We’ve featured loads of IR Arduino projects and they are all exciting and unique. The projects spring from a specific need or problem where a custom infrared remote control is the solution. [Rick’s] double feature we’re sharing in this article is no exception, but what is interesting and different about [Rick’s] projects is his careful and deliberate tutorial delivery on how to copy infrared remote codes, store the codes with a flavor of Arduino and then either transmit or receive the codes to control devices.

In the case of his space heater an Arduino was used to record and later retransmit the “power on” IR code to the heater before he awakes on a cold morning. This way his room is toasty warm before he has to climb out from under the covers, which has the added benefit of saving the cost of running the heater all night. Brilliant idea…

View original 228 more words

Follow

Get every new post delivered to your Inbox.