Eclipse, Arduino and STM32

Share with:


Mkay, let’s switch from Arduino IDE to some more user friendly.

I need Arduino, PHP, Python and i woukl like to switch to STM32 ‘Blue pill” instead of AVR core.

Seems like Eclipse community has developed some support on Arduino: need to mention Sloeber to bringing more pleasant UX to Arduino community. STM32duino community has an nice wiki post on installing Sloeber on Eclipse, yet it’s not up to date right now:

  1. Arduino plugin JSON link right now resides in http://eclipse.baeyens.it/update/V4/stable instead of http://www.baeyens.it/eclipse/V2.
  2. You don’t need to update to CDT 9.1, as Eclipse has CDT 9.4
  3. You do need to install support for SAM boards from “Arduino”->”Preferences”->”Platforms and boards”, mainly “Arduino SAM Boards (32-bits ARM Cortex-M3)”
  4. The GNU C/C++ compiler, provided with SAM boards is quite oldish, IMHO – it tells “4.8.3-2014q1”. I have a GNU Arm Embedded Toolchain in “C:\Program Files (x86)\GNU Tools ARM Embedded\7 2017-q4-major” and it seems quite legit to replace “A.RUNTIME.TOOLS.ARM-NONE-EABI-GCC.PATH” projec’t variable with the path above and the compilation is performed using the GCC v7 binaries.

Right now i have some older Arduino sketches that I would like to port to STM32: I like the on-board USB, increased pin count and the idea of J-Link debugger.

Tags: , ,

Woodpecker 2.8 GRBL board and ISP connector

Share with:


In the case you heed to to upgrade the Woodpecker CNC control board, you will have to overcome some issues.

First one, the firmware upgrade via USB is almost(?) impossible, due to the CH340 chip between USB socket and Atmeg328.

Second one, the ISP header IS present on the PCB, but is has 1,27mm (0,05″ or 50 mils) pitch. Usual ISP connectors comes to 2,54 mm (0,1″ or 100 mils) pitch. Read the rest of this entry »

Tags: , ,

My GRBL settings for 3018 CNC DIY machine

Share with:


My settings for 3018 DIY CNC machine with Woodpecker’s control board and GRBL 0.9j.20150930. Note the feed rate and acceleration on axes.

Read the rest of this entry »

Tags: ,

Rant: SF.net GIT repositories

Share with:


If unable to push commits, use git clone ssh://USERNAME@git.code.sf.net/u/USERNAME/PROJECTNAME instead of proposed git clone ssh://USERNAME@git.code.sf.net/u/USERNAME/PROJECTNAME u-USERNAME-PROJECTNAME

Tags:

LCM-WM002

Share with:


LCM-WM002 is a 16×2 LCD display, coming from a “refurbished” equipment. To be true, the equipment was a HP 5000 / 5100 laser printer, and the LCD has a bezel and a PCB with buttons attached, named ESU19516, part number RG5-5438. Read the rest of this entry »

Tags: , ,

Rant on Apache2

Share with:


Recently I was trying to move my sites to SSL – for various reasons.
The test site went fluently, while the work machine refused to serve SSL content. While testing with ‘wget’, the error I received was

GnuTLS: An unexpected TLS packet was received.

Read the rest of this entry »

Tags: , ,

Rant on AVR ISRs

Share with:


Once you define an ISR bit in the TIMSKx, the appropriate ISR must be attached.

Lost almost a day on non functioning serial port, until stumbled upon the post in stackoverflow.com

So, when copypasting

TIMSK1 |= (1 << TOIE1) | (1 << OCIE1A);

be sure to define both
ISR(TIMER1_OVF_vect) {
...
}

and
ISR (TIMER1_COMPA_vect)
{
...
}



                      

Tags: , ,

Current token in Arduino’s ArduinoSerialCommand

Share with:


Ever played with ArduinoSerialCommand? Nice library, but it lacks the possibility to retrieve current command. This possibility is waiting in the pull request for a long time, so if you deadly need it – merge it by yourself.

Tags: ,

Meet the fMRI Parrot

Share with:


fMRI Parrot

Camera
LG-D405n
Focal Length
3.2mm
Aperture
f/2.4
Exposure
1/20s
ISO
600

What the heck is “fMRI Parrot”?

First of all, the heck is fMRI. fMRI stands for “Functional Magnetic Resonace Imaging”, as defined in Wikipedia. It involves tons of expensive hardware, like Magnetic Resonance machine, and software, used to reconstruct the scanned volumes. During fMRI scanning a series of stimulus are applied to the patient and the brain is scanned using fast scanning MRI techniques. The aim of fMRI is to record immediate changes happening in particular areas of the brain.

The single MRI scan is called “volume”. It is created from a series of slices of the predefined thickness. Having more slices creates more detailed volume and extends acquisition time. As the changes of the brain activity are momentary, a short volume acquisition interval, named TR or “Time Repetition” is needed. Usually it varies from 7 to 1.5 seconds, depending on the capabilities of the MR machine. Short TR time supposes lower quality scans, compared to the “traditional” MR scanning. So the level of detail of particular volume is a trade off between time and specific requirements.

The fMRI scans consists from a number of volumes, recorded at particular intervals. The key condition for a successful scan is the precise timing. In order to find a region with elevated activity, a stimulus must be started just when the volume acquisition begins. For this the MRI machine may expose a short pulse – start of a volume. The pulse may be brought to the MRI control room via the interface box and the required stimulus started automatically. Some stimulus require the patient to respond, eg. press the predefined button. The response from the patient is also brought to the MRI control room. As there are special requirements for any hardware at the MRI machine, only certified equipment is allowed to the MR room. The requirement at the MRI control room are more relaxed as well as the choice of the equipment There are different vendors of the interface boxes and response buttons, NordicNeuroLab (NNL) being one of them.

In order to create the simulation series, or paradigmas in fMRI terminology, a lot of time is needed. Each paradigma is to be verified before the clinical test, while some of them can not be tested without a signal form the MRI scanner or a response from the patient. There is no need to say the MRI equipment is expensive, so is the time spent in the MRI machine. Most of the MRI scanner interface boxed can be used in so called “simulation” mode, sending particular responses at the predefined moments, without actually running the scanner. For example the Sync Box from NordicNeuroLab will send “S” symbol at the start of the volume acquisition, while fORP from Cambridge Reserch Systems is to send “5”. So what is actually required to test a paradigma, is the response from the scan… WAIT!

It’s must not be the MRI scanner nor the interface box.

Read the rest of this entry »

Tags: , , , , , , ,

Revive the racing wheel

Share with:


Image courtesy https://rjirovsky.wordpress.com/ Not the real one, of course. It’s Logitech Formula Force Ex – handy to play, but exposed some signs of aging. The LED on the wheel was not lit and force feedback was not functioning.
Image courtesy https://rjirovsky.wordpress.com/ The first idea was the power supply was dead or near-dead. It showed circa 3V instead of 14V once connected. As it was fine once disconnected, so the only solution was to go deep inside the base of the racing wheel’s unit.
Image courtesy https://rjirovsky.wordpress.com/ After some desoldering and resoldering of SMT parts, the possible cause was identified – the A3953, full bridge PWM motor driver from Allegro.
After the IC was desoldered, the power supply exposed the full voltage once connected.
So, the A3953SLBT or the circuits driven by this IC was the real cause.
Quick shopping at e-Bay and the IC arrived in the stunning 10 days.
Solder wick, some flux, washing, connect the power and … YESSS. The LED blinked and the wheel moved to the center position.
Case closed.

 

 

Tags: , , ,