Saturday, February 27, 2016

Raspberry Pi 3 vs Raspberry Pi 2, what do we know about it now

The next big thing happening to Raspberry Pi, a credit-card size mini computer and development board after launched for 4 years, is Raspberry Pi 3 model B.

As various sources have already pointed out, based on RPi's claim in FCC, the new RPi will have a on-board wifi(2.4G only)-Bluetooth module. For example, check my previous post, PCworld and CNX-software, or the FCC website.

Some blur images of the new RPi can be found on the FCC website. Here let me do a simple comparison between Raspberry Pi 2 model B and the new Raspberry Pi and see what we can figure out simply from the circuit board.

First, front side
Top is RPi 2 model B and bottom is the new RPi.

Second, reverse side
Top is RPi 2 model B and bottom is the new RPi.

This is what MagPi said..

Now, what do we know about the new RPi?

1. Name: as shown in the figure, the new RPi is indeed called Raspberry Pi 3 Model B. The tested version is already v1.2 and it was developed in 2015.

2. Processor: The image released on FCC is very blurry. We can't tell for sure tell the exact model number of the processor of RPi 3. However, as advertised by the latest MagPi magazine, the new RPi will be using a 64-bit 1.2GHz ARM processor. For comparison, RPi 2 model B is using 32-bit 900MHz ARM-A7 Cortex.

3. wireless: RPi 3 has an onboard WiFi-Bluetooth module (see the upper right of the reverse side of the Pi). The antenna of the module is on the upper left corner of the front side of the board. It is not very big. I think its performance is probably similar to those USB wifi dongle. With the onboard wireless module, we essentially have one more available USB slot!

4. USB: RPi 3 model B has four USB slots as RPI 2 model B

5. Ethernet: RPi 3 has an ethernet port just like RPi 2.

6. GPIO: Both RPi 2 model B and RPi 3 model B have 40 GPIO pins.

7. RAM: unclear. The image of the new Pi is really blur...

8. Display: both RPi 2 and RPi 3 have standard HDMI port and composite video-audio jack port. However, seems like the new RPi 3 gets an extra video port (probably parallel to HDMI?).

9. others...: some minor rearrangement of chips (diodes, regulators, etc.)

Raspberry Pi 3 is on the way!

Several hours ago, United States FCC (Federal Communications Commission) published documents about an incoming Raspberry Pi 3 submitted by the Raspberry Pi Trading under FCC ID 2ABCB-RPI32 on Feb 26 2016.

The FCC link can be found here 

Apparently the new Raspberry Pi 3 has a built-in 2.4GHz wifi module and bluetooth as shown in the FCC documents. Finally!

Here are some photos from the FCC document. The new RPi looks very similar to RPi 2, same number of GPIO pins, same number of USB slots (however with the built-in wifi module you gain one more!), etc. However we don't know the detailed specs. FCC only care about wireless communication frequency and power, that's why these documents are there. We will need to wait until an official release by RPi foundation.

  Also please check this pcworld post pcworld

Monday, December 28, 2015

3d elevation maps and me on Thingiverse

It has been a while since last time I update my blog. As I was extremely busy with my work and 2 years old, I haven't been able to find enough time playing with DIY hardware stuff. Instead, I start to do something more software.

I have been converting some topographic maps into 3D STL models that are ready for 3d printer. Models I've made include a 6 million:1 Texas elevation map, France (and some west European area)  topographic map, China topographic map and Rocky Mountain National Park in Colorado.




Rocky Mountain National Park

Please find those models under my Thingiverse account:

They are free to download.

I found these 3d elevation maps pretty neat because I can touch and feel them and gain a much more intuitive understanding of geology.

I am making more of these 3D elevation maps of course. And feel free to leave a comment if you would like to see some other place in 3D.

Saturday, April 11, 2015

A 3D printer simulator

Recently I wrote a python code that reads G-code generated by Slic3r, interprets the G-code, and creates a simple 3D plot that simulating a real 3D printer. It provides a nice preview of G-code.

The code can by downloaded here from my google drive.

If the link doesn't work, copy the following url and paste to your browser

The folder contains:


This is the configuration file. The file should contain:
line 1: G-code file name (including path). e.g., gcodes\squirrel_export.gcode
line 2: nS. A positive integer. A new section will be plotted after skipping (nS-1) sections. Minimal value is 1 (every section will be plotted). Smaller nS gives finner (and larger) plot.
line 3: nP. A positive integer. A new point will be plotted after skipping (nP-1) points. Minimal value is 1 (every point will be plotted). Smaller nP gives finner (and larger) plot.
line 4: dx, dy, dz, de. Resolution of the 3D printer in x,y,z direction and resolution of filament extruder. 

The main program that reads configuration from simulator_config.txt and calls and creates plot.

Simple run this code and get a 3D plot

File that contains functions to interprete G-code


A folder that contains some G-code examples.


Here is the example when running the "squirrel_export.gcode" file provided in the google drive folder.

snapshot when code is runing
Finished! You can rotate the view or zoom in/out

Wednesday, February 25, 2015

3D printer hot end temperature control system Version 2 [unfinished]

Almost a years ago, I post the first version of a simple temperature control system ultilizing only a LM324 quard op-amp with some resistors and a MOSFET. The system is for 3D printer's hot end.

The controller has two major functions: (a) turning a power resistor on and off automatically to maintain a constant temperature (adjustable manually); (b) showing the real time temperature in the range of 120-260 C. It is simple, low price, and efficient. The circuit board is shown below.
Temperature control system Version 1. See this post for detail. The values of the resistors here are R0=600 ohm, R1=10k ohm, R2=3.9k ohm, R3=6.19k ohm, R4=2.4k ohm, R5=10k ohm.

However, I realized later, also as reader epineh pointed out, the second function, displaying real time temperature, requires a constant +12V power supply. This could be problematic. Because most time people use low price ATX computer powersupply to power their 3D printer. And those powersupply DOES NOT output constant voltage. When there is a large current drain change, say once the power resistor is switched on and off, the power supply's output voltage can jump between 10 and 12V. As a matter of fact, the displayed voltage can be off by 20%!! The control system, on the other hand, works just fine because it relies only on the ratio of the resistance of thermistor and R0.

One solution is to use a logic power supply that output constant 12V for the LM324 and ATX powersupply for the hot resistor R_hot. Or another way is to add a voltage regulator, which turns the unstable 12V to a stable 5V as the voltage reference for LM324. Only one power supply is required. The circuit diagram is shown below.

Temperature control system Version 2. The values of the resistors here are R0=600 ohm, R1=10k ohm, R2=3.9k ohm, R3=6.19k ohm, R4=12.4k ohm, R5=10k ohm.

There are two differences between version 1 and version 2.
(a) In version 2, a LM340T5 +5V voltage regulator is used to convert 10~12V to a constant +5V. So the display will not be affected by the status of the hot resistor.
(b) R4 is changed from 2.4k ohm to 12.4k ohm. This is important in order to correctly display the temperature. I will show why later.

[this post is unfinished yet]

Friday, September 19, 2014

Change car charger's output voltage

Car charger is a must-have today, thanks to smartphones' larger and larger screen. It is very cheap to get a car charger adapter, which converts 12V, voltage of car's socket, into 5V, voltage of USB standard. I have several of these too.

However, Now I am in need of 9V 1A power while driving, and I decide to convert one of my 5 V car charger into 9 V.

Initially I was thinking about using a 9 V voltage regulator, say, LM7809, to do this. I believe it will work, but I found the solution can be even simpler after I actually opened one 5 V car charger.

This is what it looks like inside the 5 V car charger.

On the top is a 2 A fuse, which connects to the anode of the car charger (12V). The two thin metal sheets connect to the ground. The circuit at the bottom does the 12V-5V converting job.

Although those larger aluminum capacitors at the bottom occupy most of the space, the most crucial part is the IC (integrated circuit) under the black wire.

Look carefully into the circuit I found the IC part number is MC34063A, which is a 1.5A step up/down/invert DC-DC voltage regulator. I found its specs online

Sounds promising. The regulator can theoretically output voltage from 1.25V to 40V, and it can output up to 1.5A. So it is possible to achieve my goal, 9V 1A, by simply modifying the circuit a little bit.

The datasheet also provide a step-down circuit example, which outputs fixed 5V.

The output pin of MC34063A is pin 2. Resistor R1 and R2 form a voltage divider so that the voltage of pin 5 is
V5 = Vout*R1/(R1+R2),
which gives
Vout = V5*(R1+R2)/R1 = V5*(1+R2/R1).

From the circuit we see that V5 is tight to a 1.25V reference by a voltage comparator, meaning that V5 must equal to 1.25V. Hence
Vout = 1.25V*(1+R2/R1).

Given R1 = 1.2k and R2 = 3.6k = 3R1, there is
Vout = 1.25V*(1+3) =  5V.


Look carefully into the circuit I found that the blue resister on the right side of the IC is labeled R1, and the yellow resistor hidden beneath the large black capacitor is labeled R2. R1 links pin 5 with GND, and R2 links Pin 5 and output (the red wire). They match the above schematics perfectly!

Using a multimeter I found that R1 = 1k ohm and R2 = 3k ohm. Hence Vout = 1.25*(1+3) = 5V.d

Now the task is super easy! I removed R2 and replace it with a 6.2k ohm resistor so that
Vout = 1.25V*(1+6.2k/1k) = 1.25V*7.2=9V.

Guess what, after this simple modification, the voltage output of the car charger is 9V!

I opened several other car chargers I have and they all use MC34063A or identical chips. So looks like it is a pretty standard way to make inexpensive car chargers. Therefore the method I used here would work for those car charges as well.