High Voltage Coils

electrical and mechanical engineering

Ural Ranger Model 2014 fuel sensor and indication lamp

Posted on 17. July 2016 in Motorcycles

Hi folks,
my favorite motorcycle has a little issue. A fuel sensor is available in the newer models. It is directly connected to the fuel indication lamp. If no fuel is present, the lamp is lit. Problem is, after turning the ignition, it does not flash up, so you dont have an indication if the fuelsensor or lamp is working. If you drive longer routes and you rely on this feature, you may find yourself in a situation without gas.

I developed an easy solution with just a few parts.

stecker

The original connectors used are from the company MOLEX
Mizu-P25™ 2.50mm Pitch Waterproof Wire-to-Wire Plug Housing, 3 Circuits

MALE
52116-0341
MALE_CRIMP
50038

FEMALE
052117-0341
FEMALE_CRIMP
50039

All products are available from the electronic supplier tme.eu (which kindly also ships to private households)
male crimp
male connector

female crimp
female connector

Next step is to get a working hardware, for this application i wanted to have some features:
* Using original waterproof connectors and housing, no soldering should be done for easy swapping and replacing any parts
* Sensor voltage protection, no more then 12V to the sensor
* Sensor output driver does not drive any load (13kOhms)
* Lamp short circuit protection, current is limited to 100mA
* After Ignition do a lamp test for ~500ms, then 500ms shutdown, then use the sensor value

schaltplan

The controller used is a Atmel ATiny13V, which works at 2MHz @5V. The code is written in plain c.

int main(void)
{
	// PB0 = GND
	// PB1 = sensor reading
	// PB4 = lamp output
	DDRB=0x10;
	PORTB=0x00;
	_delay_ms(500);
	PORTB=0x10;
	_delay_ms(1000);
	PORTB=0x00;
	_delay_ms(500);	
	PORTB=0x00;
	while (1)
	{
		if (PINB & 0x02)
		{
			PORTB = 0x10;
		}else{
			PORTB = 0x00;
		}		
	}
}

there is a testvideo available on youtube, folowwing this link

A possible improvement would be to debounce the digital inputs and adding a low pass filter, which will remove unwanted blinks if the sensor is only half wet.

Ural Ranger steering damper repair

Posted on 14. March 2016 in Motorcycles

Hi all,
recently the steering damper of my sidecar went dry, so it did not work correctly. Dismounting the damper was quite easy, but problematic was opening the end screw of the damper, to refill the oil. Because the damper screws are made of aluminuim, the risk of damaging the screw is very high.
The only way around is to build a proper tool for opening the device.

ld1
end screw with little notches

ld4
first mockup of the tool in CAD

ld3
after a little mechanical work

ld2
testing the tool

the cad is available for download here

The tools material is also aluminium, because i dont want the tool to be a harder metal then the screw.
So far this little hack works great, no more problems opening the damper, a 100% fixed grip and no risk of damaging the damper.

[Top]

setup raspberry pi with spdns – secure point DNS

Posted on 14. February 2016 in low voltage experiments

Hi folks,
my ISP is changing my IP address once a day, but still i wanted to connect to my raspberry pi homeserver from the internet. After some experimentation time i found a nice solution to work with.

1.) Register and setup spdns
Register as a new user at spdns.de
Setup a new virtual hostname for example “myhost.spdns.eu”

2.) setup a little python script
I downloaded a script from the user “mmichaa” python_script
and altered the main function of the script

def main(argv):
	if len(argv) != 4:
		print ''
		print "tUSAGE: " + __file__ + ' <hostname> <user> <passwd>'
		print ''
		return None
	hostname = argv[1]
	user = argv[2]
	passwd = argv[3]

to

def main(argv):	
	hostname = 'myhost.spdns.eu'
	user = 'myusername'
	passwd = 'mypassword'

so you do not need to provide the username and password as command line parameters.

3.) setup a cron job to automatically start the script
alter the cron configuration by entering

sudo crontab -e

add a new line at the end of the document

@hourly python /home/pi/spdns-client.py

test the script

sudo /etc/init.d/cron restart

 

[Top]

Rescue a DNT DigiMicro C11 Digital Microscope from scrap

Posted on 18. December 2015 in low voltage experiments

C11 camera with mount

There is a very simple way to get an old DNT DigMicro C11 camera working in Windows 8.1. The company DNT has moved on with a newer products like the “DigiMicro Scale 2.0” link to product page , but stopped support for older products. Unfortunately the newer software does not recognize the old hardware, so i found a way to make this product working on a modern system (W8.1).

In the device manager, the camera hardware id was detected as:

USB\VID_0C45&PID_6270&REV_0101
USB\VID_0C45&PID_6270

The valid driver for this camera is “SN9C201” from Sonix Inc.
download the driver file (USB20PCCam_5.7.26000.0.exe) from the link below USB20PCCam_5.7.26000.0.exe

cam_manager

the device will be detected in the device manager

To display the image i used the VLC Mediaplayer, available from http://www.videolan.org. Open the player and use the function “CTRL + C” open device. Set the mode to “Direct Show”, device to “USB2.0 PC Camera (SN9C201)” and the audio to “None”, this step is mandatory or it will not work correctly!

cam_vlcsettings

The device works perfectly
cam_vlcrunrecord

[Top]

Atmel xmega signal / sinusgenerator using DAC

Posted on 14. December 2015 in low voltage experiments

Hi all,

after several thoughts about how to create a sound with an xmega32a4 microcontroller from ATMEL, i detected two easy approaches to stick to, PWM (puls width modulation) or DAC (Digital Analog Converter). After thinking about the most flexible approach, i choose the DAC.

My code consists of 3 parts.

  1. static sinus lookup table, precalculated 12bit values, stored in a 16 bit word array
  2. A timer, which is acting as the sample rate clock, for example 48kHz
  3. The DAC, which will receive new values if the timer overflows

The hardware wiring is very simple, PORTB2 (DAC Channel 0 output) directly connected to an audio amplifier.

DAC working at 48kHz sample frequency

#include <avr/io.h>
#include "driver/avr_compiler.h"
#include "driver/driver_clksys.h"

const uint16_t sin1kHz[48] = {2048,2315,2578,2831,3071,3294,3495,3672,3821,3939,4025,4077,4095,4077,4025,3939,3821,3672,3495,3294,3072,2831,2578,2315,2048,1781,1518,1265,1025,802,601,424,275,157,71,19,1,19,71,157,275,424,601,802,1024,1265,1518,1781};

uint8_t idxsin = 0;
#define MAX_IDX 48

ISR (TCC0_CCA_vect)
{	// Timer overflow, put next sample into DAC
	DACB.CH0DATA = sin1kHz[idxsin];
	idxsin++;
	if (idxsin >= MAX_IDX) { idxsin = 0; }
}

int main(void)
{

	Config32MHzClock(); // set systemclock to 32MHz

	TCC0.CNT = 0; //Reset timer 0
	TCC0.PER = 167; // 21us @ 32MHz = ~48kHz
	TCC0.CTRLA = TC_CLKSEL_DIV4_gc; // Prescaler
	TCC0.INTCTRLB = TC_CCAINTLVL_LO_gc; // TCC0_CCA_vect, Compare Match

	PMIC.CTRL = PMIC_LOLVLEN_bm;
	sei();

	DACB.CTRLB = 0x00; // single channel operation PB2 only
	DACB.CTRLC = 0x08; // Vref = Analog Supply Voltage
	DACB.CTRLA = 0x04; // CH0EN = Enable Channel 0
	DACB.CTRLA |= 0x01; // ENABLE = Start the DAC

	while(1)
	{

	}
}

xmega_out2

1kHz @ 48kHz measured at uC output

The result is not bad, but feeding this to into my amplifier without additional filtering, results in  disturbing crackling noises. To reduce the “stair” effects, i choose to increase the sample frequency from 48kHz to 100kHz.

DAC working at 100kHz sample frequency

To make this work, i just need to reconfigure the timer parameters and sinus lookup table.

const uint16_t sin1kHz[100] = {2048,2177,2305,2432,2557,2681,2802,2920,3034,3145,3251,3353,3449,3540,3625,3704,3776,3842,3900,3951,3995,4031,4059,4079,4091,4095,4091,4079,4059,4031,3995,3951,3900,3842,3776,3704,3625,3540,3449,3353,3251,3145,3034,2920,2802,2681,2557,2432,2305,2177,2048,1919,1791,1664,1539,1415,1294,1176,1062,951,845,743,647,556,471,392,320,254,196,145,101,65,37,17,5,1,5,17,37,65,101,145,196,254,320,392,471,556,647,743,845,951,1062,1176,1294,1415,1539,1664,1791,1919};

uint8_t idxsin = 0;
#define MAX_IDX 100

ISR (TCC0_CCA_vect) 
{	
	DACB.CH0DATA = sin1kHz[idxsin];	
	idxsin++;
	if (idxsin >= MAX_IDX) { idxsin = 0; }
}	

int main(void)
{
	
	Config32MHzClock();	

	TCC0.CNT = 0;
	TCC0.PER = 157;	 // 10us @ 32MHz = ~100kHz	
	TCC0.CTRLA = TC_CLKSEL_DIV2_gc; // Prescaler
	TCC0.INTCTRLB = TC_CCAINTLVL_LO_gc; // TCC0_CCA_vect, bei Compare Match
	
	PMIC.CTRL = PMIC_LOLVLEN_bm;
	sei();	
	
	DACB.CTRLB = 0x00; // single channel operation PB2 only
	DACB.CTRLC = 0x08; // Vref = Analog Supply Voltage
	DACB.CTRLA = 0x04; // CH0EN = Enable Channel 0
	DACB.CTRLA |= 0x01; // ENABLE = Start the DAC
	
	while(1)
	{
		
	}	
}

xmega_out2

1kHz @ 100kHz measured at uC output

The result is not perfect, but the sinus at the amplifier output is completely clean, without any additional sidebands or crackling noises.

ls_out

signal after amplification measured at the loudspeaker

Performance measurements showed, the CPU load is at ~17% (time between samples = 10us @100kHz, time in ISR = 1,7us), which means that in theory, the sample rate may be pushed to 400kHz. For a better performance, i would recommend using the xmega DMA. A good implementation can be found at the AVR Xplain , Atmel AVR1508: XMEGA-A1 Xplained training – XMEGA DAC document, chapter “Task 4”.

[Top]

Raspberry Pi weather station

Posted on 9. November 2015 in low voltage experiments

Hi folks,
i have the need, to see the temperatures at my home place from a remote location. While surfing the internet, i found a quite simple solution to retrieve the temperature, humidity and air pressure from a sensor hooked up to a raspberry pi.

Hardware needed:

Software architecture:

The data acquisition software is written in python and runs as a service on the raspberry pi. Parts of the software are based on the BME280 script, provided by Shinichi-Ohki link to repository.

Every 10 minutes, data is gathered, and then being transmitted to a database via an URL GET request in the format (mypage.php?temp=25&druck=1028&feuchte=23).

The php script reads out the parameters, provided in the request, does a validity check and if succeeds, inserts the data into a mysql database.

For easy readout of the data, an html site provides an interface to the database. It displays the average temperature of the last 30 minutes and a line chart containing the values of the day.

weather

The software ran in test mode in my home lab for about 2 weeks without problems. Since 8th of November 2015, the hardware was installed at it’s final destination on the attic. The raspberry is housed in a case mounted to the wall on the inside, while the sensor is connected to 1 meter of wiring, residing on the outside.

If this system performs good in real life situations, i am looking forward to improve the software, so i can run a little monthly statistic. But for now all major features i need are implemented.

[Top]

Ural butt warmer for the cold months

Posted on 18. October 2015 in Motorcycles

Hi folks,
brace yourself, winter is coming. To prevent myself from freezing while winter driving, I decided to tune my motorcycle with a seat heater, alias “butt warmer”.
This modification if very simple, but took some time to make it practical in terms of usability and maintenance.

List of materials:

  • heating element, 12V – 38W, 320x137mm, link to shop
  • automotive fuse, 10A
  • automotive water resistant connectors, 2 pins from ebay (AMP superseal)
  • switch rated 6A with protective cover
  • scrap metal and a little box as housing

This is the schematic. The box contains an LED, which is used to indicate the status of the heating element. Because the switch is not connected to the ignition key, the heater will continue working, even if the motorcycle is not running. A problem of this wiring scheme, if you forget to turn of the heater, it will completely drain the battery!
Advantage of this scheme is the ability to directly hook up a charger to the battery, without needing to remove the battery from the vehicle.

schaltplan

Put everything in a little box, seal it, so the box is waterproof. Also add two connectors, male and female, so accidentally cross the wires is excluded. If you cross the wires, you will see the result, because the LED is always on, the heater will be able to be switched on and off normally.

DSC_0472

Put the heating element on top of the seat, seal it with protective cover and solder a connector to it.

DSC_0474

Hide the connector to the battery underneath the box (to loosen the box, only 2 screws need to be removed). Leave the connector to the seat above, to it can be easily disconnected.

DSC_0476

Riding with the heater:
My first impression was very bad. I soldered everything together, threw the switch and nothing happened. After 2 minutes the heat started, but just by touching it with my hands, it felt very cold.
So i decided to do a little test ride, with outside temperatures of about 12 – 5 *C. I was wearing a jean and on top of it protective trousers. The system works perfectly, even trough the large amount of clothes! Because of the large heating area and directly sitting on the pad, it takes about 1 minute to heat up. After 3 minutes i needed to switch it off, because the temperature was very hot 😉
Because of the mounting position, i can directly switch the heater on while driving with ease. Switching off is even simpler, because by closing the protective cover, the switch will also move to off position.

Conclusion:
This modification is very simple, works great, costs about 50€ and a weekend with some free time. It’s a good addition for winter drivers and may be removed in about 20 minutes.

 

 

[Top]

Jacobs ladder and steel wool

Posted on 9. October 2015 in high voltage experiments

This article displays just some pictures made from a simple two wire jacob’s ladder with steel wool cover. The steel wool ignites and creates hot arrows shooting from the center of the spark gap.

 

_DSC0151
a single spark climbing up the ladder, but with longer light exposure

_DSC0174

_DSC0209
the spark is igniting the steel wool

_DSC0229

_DSC0231
steel wool wound up to an isolating stick, arking to a metal plate

[Top]

Small Tesla Coil – 0,5 m height – 20W

Posted on in high voltage experiments

Some pictures from my smallest Tesla coil, driven by a fly back transformer from an old TV and a 555 timer IC. This machine works at about 15kHz, and drives a single IGBT450 FET, with an operation Voltage of about 12V.

IMG_0002
Light bulb lit without wires attached

IMG_0040
small arks from the top ~15cm

IMG_0041
additional arcs, the lamp in the background is lit, although it is not switched on

 

 

 

Tags: , ,

[Top]

Ural Ranger / Gear Up electronic interface for onboard diagnostics

Posted on in Motorcycles

Hi Folks,

i did some research on the electronics of my sidecar, a URAL Ranger ( or Gear Up in the US) model year 2014. This machine uses an electronic fuel injection (EFI) instead of a standard carburetor. Unfortunately this means some additional reverse engineering to get full access to all aspects this machine.

DSC_1050

 

1.) Which connector is being used?

The “protection” cap is also a working connector, but i didn’t want to use it, so i ordered another one from RS-components. (RS order number 511-0168)

Molex MX150L – 6 Pole  /  MOLEX 19418-0011
link to shop

In addition to the connector, it is mandatory to insert the pins. (RS order number 511-0067)
link to shop

 

2.) How to connect to a remote OBD device?

I used a OBD (on board diagnostics) cable extension 1m from ebay, which i cut in half and soldered the pins according to the schematic below

steckerbelegung

Molex connecter – OBD Pins

1 CAN HI – 6 CAN HI
2 CAN LO – 14 CAN LO
3 BAT GND – 4 chase GNDand 5 signal GND
4 BAT + – 16 Supply Voltage

resulting in the following cable

DSC_0461

 

3.) Readout data from the motorcycle

For reading out the data i am using a DIAMEX Scandevil. This is a handheld ODB scanner, so no additional software is needet to read out data from the motorcycle. It is also possible to insert a SD card and store sensor values directly on the flash drive, while riding the bike.

link to manufacturer

DSC_0462

My first tests worked out great, i was able to detect both EFI units, read out the sensor values like RPM, outside temperature and ignition timing.

DSC_0457

[Top]