800 inches per minute at 0.00025″ Resolution

800IPM Linear Slide Control

The folks over at PONTECH have just released a pretty impressive opensource PIC32 library for controlling a linear slide at speeds of 800 inches per minute!

PONTECH makes the Quick240 (Quick Universal Industrial Control Kard) which is based on the open source chipKIT platform. It was designed for industrial automation systems, where typically a ladder logic PLC might be used. The benefits to using a system like this is that because it is open, you are no longer stuck with proprietary hardware, and it is much more flexible to allow you to “do your own thing”. Did we mention it is also Arduino compatible?

Using this system they’ve successfully controlled two 8″ Velox slides at a whopping 800 inches per minute with a resolution of 0.00025″ — just take a look at the following video to appreciate how freaking fast that is.

[Read more...]

Measuring Light With ChipKIT

light meter showing LUX value

How does one go about measuring the amount of light in a given area? With a Light Meter of course! Maintaining proper lighting levels can be very important in places like schools, hospitals and even your own workbench.

[Raj] over at Embedded Labs has put together an excellent tutorial on how to construct your very own light meter based upon the chipKIT platform. The chipKIT Uno32 is similar to Arduino, but boasts a much more powerful PIC32MX320F128 microcontroller.  We’ve seen projects that feature the chipKIT Uno (pdf warning) here before. From playing pong to hosting several temperature sensors, it’s certainly a versatile platform.

The light meter uses an I/O shield and communicates to a BH1750FVI digital light sensor via I2C. The firmware divides the raw data coming off the sensor by a constant, and displays the light intensity data on an OLED display in Lux, foot-candles, and Watts/m^2 units. Be sure to check out the tutorial for full schematics and source.

CAN Hacking: The Hardware

can-hacking-hardware

So far we have discussed the basics of CAN, in-vehicle networks, and protocols used over CAN. We’re going to wrap up with a discussion of CAN tools, and parts to build your own CAN hardware.

Wiring

Unfortunately, there’s no set standard for CAN connections. The most common connector for high-speed CAN is a DE-9, with CAN high on pin 7 and CAN low on pin 2. However cables will differ, and many are incompatible.

CAN needs to be terminated, preferably by a 120 ohm resistance on either end of the bus. In practice, you can stick a single 120 ohm resistor across the bus to deal with termination.

Tools

A good CAN tool will let you transmit and receive CAN messages, interpret live data using CAN databases, and talk CAN protocols. The tools with this feature set are proprietary and expensive, but some hacker friendly options exist.

GoodThopter

The GoodThopter12

Based on [Travis Goodspeed's] GoodFET, the GoodThopter by [Q] uses the Microchip MCP2515 CAN to SPI controller to access the bus. The open hardware tool lets you send and receive messages using Python scripts.

CAN Bus Triple

CAN Bus Triple

The CAN Bus Triple device provides an interface to three CAN buses, and can be programmed in an environment similar to Arduino. The open source code provided lets you muck with the second generation Mazda 3. Unfortunately, the hardware does not appear to be open source.

Saleae Logic

Saleae Logic

It’s not open source, but the Saleae Logic is a very handy and cheap tool for looking at CAN buses. It can capture, decode, and display CAN traffic. This is most useful when you’re building your own CAN hardware.

DIY

The Parts

If you want to design your own hardware for CAN, you’ll need two things: a CAN controller, and a CAN transceiver.

The CAN controller generates and interprets CAN messages. There’s many microcontrollers on the market with built-in CAN controllers, such as the Atmel ATmega32M1, Freescale S08D, and the TI Tiva C Series. When using a built-in CAN controller, you’ll have to use an external oscillator, internal oscillators are not sufficiently accurate for high-speed CAN. If you want to add CAN to an existing microcontroller, the MCP2515 is an option. It’s a standalone CAN controller that communicates over SPI.

The transceiver translates signals from the controller to the bus, and from the bus to the transceiver. Different transceivers are needed for high-speed and low-speed CAN networks. The NXP TJA1050 works with high-speed buses, and the ON Semi NCV7356 works with low-speed, single wire buses.

Dev Boards

There’s a ton of development boards out there featuring microcontrollers with a CAN controller. The Arduino Due‘s SAM3 processor has a controller, but there’s no transceiver on the board. You can pick up a CAN bus shield, and the Due CAN Library to get started.

The ChipKIT Max32 is similar to the Due. It has two CAN controllers, but you’ll need to provide external transceivers to actually get on a bus. Fortunately there’s a shield for that. The ChipKIT is officially supported by Ford’s OpenXC Platform, so you can grab their firmware.

That concludes our discussion of CAN Hacking. Hopefully you’re now ready to go out and experiment with the protocol. If you have questions, send them along to our tip line with “CAN Hacking” in the subject, and we’ll compile some answers. If you liked this series and want to suggest a topic for the next set of posts we’d love to hear that as well!

CAN Hacking

Put your dev board to work as a demoscene display

If you’re looking for a way to push your comfort zone with that slick new microcontroller you’ve been working with we think [Morgan Gangwere] has the answer. He took his chipKit development board and used it as a demoscene platform.

Demoscene refers to audio and visual demos written to squeeze as much entertainment out of a given platform as possible. We’ve seen demos for a lot of different platforms; for instance, here’s a Propeller chip demo. But this use of the onboard OLED screen brings a smile to our faces. With well under 100 lines of code [Morgan] implemented several different video effects (the music heard in the clip after the break is not being produced by the board). There is a star field which serves as the background. Over the top of it a scrolling message is displayed following a sine wave shape. The speed at which it scrolls is set by the trimpot, which you can see adjusted about 50 seconds into the clip.

[Read more...]

Taking a dump from some old hardware

NYC Resistor shows you how to have some fun with electronics from the junk bin. Their post called The Joy of Dumping encourages you to look around for older memory chips and see what they’ve been hiding away for all these years.

The targets of their hunt are EPROM chips. Note the single ‘E’. These are Erasable Programmable Read-Only Memory chips, and predate EEPROM which adds “Electrically” to the beginning of the acronym.  You used to use a UV light source to erase the older types of memory. In fact we’ve seen some EPROM erasers as projects from time to time. These shouldn’t be too hard to find as they were prevalent as cheap storage back in the 1980’s.

If the quartz window on the top of the chips has been shielded from ambient UV light, you should still be able to read them and it’s as easy as hooking up your Arduino. Is it useful? Not really, but it still can be neat to interface with what might otherwise never make its way back out of the junk box.

Building a better circuit for renewable energy harvesting

[David], [Ian], and [Sajjad] finished and submitted their entry to the ChipKIT challenge just under the wire. They designed and built a maximum power tracking circuit for use with renewable sources. That is to say, this is a voltage regulator for use with solar cells and other generative sources like wind or water power. The idea is to use the best concepts of switch-mode power supply design, but replace the more wasteful parts with circuits that can harness and roll the loss back into the output.

We have to admit, following their development choices from the write-up at the top is a bit rocky. But luckily they filmed an in-depth description of the design choices, as well as a demonstration of the circuit along with various test measurements. If you’ve got twenty minutes and some patience all will become clear in the video after the break.

This will go along great with that bucket-based hydro generator you built.

[Read more...]

ChipKIT temperature shield supports a dozen sensors

chipkit_temp_board

[Will] wrote in to share a useful add-on he designed for the ChipKIT UNO 32, a 12-port temperature sensor board.

Constructed for one of his customers, the shield accepts any 2-wire 10k thermistor sensors, outputting the readings to a small LCD screen. The screen is supported by some code put together by his associate [crenn], but you are not limited to solely displaying the temperatures there. Since this module piggybacks on top of the ChipKIT the same fashion as any standard shield, you clearly have the ability to use and manipulate the data at will. With 12 ports on board this would work well for a house-wide temperature monitoring system, or perhaps in a complex brewing setup.

Both the temperature shield and LCD boards have been released under the Open Source Hardware License, so you can easily build your own if you have the means, though [Will] has a few extras he’s willing to sell if you need one quickly.

Follow

Get every new post delivered to your Inbox.

Join 94,571 other followers