Hello! I have re-launched the Applied Science T-shirt campaign on
Teepspring. It will end in just a few days, but will re-launch after
that, and be active for at least two weeks. These shirts are being sold
at-cost -- thanks so much for your support!
https://teespring.com/AppliedScience_youtube
Thursday, March 23, 2017
Monday, February 20, 2017
I show how to collect detailed CAN bus data from a Tesla Model S, and display it in the car's own web browser!
Complete Raspberry Pi with CAN bus shield and 12V buck converter: http://copperhilltech.com/raspberry-pi-3-system-with-can-bus-interface/
Tesla diagnostic connector: https://www.panjo.com/buy/tesla-diagnostic-cable-for-ms-mx-sept-2015-and-up-bare-wire-version-308125
RPi CAN bus tutorial: http://www.cowfishstudios.com/blog/canned-pi-part1
Get node.js installed on the RPi: http://thisdavej.com/beginners-guide-to-installing-node-js-on-a-raspberry-pi/
I used socket.io, which is a module that installs into node.js: https://www.npmjs.com/package/socket.io
Diagnostic connector pinout (scroll through the images):
http://store.evtv.me/proddetail.php?prod=TeslaCANKit
Tesla CAN bus reverse engineering: https://skie.net/skynet/downloads
Basic sequence to setup the server on the Pi:
sudo ip link set can0 type can bitrate 500000 listen-only on
sudo ip link set can0 up
candump -cae can0,0:0,#FFFFFFFF
candump -cae can0,0:0,#FFFFFFFF | grep 106 | awk -Winteractive '{ print $10}' | node app.js
I will post the node.js code on my blog:
Support Applied Science on Patreon:
https://www.patreon.com/AppliedScience
app.js:
var readline = require('readline');
var rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
terminal: false
});
pipedata = '';
rl.on('line', function(line){
console.log(line);
pipedata = line;
});
var http = require('http'),
fs = require('fs'),
// NEVER use a Sync function except at start-up!
index = fs.readFileSync(__dirname + '/index.html');
// Send index.html to all requests
var app = http.createServer(function(req, res) {
res.writeHead(200, {'Content-Type': 'text/html'});
res.end(index);
});
// Socket.io server listens to our app
var io = require('socket.io').listen(app);
// Send current time to all connected clients
function sendTime() {
// io.emit('time', { time: new Date().toJSON() });
io.emit('time', pipedata);
}
// Send current time every 10 secs
setInterval(sendTime, 100);
// Emit welcome message on connection
io.on('connection', function(socket) {
// Use socket to communicate with this particular client only, sending it it's own id
socket.emit('welcome', { message: 'Welcome!', id: socket.id });
socket.on('i am client', console.log);
});
app.listen(8080);
index.html:
<!doctype html>
<html>
<head>
<script src='/socket.io/socket.io.js'></script>
<script>
var socket = io();
socket.on('welcome', function(data) {
addMessage(data.message);
// Respond with a message including this clients' id sent from the server
socket.emit('i am client', {data: 'foo!', id: data.id});
});
socket.on('time', function(data) {
addMessage(data);
});
socket.on('error', console.error.bind(console));
socket.on('message', console.log.bind(console));
function addMessage(message) {
// var text = document.createTextNode(message);
document.getElementById('messages').textContent = message;
// el = document.createElement('li'),
// messages = document.getElementById('messages');
// el.appendChild(text);
// messages.appendChild(el);
}
</script>
<style>
p.sansserif { font-family: Arial, Helvtica, sans-serif; font-size:300%;}
</style>
</head>
<body>
<p class = "sansserif" id='messages'>Hello</p>
</body>
</html>Monday, January 2, 2017
Camera movement and dolly zoom with Chronos high-speed camera
High speed video with Chronos 1.4 camera movement and dolly zoom effect.
Big servo motor: https://www.teknic.com/products/clearpath-brushless-dc-servo-motors/
Small servo motor: https://www.kickstarter.com/projects/tropicallabs/mechaduino-powerful-open-source-industrial-servo-m
Ball-joint mount: https://www.amazon.com/VideoSecu-Univaersal-Satellite-Speaker-Bracket/dp/B005BV0FHG/
Chronos high-speed camera: https://www.kickstarter.com/projects/1714585446/chronos-14-high-speed-camera
Slow mo music: "Dewdrop Fantasy" Kevin MacLeod (incompetech.com)
Licensed under Creative Commons: By Attribution 3.0 License
http://creativecommons.org/licenses/by/3.0/
Saturday, November 26, 2016
"Bullet Time" with the Chronos high-speed camera
I used the Chronos high-speed camera to create an effect similar to Bullet Time in which the camera moves instantaneously (or just very quickly in this case).
Chronos on Kickstarter: https://www.kickstarter.com/projects/1714585446/chronos-14-high-speed-camera
Chronos camera review on EEVBlog: https://www.youtube.com/watch?v=rxYxTqALycM
Teknic servo motor: https://www.teknic.com/products/clearpath-brushless-dc-servo-motors/
Wireless shutter release: https://www.amazon.com/TW-283-N3-Wireless-Shutter-Release/dp/B016W3KFA8
Chronos on Kickstarter: https://www.kickstarter.com/projects/1714585446/chronos-14-high-speed-camera
Chronos camera review on EEVBlog: https://www.youtube.com/watch?v=rxYxTqALycM
Teknic servo motor: https://www.teknic.com/products/clearpath-brushless-dc-servo-motors/
Wireless shutter release: https://www.amazon.com/TW-283-N3-Wireless-Shutter-Release/dp/B016W3KFA8
Sunday, October 30, 2016
AM transmitter for antique radios and other project updates
If you restore antique AM radios, you may have noticed that there is little or no decent music available on AM broadcast. In this video, I how how to build a very simple AM transmitter that lets you play MP3 through an antique radio.
Matching transformer: http://www.digikey.com/product-search/en?keywords=MT4153-ND
Xtal oscillator: http://www.digikey.com/product-detail/en/cts-frequency-controls/MXO45-3C-1M0000/CTX775-ND/1801890
MP3 player: http://www.ebay.com/itm/New-Black-Mini-Remote-Control-USB-SD-FM-MP3-Audio-Player-Module-DC5V-12V-DIY-/162193192705
Matching transformer: http://www.digikey.com/product-search/en?keywords=MT4153-ND
Xtal oscillator: http://www.digikey.com/product-detail/en/cts-frequency-controls/MXO45-3C-1M0000/CTX775-ND/1801890
MP3 player: http://www.ebay.com/itm/New-Black-Mini-Remote-Control-USB-SD-FM-MP3-Audio-Player-Module-DC5V-12V-DIY-/162193192705
Subscribe to:
Posts (Atom)
